summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--starmath/inc/dialog.hxx87
-rw-r--r--starmath/inc/node.hxx13
-rw-r--r--starmath/inc/parse.hxx2
-rw-r--r--starmath/inc/smmod.hxx5
-rw-r--r--starmath/inc/starmath.hrc2
-rw-r--r--starmath/inc/symbol.hxx184
-rw-r--r--starmath/prj/d.lst3
-rw-r--r--starmath/qa/unoapi/knownissues.xcl5
-rw-r--r--starmath/source/cfgitem.cxx18
-rw-r--r--starmath/source/cfgitem.hxx4
-rw-r--r--starmath/source/commands.src7
-rw-r--r--starmath/source/dialog.cxx333
-rw-r--r--starmath/source/document.cxx24
-rw-r--r--starmath/source/edit.cxx19
-rw-r--r--starmath/source/makefile.mk27
-rw-r--r--starmath/source/node.cxx11
-rwxr-xr-x[-rw-r--r--]starmath/source/parse.cxx85
-rw-r--r--starmath/source/rect.cxx2
-rw-r--r--starmath/source/smdll.cxx5
-rw-r--r--starmath/source/smmod.cxx12
-rwxr-xr-x[-rw-r--r--]starmath/source/smres.src2
-rw-r--r--starmath/source/symbol.cxx569
-rwxr-xr-x[-rw-r--r--]starmath/source/unomodel.cxx25
-rwxr-xr-x[-rw-r--r--]starmath/source/view.cxx23
-rw-r--r--starmath/uiconfig/smath/accelerator/en-GB/default.xml14
-rw-r--r--starmath/uiconfig/smath/accelerator/en-US/default.xml14
-rw-r--r--starmath/uiconfig/smath/menubar/menubar.xml224
-rw-r--r--sw/inc/AnnotationWin.hxx83
-rw-r--r--sw/inc/PostItMgr.hxx142
-rw-r--r--sw/inc/SidebarWin.hxx274
-rw-r--r--sw/inc/SidebarWindowsTypes.hxx (renamed from sw/inc/warnpassword.hxx)34
-rw-r--r--sw/inc/SwNumberTree.hxx7
-rw-r--r--sw/inc/access.hrc35
-rw-r--r--sw/inc/accmap.hxx107
-rw-r--r--sw/inc/cmdid.h2
-rw-r--r--sw/inc/crsrsh.hxx9
-rw-r--r--sw/inc/doc.hxx12
-rwxr-xr-x[-rw-r--r--]sw/inc/dochdl.hrc4
-rw-r--r--sw/inc/editsh.hxx19
-rw-r--r--sw/inc/fesh.hxx10
-rw-r--r--sw/inc/fldbas.hxx15
-rw-r--r--sw/inc/htmltbl.hxx2
-rw-r--r--sw/inc/index.hxx2
-rw-r--r--sw/inc/ndarr.hxx26
-rw-r--r--sw/inc/ndtxt.hxx40
-rw-r--r--sw/inc/node.hxx38
-rw-r--r--sw/inc/pch/precompiled_sw.hxx2
-rw-r--r--sw/inc/postit.hxx413
-rw-r--r--sw/inc/postithelper.hxx100
-rw-r--r--sw/inc/rcid.hrc9
-rw-r--r--sw/inc/rolbck.hxx23
-rw-r--r--sw/inc/section.hxx255
-rw-r--r--sw/inc/shellio.hxx25
-rw-r--r--sw/inc/sw_primitivetypes2d.hxx8
-rw-r--r--sw/inc/swabstdlg.hxx4
-rw-r--r--sw/inc/swcrsr.hxx9
-rw-r--r--sw/inc/swtable.hxx19
-rw-r--r--sw/inc/swtblfmt.hxx2
-rw-r--r--sw/inc/txtfld.hxx3
-rw-r--r--sw/inc/txtftn.hxx2
-rw-r--r--sw/inc/undobj.hxx152
-rw-r--r--sw/inc/unocrsrhelper.hxx7
-rw-r--r--sw/inc/unoflatpara.hxx12
-rw-r--r--sw/inc/unoidx.hxx12
-rw-r--r--sw/inc/unoprnms.hxx5
-rw-r--r--sw/inc/unosection.hxx12
-rw-r--r--sw/inc/unotextmarkup.hxx3
-rwxr-xr-x[-rw-r--r--]sw/inc/viewopt.hxx14
-rw-r--r--[-rwxr-xr-x]sw/inc/viewsh.hxx17
-rw-r--r--sw/inc/viscrs.hxx2
-rw-r--r--sw/prj/d.lst54
-rwxr-xr-xsw/qa/complex/writer/TextPortionEnumerationTest.java409
-rw-r--r--sw/qa/complex/writer/testdocuments/TESTXMLID.odtbin0 -> 10879 bytes
-rw-r--r--sw/qa/unoapi/knownissues.xcl16
-rw-r--r--sw/qa/unoapi/sw.sce38
-rw-r--r--sw/sdi/_textsh.sdi29
-rw-r--r--sw/sdi/_viewsh.sdi2
-rwxr-xr-xsw/sdi/annotsh.sdi30
-rw-r--r--sw/sdi/drwtxtsh.sdi28
-rw-r--r--sw/sdi/swriter.sdi25
-rw-r--r--sw/sdi/swslots.src1488
-rw-r--r--sw/source/core/SwNumberTree/SwNodeNum.cxx2
-rw-r--r--sw/source/core/SwNumberTree/SwNumberTree.cxx13
-rw-r--r--sw/source/core/access/acccell.cxx32
-rw-r--r--sw/source/core/access/acccell.hxx6
-rw-r--r--sw/source/core/access/acccontext.cxx304
-rw-r--r--sw/source/core/access/acccontext.hxx33
-rw-r--r--sw/source/core/access/accdoc.cxx8
-rw-r--r--sw/source/core/access/accfootnote.hxx12
-rw-r--r--sw/source/core/access/accframe.cxx268
-rw-r--r--sw/source/core/access/accframe.hxx124
-rw-r--r--sw/source/core/access/accframebase.hxx12
-rw-r--r--sw/source/core/access/accfrmobj.cxx403
-rw-r--r--sw/source/core/access/accfrmobj.hxx216
-rw-r--r--sw/source/core/access/accfrmobjmap.cxx156
-rw-r--r--sw/source/core/access/accfrmobjmap.hxx94
-rw-r--r--sw/source/core/access/accfrmobjslist.cxx131
-rw-r--r--sw/source/core/access/accfrmobjslist.hxx191
-rw-r--r--sw/source/core/access/accmap.cxx526
-rw-r--r--sw/source/core/access/accpara.cxx456
-rw-r--r--sw/source/core/access/accpara.hxx39
-rw-r--r--sw/source/core/access/accportions.cxx6
-rw-r--r--sw/source/core/access/accportions.hxx1
-rw-r--r--sw/source/core/access/accselectionhelper.cxx79
-rw-r--r--sw/source/core/access/acctable.cxx197
-rw-r--r--sw/source/core/access/acctable.hxx18
-rw-r--r--sw/source/core/access/makefile.mk6
-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.cxx55
-rw-r--r--sw/source/core/access/textmarkuphelper.hxx29
-rw-r--r--sw/source/core/bastyp/index.cxx2
-rw-r--r--sw/source/core/bastyp/swrect.cxx2
-rw-r--r--sw/source/core/crsr/crsrsh.cxx13
-rw-r--r--sw/source/core/crsr/crstrvl.cxx43
-rw-r--r--sw/source/core/crsr/crstrvl1.cxx24
-rw-r--r--sw/source/core/crsr/findtxt.cxx41
-rw-r--r--sw/source/core/crsr/swcrsr.cxx92
-rw-r--r--sw/source/core/crsr/trvlfnfl.cxx8
-rw-r--r--sw/source/core/crsr/trvlreg.cxx2
-rw-r--r--sw/source/core/crsr/viscrs.cxx10
-rw-r--r--sw/source/core/doc/dbgoutsw.cxx1
-rwxr-xr-xsw/source/core/doc/doc.cxx19
-rw-r--r--sw/source/core/doc/docbm.cxx5
-rw-r--r--sw/source/core/doc/doccomp.cxx24
-rw-r--r--sw/source/core/doc/docdde.cxx4
-rw-r--r--sw/source/core/doc/docedt.cxx29
-rw-r--r--sw/source/core/doc/docfld.cxx20
-rw-r--r--sw/source/core/doc/docfmt.cxx14
-rw-r--r--sw/source/core/doc/docglbl.cxx36
-rw-r--r--sw/source/core/doc/doclay.cxx4
-rw-r--r--sw/source/core/doc/docnew.cxx237
-rw-r--r--sw/source/core/doc/docredln.cxx22
-rw-r--r--sw/source/core/doc/doctxm.cxx77
-rw-r--r--sw/source/core/doc/extinput.cxx4
-rw-r--r--sw/source/core/doc/htmltbl.cxx34
-rw-r--r--sw/source/core/docnode/ndcopy.cxx6
-rw-r--r--sw/source/core/docnode/ndsect.cxx263
-rw-r--r--sw/source/core/docnode/node2lay.cxx4
-rw-r--r--sw/source/core/docnode/nodes.cxx18
-rw-r--r--sw/source/core/docnode/section.cxx499
-rw-r--r--sw/source/core/docnode/swbaslnk.cxx10
-rw-r--r--sw/source/core/draw/dview.cxx7
-rw-r--r--sw/source/core/edit/edattr.cxx10
-rw-r--r--sw/source/core/edit/edfld.cxx5
-rw-r--r--sw/source/core/edit/edglbldc.cxx2
-rw-r--r--sw/source/core/edit/editsh.cxx29
-rw-r--r--sw/source/core/edit/edlingu.cxx58
-rw-r--r--sw/source/core/edit/edsect.cxx16
-rw-r--r--sw/source/core/edit/edtox.cxx7
-rw-r--r--sw/source/core/fields/cellfml.cxx3
-rw-r--r--sw/source/core/fields/fldbas.cxx17
-rw-r--r--sw/source/core/fields/postithelper.cxx92
-rw-r--r--sw/source/core/frmedt/fecopy.cxx13
-rw-r--r--sw/source/core/frmedt/fefly1.cxx8
-rw-r--r--sw/source/core/frmedt/feshview.cxx364
-rw-r--r--sw/source/core/inc/SwGrammarMarkUp.hxx2
-rw-r--r--sw/source/core/inc/cellfrm.hxx6
-rw-r--r--sw/source/core/inc/doctxm.hxx2
-rw-r--r--sw/source/core/inc/frame.hxx4
-rw-r--r--sw/source/core/inc/pagefrm.hxx10
-rwxr-xr-xsw/source/core/inc/unometa.hxx17
-rw-r--r--sw/source/core/inc/viewimp.hxx17
-rw-r--r--sw/source/core/inc/wrong.hxx10
-rw-r--r--sw/source/core/layout/layact.cxx42
-rw-r--r--sw/source/core/layout/pagechg.cxx14
-rw-r--r--sw/source/core/layout/paintfrm.cxx2
-rw-r--r--sw/source/core/layout/tabfrm.cxx206
-rw-r--r--sw/source/core/layout/wsfrm.cxx24
-rw-r--r--sw/source/core/swg/SwXMLSectionList.cxx26
-rw-r--r--sw/source/core/table/swtable.cxx157
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx11
-rw-r--r--sw/source/core/text/SwGrammarMarkUp.cxx15
-rw-r--r--sw/source/core/text/inftxt.cxx8
-rw-r--r--sw/source/core/text/inftxt.hxx2
-rw-r--r--sw/source/core/text/itrcrsr.cxx40
-rw-r--r--sw/source/core/text/porlay.cxx5
-rw-r--r--sw/source/core/text/txtfly.cxx80
-rw-r--r--sw/source/core/text/txtfrm.cxx7
-rw-r--r--sw/source/core/text/txttab.cxx12
-rw-r--r--sw/source/core/tox/txmsrt.cxx5
-rw-r--r--sw/source/core/txtnode/atrfld.cxx26
-rw-r--r--sw/source/core/txtnode/atrftn.cxx38
-rw-r--r--sw/source/core/txtnode/fntcache.cxx178
-rw-r--r--sw/source/core/txtnode/ndhints.cxx16
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx208
-rw-r--r--sw/source/core/txtnode/thints.cxx307
-rw-r--r--sw/source/core/undo/SwUndoField.cxx12
-rw-r--r--sw/source/core/undo/rolbck.cxx5
-rw-r--r--sw/source/core/undo/unattr.cxx4
-rw-r--r--sw/source/core/undo/unbkmk.cxx17
-rw-r--r--sw/source/core/undo/undel.cxx19
-rw-r--r--sw/source/core/undo/undobj.cxx7
-rw-r--r--sw/source/core/undo/unins.cxx15
-rw-r--r--sw/source/core/undo/unmove.cxx10
-rw-r--r--sw/source/core/undo/unsect.cxx302
-rw-r--r--sw/source/core/unocore/unocoll.cxx7
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx85
-rw-r--r--sw/source/core/unocore/unodraw.cxx42
-rw-r--r--sw/source/core/unocore/unoflatpara.cxx48
-rw-r--r--sw/source/core/unocore/unoftn.cxx4
-rw-r--r--sw/source/core/unocore/unoidx.cxx209
-rw-r--r--sw/source/core/unocore/unomap.cxx3
-rw-r--r--sw/source/core/unocore/unoobj2.cxx4
-rw-r--r--sw/source/core/unocore/unoprnms.cxx1
-rw-r--r--sw/source/core/unocore/unorefmk.cxx86
-rw-r--r--sw/source/core/unocore/unosect.cxx244
-rw-r--r--sw/source/core/unocore/unosett.cxx11
-rw-r--r--sw/source/core/unocore/unotbl.cxx87
-rw-r--r--sw/source/core/view/viewimp.cxx4
-rw-r--r--[-rwxr-xr-x]sw/source/core/view/viewsh.cxx61
-rw-r--r--sw/source/filter/ascii/ascatr.cxx12
-rw-r--r--sw/source/filter/html/htmlfldw.cxx2
-rw-r--r--sw/source/filter/html/htmlform.cxx8
-rw-r--r--sw/source/filter/html/htmlsect.cxx26
-rw-r--r--sw/source/filter/html/swhtml.cxx2
-rw-r--r--sw/source/filter/html/wrthtml.cxx5
-rw-r--r--sw/source/filter/inc/fltshell.hxx7
-rw-r--r--sw/source/filter/rtf/rtfatr.cxx13
-rw-r--r--sw/source/filter/rtf/rtffly.cxx4
-rw-r--r--sw/source/filter/rtf/swparrtf.cxx78
-rw-r--r--sw/source/filter/rtf/wrtrtf.cxx4
-rw-r--r--sw/source/filter/writer/writer.cxx77
-rw-r--r--sw/source/filter/ww1/fltshell.cxx47
-rw-r--r--sw/source/filter/ww1/w1filter.cxx4
-rw-r--r--sw/source/filter/ww8/WW8Sttbf.cxx1
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.cxx952
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.hxx184
-rw-r--r--sw/source/filter/ww8/attributeoutputbase.hxx11
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx95
-rw-r--r--sw/source/filter/ww8/docxexport.cxx32
-rw-r--r--sw/source/filter/ww8/docxexportfilter.cxx2
-rw-r--r--sw/source/filter/ww8/dump/ww8scan.cxx4
-rw-r--r--sw/source/filter/ww8/dump/ww8scan.hxx3
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx3
-rw-r--r--sw/source/filter/ww8/writerhelper.hxx3
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx37
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx20
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx21
-rwxr-xr-x[-rw-r--r--]sw/source/filter/ww8/wrtww8.cxx341
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx11
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx15
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx25
-rw-r--r--sw/source/filter/ww8/ww8attributeoutput.hxx2
-rw-r--r--sw/source/filter/ww8/ww8graf.hxx4
-rw-r--r--sw/source/filter/ww8/ww8par.cxx201
-rw-r--r--sw/source/filter/ww8/ww8par.hxx40
-rw-r--r--sw/source/filter/ww8/ww8par2.hxx1
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx24
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx8
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx65
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx12
-rw-r--r--sw/source/filter/ww8/ww8scan.hxx3
-rw-r--r--sw/source/filter/xml/xmltbli.cxx6
-rw-r--r--sw/source/ui/app/applab.cxx9
-rw-r--r--sw/source/ui/app/docsh.cxx18
-rw-r--r--sw/source/ui/app/mn.src7
-rw-r--r--sw/source/ui/app/swmodule.cxx19
-rwxr-xr-x[-rw-r--r--]sw/source/ui/config/optpage.cxx22
-rw-r--r--sw/source/ui/config/viewopt.cxx7
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx35
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx7
-rw-r--r--sw/source/ui/dialog/SwSpellDialogChildWindow.cxx146
-rw-r--r--sw/source/ui/dialog/regionsw.cxx14
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx5
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx2
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx314
-rwxr-xr-x[-rw-r--r--]sw/source/ui/dochdl/dochdl.src9
-rwxr-xr-x[-rw-r--r--]sw/source/ui/dochdl/gloshdl.cxx45
-rw-r--r--sw/source/ui/dochdl/swdtflvr.cxx61
-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.cxx222
-rw-r--r--sw/source/ui/docvw/AnnotationMenuButton.hxx63
-rw-r--r--sw/source/ui/docvw/AnnotationWin.cxx292
-rw-r--r--sw/source/ui/docvw/PostItMgr.cxx661
-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.cxx428
-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
-rwxr-xr-xsw/source/ui/docvw/SidebarWin.cxx1373
-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.src18
-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.hrc23
-rw-r--r--sw/source/ui/docvw/docvw.src37
-rw-r--r--sw/source/ui/docvw/edtwin.cxx25
-rw-r--r--sw/source/ui/docvw/edtwin2.cxx19
-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/makefile.mk15
-rw-r--r--sw/source/ui/docvw/postit.cxx2482
-rw-r--r--sw/source/ui/fldui/fldmgr.cxx2
-rw-r--r--sw/source/ui/fldui/fldpage.cxx14
-rw-r--r--sw/source/ui/frmdlg/column.cxx3
-rw-r--r--sw/source/ui/inc/SidebarWindowsConsts.hxx41
-rw-r--r--sw/source/ui/inc/SwSpellDialogChildWindow.hxx4
-rwxr-xr-xsw/source/ui/inc/langhelper.hxx22
-rw-r--r--sw/source/ui/inc/olmenu.hxx11
-rw-r--r--sw/source/ui/inc/regionsw.hxx89
-rw-r--r--sw/source/ui/inc/swdtflvr.hxx2
-rw-r--r--sw/source/ui/inc/swmn_tmpl.hrc1
-rw-r--r--sw/source/ui/inc/view.hxx9
-rw-r--r--sw/source/ui/inc/wrtsh.hxx4
-rw-r--r--sw/source/ui/lingu/olmenu.cxx738
-rw-r--r--sw/source/ui/lingu/olmenu.hrc82
-rw-r--r--sw/source/ui/lingu/olmenu.src17
-rw-r--r--sw/source/ui/makefile.mk4
-rwxr-xr-xsw/source/ui/shells/annotsh.cxx164
-rw-r--r--sw/source/ui/shells/basesh.cxx5
-rw-r--r--sw/source/ui/shells/drwtxtex.cxx134
-rw-r--r--sw/source/ui/shells/drwtxtsh.cxx12
-rw-r--r--[-rwxr-xr-x]sw/source/ui/shells/langhelper.cxx268
-rw-r--r--sw/source/ui/shells/textdrw.cxx3
-rw-r--r--sw/source/ui/shells/textfld.cxx21
-rw-r--r--sw/source/ui/shells/textsh.cxx12
-rw-r--r--sw/source/ui/shells/textsh1.cxx61
-rw-r--r--sw/source/ui/shells/txtcrsr.cxx36
-rw-r--r--sw/source/ui/uiview/pview.cxx2
-rw-r--r--sw/source/ui/uiview/view.cxx7
-rw-r--r--sw/source/ui/uiview/view.src4
-rw-r--r--sw/source/ui/uiview/view0.cxx1
-rw-r--r--sw/source/ui/uiview/view2.cxx16
-rw-r--r--sw/source/ui/uiview/viewdraw.cxx7
-rwxr-xr-x[-rw-r--r--]sw/source/ui/uiview/viewling.cxx224
-rw-r--r--sw/source/ui/uiview/viewmdi.cxx31
-rw-r--r--sw/source/ui/uiview/viewsrch.cxx4
-rw-r--r--sw/source/ui/uiview/viewstat.cxx2
-rw-r--r--sw/source/ui/uiview/viewtab.cxx7
-rw-r--r--sw/source/ui/uno/makefile.mk3
-rw-r--r--[-rwxr-xr-x]sw/source/ui/uno/unotxdoc.cxx15
-rw-r--r--sw/source/ui/uno/unotxvw.cxx29
-rw-r--r--sw/source/ui/uno/warnpassword.cxx86
-rw-r--r--sw/source/ui/utlui/attrdesc.cxx8
-rw-r--r--sw/source/ui/utlui/attrdesc.hrc8
-rw-r--r--sw/source/ui/utlui/attrdesc.src8
-rw-r--r--sw/source/ui/utlui/content.cxx20
-rw-r--r--sw/source/ui/utlui/glbltree.cxx36
-rw-r--r--sw/source/ui/vba/vbafind.cxx4
-rw-r--r--sw/source/ui/vba/vbafind.hxx2
-rw-r--r--sw/source/ui/vba/vbaheaderfooterhelper.cxx3
-rw-r--r--sw/source/ui/vba/vbaheaderfooterhelper.hxx2
-rw-r--r--sw/source/ui/vba/vbarange.cxx4
-rw-r--r--sw/source/ui/vba/vbarange.hxx2
-rw-r--r--sw/source/ui/vba/vbasystem.cxx5
-rw-r--r--sw/source/ui/vba/vbasystem.hxx1
-rw-r--r--sw/source/ui/vba/vbawindow.cxx5
-rw-r--r--sw/source/ui/vba/vbawindow.hxx1
-rw-r--r--sw/source/ui/vba/vbawrapformat.cxx5
-rw-r--r--sw/source/ui/vba/vbawrapformat.hxx1
-rw-r--r--sw/source/ui/web/web.src4
-rw-r--r--sw/source/ui/wrtsh/wrtsh1.cxx19
-rw-r--r--sw/source/ui/wrtsh/wrtsh2.cxx10
-rw-r--r--sw/uiconfig/sglobal/accelerator/de/default.xml114
-rw-r--r--sw/uiconfig/sglobal/accelerator/en-GB/default.xml115
-rw-r--r--sw/uiconfig/sglobal/accelerator/en-US/default.xml115
-rw-r--r--sw/uiconfig/sglobal/accelerator/es/default.xml114
-rw-r--r--sw/uiconfig/sglobal/accelerator/fr/default.xml114
-rw-r--r--sw/uiconfig/sglobal/menubar/menubar.xml876
-rw-r--r--sw/uiconfig/sglobal/toolbar/extrusionobjectbar.xml10
-rw-r--r--sw/uiconfig/sglobal/toolbar/findbar.xml8
-rw-r--r--sw/uiconfig/sglobal/toolbar/fontworkobjectbar.xml6
-rw-r--r--sw/uiconfig/sweb/accelerator/de/default.xml114
-rw-r--r--sw/uiconfig/sweb/accelerator/en-GB/default.xml115
-rw-r--r--sw/uiconfig/sweb/accelerator/en-US/default.xml115
-rw-r--r--sw/uiconfig/sweb/accelerator/es/default.xml114
-rw-r--r--sw/uiconfig/sweb/accelerator/fr/default.xml114
-rw-r--r--sw/uiconfig/sweb/menubar/menubar.xml734
-rw-r--r--sw/uiconfig/sweb/toolbar/extrusionobjectbar.xml10
-rw-r--r--sw/uiconfig/sweb/toolbar/findbar.xml8
-rw-r--r--sw/uiconfig/sweb/toolbar/fontworkobjectbar.xml6
-rw-r--r--sw/uiconfig/swform/accelerator/de/default.xml119
-rw-r--r--sw/uiconfig/swform/accelerator/en-US/default.xml120
-rw-r--r--sw/uiconfig/swform/accelerator/es/default.xml119
-rw-r--r--sw/uiconfig/swform/accelerator/fr/default.xml119
-rw-r--r--sw/uiconfig/swform/menubar/menubar.xml866
-rw-r--r--sw/uiconfig/swform/toolbar/extrusionobjectbar.xml10
-rw-r--r--sw/uiconfig/swform/toolbar/fontworkobjectbar.xml6
-rw-r--r--sw/uiconfig/swreport/accelerator/de/default.xml114
-rw-r--r--sw/uiconfig/swreport/accelerator/en-GB/default.xml115
-rw-r--r--sw/uiconfig/swreport/accelerator/en-US/default.xml115
-rw-r--r--sw/uiconfig/swreport/accelerator/es/default.xml114
-rw-r--r--sw/uiconfig/swreport/accelerator/fr/default.xml114
-rw-r--r--sw/uiconfig/swreport/menubar/menubar.xml866
-rw-r--r--sw/uiconfig/swreport/toolbar/extrusionobjectbar.xml10
-rw-r--r--sw/uiconfig/swreport/toolbar/fontworkobjectbar.xml6
-rw-r--r--sw/uiconfig/swriter/accelerator/de/default.xml114
-rw-r--r--sw/uiconfig/swriter/accelerator/en-GB/default.xml115
-rw-r--r--sw/uiconfig/swriter/accelerator/en-US/default.xml115
-rw-r--r--sw/uiconfig/swriter/accelerator/es/default.xml114
-rw-r--r--sw/uiconfig/swriter/accelerator/fr/default.xml114
-rw-r--r--sw/uiconfig/swriter/menubar/menubar.xml882
-rw-r--r--sw/uiconfig/swriter/toolbar/extrusionobjectbar.xml10
-rw-r--r--sw/uiconfig/swriter/toolbar/findbar.xml8
-rw-r--r--sw/uiconfig/swriter/toolbar/fontworkobjectbar.xml6
-rw-r--r--sw/uiconfig/swxform/accelerator/de/default.xml114
-rw-r--r--sw/uiconfig/swxform/accelerator/en-GB/default.xml115
-rw-r--r--sw/uiconfig/swxform/accelerator/en-US/default.xml115
-rw-r--r--sw/uiconfig/swxform/accelerator/es/default.xml114
-rw-r--r--sw/uiconfig/swxform/accelerator/fr/default.xml114
-rw-r--r--sw/uiconfig/swxform/menubar/menubar.xml868
-rw-r--r--sw/uiconfig/swxform/toolbar/extrusionobjectbar.xml10
-rw-r--r--sw/uiconfig/swxform/toolbar/findbar.xml8
-rw-r--r--sw/uiconfig/swxform/toolbar/fontworkobjectbar.xml6
-rw-r--r--sw/util/makefile.mk10
409 files changed, 18208 insertions, 18053 deletions
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index 3e5ec1d296..239b3c2d38 100644
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -300,7 +300,7 @@ public:
class SmShowSymbolSet : public Control
{
- SmSymSet aSymbolSet;
+ SymbolPtrVec_t aSymbolSet;
ScrollBar aVScrollBar;
Size aOutputSize;
Link aSelectHdlLink;
@@ -318,7 +318,7 @@ class SmShowSymbolSet : public Control
public:
SmShowSymbolSet(Window *pParent, const ResId& rResId);
- void SetSymbolSet(const SmSymSet& rSymbolSet);
+ void SetSymbolSet(const SymbolPtrVec_t& rSymbolSet);
void SelectSymbol(USHORT nSymbol);
USHORT GetSelectSymbol() const { return nSelectSymbol; }
@@ -360,8 +360,10 @@ class SmSymbolDialog : public ModalDialog
PushButton aEditBtn;
SmViewShell &rViewSh;
- SmSymSetManager &rSymSetMgr;
- const SmSymSet *pSymSet;
+ SmSymbolManager &rSymbolMgr;
+
+ String aSymbolSetName;
+ SymbolPtrVec_t aSymbolSet;
OutputDevice *pFontListDev;
@@ -373,7 +375,7 @@ class SmSymbolDialog : public ModalDialog
DECL_LINK(GetClickHdl, Button *);
void FillSymbolSets(BOOL bDeleteText = TRUE);
- void SetSymbolSetManager(SmSymSetManager &rMgr);
+ void SetSymbolSetManager(SmSymbolManager &rMgr);
const SmSym *GetSymbol() const;
void InitColor_Impl();
@@ -381,7 +383,7 @@ class SmSymbolDialog : public ModalDialog
public:
SmSymbolDialog(Window * pParent, OutputDevice *pFntListDevice,
- SmSymSetManager &rSymSetMgr, SmViewShell &rViewShell, BOOL bFreeRes = TRUE);
+ SmSymbolManager &rSymbolMgr, SmViewShell &rViewShell, BOOL bFreeRes = TRUE);
virtual ~SmSymbolDialog();
BOOL SelectSymbolSet(const XubString &rSymbolSetName);
@@ -439,8 +441,8 @@ class SmSymDefineDialog : public ModalDialog
Image aRigthArrow_Im;
Image aRigthArrow_Im_HC; // hi-contrast version
- SmSymSetManager aSymSetMgrCopy,
- &rSymSetMgr;
+ SmSymbolManager aSymbolMgrCopy,
+ &rSymbolMgr;
const SmSym *pOrigSymbol;
const SubsetMap *pSubsetMap;
@@ -462,7 +464,7 @@ class SmSymDefineDialog : public ModalDialog
void FillFonts(BOOL bDeleteText = TRUE);
void FillStyles(BOOL bDeleteText = TRUE);
- void SetSymbolSetManager(const SmSymSetManager &rMgr);
+ void SetSymbolSetManager(const SmSymbolManager &rMgr);
void SetFont(const XubString &rFontName, const XubString &rStyleName);
void SetOrigSymbol(const SmSym *pSymbol, const XubString &rSymbolSetName);
void UpdateButtons();
@@ -474,18 +476,18 @@ class SmSymDefineDialog : public ModalDialog
BOOL SelectFont(const XubString &rFontName, BOOL bApplyFont);
BOOL SelectStyle(const XubString &rStyleName, BOOL bApplyFont);
-
- SmSymSet *GetSymbolSet(const ComboBox &rComboBox);
- inline const SmSymSet *GetSymbolSet(const ComboBox &rComboBox) const;
- SmSym *GetSymbol(const ComboBox &rComboBox);
- inline const SmSym *GetSymbol(const ComboBox &rComboBox) const;
+ SmSym * GetSymbol(const ComboBox &rComboBox);
+ const SmSym * GetSymbol(const ComboBox &rComboBox) const
+ {
+ return ((SmSymDefineDialog *) this)->GetSymbol(rComboBox);
+ }
void InitColor_Impl();
virtual void DataChanged( const DataChangedEvent& rDCEvt );
public:
- SmSymDefineDialog(Window *pParent, OutputDevice *pFntListDevice, SmSymSetManager &rMgr, BOOL bFreeRes = TRUE);
+ SmSymDefineDialog(Window *pParent, OutputDevice *pFntListDevice, SmSymbolManager &rMgr, BOOL bFreeRes = TRUE);
~SmSymDefineDialog();
using OutputDevice::SetFont;
@@ -493,44 +495,31 @@ public:
// Dialog
virtual short Execute();
- inline BOOL SelectOldSymbolSet(const XubString &rSymbolSetName);
- inline BOOL SelectOldSymbol(const XubString &rSymbolName);
- inline BOOL SelectSymbolSet(const XubString &rSymbolSetName);
- inline BOOL SelectSymbol(const XubString &rSymbolName);
- BOOL SelectFont(const XubString &rFontName) { return SelectFont(rFontName, TRUE); }
+ BOOL SelectOldSymbolSet(const XubString &rSymbolSetName)
+ {
+ return SelectSymbolSet(aOldSymbolSets, rSymbolSetName, FALSE);
+ }
+
+ BOOL SelectOldSymbol(const XubString &rSymbolName)
+ {
+ return SelectSymbol(aOldSymbols, rSymbolName, FALSE);
+ }
+
+ BOOL SelectSymbolSet(const XubString &rSymbolSetName)
+ {
+ return SelectSymbolSet(aSymbolSets, rSymbolSetName, FALSE);
+ }
+
+ BOOL SelectSymbol(const XubString &rSymbolName)
+ {
+ return SelectSymbol(aSymbols, rSymbolName, FALSE);
+ }
+
+ BOOL SelectFont(const XubString &rFontName) { return SelectFont(rFontName, TRUE); }
BOOL SelectStyle(const XubString &rStyleName) { return SelectStyle(rStyleName, TRUE); };
void SelectChar(xub_Unicode cChar);
};
-inline const SmSymSet * SmSymDefineDialog::GetSymbolSet(const ComboBox &rComboBox) const
-{
- return ((SmSymDefineDialog *) this)->GetSymbolSet(rComboBox);
-}
-
-inline const SmSym * SmSymDefineDialog::GetSymbol(const ComboBox &rComboBox) const
-{
- return ((SmSymDefineDialog *) this)->GetSymbol(rComboBox);
-}
-
-inline BOOL SmSymDefineDialog::SelectOldSymbolSet(const XubString &rSymbolSetName)
-{
- return SelectSymbolSet(aOldSymbolSets, rSymbolSetName, FALSE);
-}
-
-inline BOOL SmSymDefineDialog::SelectOldSymbol(const XubString &rSymbolName)
-{
- return SelectSymbol(aOldSymbols, rSymbolName, FALSE);
-}
-
-inline BOOL SmSymDefineDialog::SelectSymbolSet(const XubString &rSymbolSetName)
-{
- return SelectSymbolSet(aSymbolSets, rSymbolSetName, FALSE);
-}
-
-inline BOOL SmSymDefineDialog::SelectSymbol(const XubString &rSymbolName)
-{
- return SelectSymbol(aSymbols, rSymbolName, FALSE);
-}
#endif
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index 99545ec541..66e2bafd36 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -484,15 +484,24 @@ public:
class SmLineNode : public SmStructureNode
{
+ BOOL bUseExtraSpaces;
+
protected:
SmLineNode(SmNodeType eNodeType, const SmToken &rNodeToken)
: SmStructureNode(eNodeType, rNodeToken)
- {}
+ {
+ bUseExtraSpaces = TRUE;
+ }
public:
SmLineNode(const SmToken &rNodeToken)
: SmStructureNode(NLINE, rNodeToken)
- {}
+ {
+ bUseExtraSpaces = TRUE;
+ }
+
+ void SetUseExtraSpaces(BOOL bVal) { bUseExtraSpaces = bVal; }
+ BOOL IsUseExtraSpaces() const { return bUseExtraSpaces; };
virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx
index 9577c91f0a..314f2353d3 100644
--- a/starmath/inc/parse.hxx
+++ b/starmath/inc/parse.hxx
@@ -106,7 +106,7 @@ enum SmTokenType
TLEFTARROW, TRIGHTARROW, TUPARROW, TDOWNARROW, TDIVIDES,
TNDIBVIDES, TSETN, TSETZ, TSETQ, TSETR,
TSETC, TWIDEVEC, TWIDETILDE, TWIDEHAT, TWIDESLASH,
- TWIDEBACKSLASH, TLDBRACKET, TRDBRACKET,
+ TWIDEBACKSLASH, TLDBRACKET, TRDBRACKET, TNOSPACE,
TUNKNOWN, TDEBUG
};
diff --git a/starmath/inc/smmod.hxx b/starmath/inc/smmod.hxx
index 9956f81dfe..e5718a0f82 100644
--- a/starmath/inc/smmod.hxx
+++ b/starmath/inc/smmod.hxx
@@ -47,7 +47,7 @@ class SvxErrorHandler;
class SfxObjectFactory;
class SmConfig;
class SmModule;
-class SmSymSetManager;
+class SmSymbolManager;
/*************************************************************************
|*
@@ -149,7 +149,7 @@ public:
svtools::ColorConfig & GetColorConfig();
SmConfig * GetConfig();
- SmSymSetManager & GetSymSetManager();
+ SmSymbolManager & GetSymbolManager();
SmLocalizedSymbolData & GetLocSymbolData() const;
@@ -176,7 +176,6 @@ public:
};
#define SM_MOD() ( *(SmModule**) GetAppData(SHL_SM) )
-#define SM_MOD1() ( *(SmModule**) GetAppData(SHL_SM) )
#endif // _SDMOD_HXX
diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc
index 456964a07e..7d11b64aa0 100644
--- a/starmath/inc/starmath.hrc
+++ b/starmath/inc/starmath.hrc
@@ -379,6 +379,7 @@
#define RID_LSUPX (RID_APP_START + 1916)
#define RID_CSUBX (RID_APP_START + 1917)
#define RID_CSUPX (RID_APP_START + 1918)
+#define RID_NOSPACE (RID_APP_START + 1919)
#define RID_ALEPH (RID_APP_START + 2001)
#define RID_EMPTYSET (RID_APP_START + 2002)
@@ -694,6 +695,7 @@
#define HID_SMA_DOTSDOWN (HID_SMA_START + 240)
#define HID_SMA_DOTSLOW (HID_SMA_START + 241)
#define HID_SMA_DOTSVERT (HID_SMA_START + 242)
+#define HID_SMA_NOSPACE (HID_SMA_START + 243)
#define HID_SMA_SETN (HID_SMA2_START + 1)
#define HID_SMA_SETZ (HID_SMA2_START + 2)
diff --git a/starmath/inc/symbol.hxx b/starmath/inc/symbol.hxx
index 17a353a039..79b63d9a54 100644
--- a/starmath/inc/symbol.hxx
+++ b/starmath/inc/symbol.hxx
@@ -28,198 +28,146 @@
#define SYMBOL_HXX
#include <vos/refernce.hxx>
-#ifndef _FONT_HXX //autogen
#include <vcl/font.hxx>
-#endif
#include <tools/list.hxx>
#include <tools/debug.hxx>
#include <tools/dynary.hxx>
#include <svl/lstner.hxx>
#include <svl/svarray.hxx>
+
+#include <map>
+#include <vector>
+#include <set>
+
#include "utility.hxx"
-#include <smmod.hxx>
+#include "smmod.hxx"
-#define SS_ATTR_ACCESS 0x80
-#define SYMBOLSET_NONE 0xFFFF
+#define SYMBOLSET_NONE 0xFFFF
#define SYMBOL_NONE 0xFFFF
-class SmSymSetManager;
////////////////////////////////////////////////////////////////////////////////
inline const String GetExportSymbolName( const String &rUiSymbolName )
{
- return SM_MOD1()->GetLocSymbolData().GetExportSymbolName( rUiSymbolName );
+ return SM_MOD()->GetLocSymbolData().GetExportSymbolName( rUiSymbolName );
}
inline const String GetUiSymbolName( const String &rExportSymbolName )
{
- return SM_MOD1()->GetLocSymbolData().GetUiSymbolName( rExportSymbolName );
+ return SM_MOD()->GetLocSymbolData().GetUiSymbolName( rExportSymbolName );
}
inline const String GetExportSymbolSetName( const String &rUiSymbolSetName )
{
- return SM_MOD1()->GetLocSymbolData().GetExportSymbolSetName( rUiSymbolSetName );
+ return SM_MOD()->GetLocSymbolData().GetExportSymbolSetName( rUiSymbolSetName );
}
inline const String GetUiSymbolSetName( const String &rExportSymbolSetName )
{
- return SM_MOD1()->GetLocSymbolData().GetUiSymbolSetName( rExportSymbolSetName );
+ return SM_MOD()->GetLocSymbolData().GetUiSymbolSetName( rExportSymbolSetName );
}
////////////////////////////////////////////////////////////////////////////////
class SmSym
{
- friend class SmSymSetManager;
-
- SmFace Face;
- String Name;
- String aExportName;
- String aSetName;
- SmSym *pHashNext;
- SmSymSetManager *pSymSetManager;
- sal_Unicode Character;
- BYTE Attribut;
- BOOL bPredefined;
- BOOL bDocSymbol;
+ SmFace m_aFace;
+ String m_aName;
+ String m_aExportName;
+ String m_aSetName;
+ sal_Unicode m_cChar;
+ BOOL m_bPredefined;
+ BOOL m_bDocSymbol;
public:
SmSym();
- SmSym(const SmSym& rSymbol);
SmSym(const String& rName, const Font& rFont, sal_Unicode cChar,
const String& rSet, BOOL bIsPredefined = FALSE);
+ SmSym(const SmSym& rSymbol);
SmSym& operator = (const SmSym& rSymbol);
- const Font& GetFace() const { return Face; }
- sal_Unicode GetCharacter() const { return Character; }
- const String& GetName() const { return Name; }
+ const Font& GetFace() const { return m_aFace; }
+ sal_Unicode GetCharacter() const { return m_cChar; }
+ const String& GetName() const { return m_aName; }
- void SetFace( const Font& rFont ) { Face = rFont; }
- void SetCharacter( sal_Unicode cChar ) { Character = cChar; }
- void SetName( const String &rTxt ) { Name = rTxt; }
+ void SetFace( const Font& rFont ) { m_aFace = rFont; }
+ void SetCharacter( sal_Unicode cChar ) { m_cChar = cChar; }
- BOOL IsPredefined() const { return bPredefined; }
- const String & GetSetName() const { return aSetName; }
- void SetSetName( const String &rName ) { aSetName = rName; }
- const String & GetExportName() const { return aExportName; }
- void SetExportName( const String &rName ) { aExportName = rName; }
+//! since the symbol name is also used as key in the map it should not be possible to change the name
+//! because ten the key would not be the same as its supposed copy here
+// void SetName( const String &rTxt ) { m_aName = rTxt; }
- BOOL IsDocSymbol() const { return bDocSymbol; }
- void SetDocSymbol( BOOL bVal ) { bDocSymbol = bVal; }
-};
+ BOOL IsPredefined() const { return m_bPredefined; }
+ const String & GetSymbolSetName() const { return m_aSetName; }
+ void SetSymbolSetName( const String &rName ) { m_aSetName = rName; }
+ const String & GetExportName() const { return m_aExportName; }
+ void SetExportName( const String &rName ) { m_aExportName = rName; }
+
+ BOOL IsDocSymbol() const { return m_bDocSymbol; }
+ void SetDocSymbol( BOOL bVal ) { m_bDocSymbol = bVal; }
-DECLARE_LIST(SmListSym, SmSym *)
-SV_DECL_PTRARR( SymbolArray, SmSym *, 32, 32 )
+ // true if rSymbol has the same name, font and character
+ bool IsEqualInUI( const SmSym& rSymbol ) const;
+};
/**************************************************************************/
-class SmSymSet
+struct lt_String
{
- friend class SmSymSetManager;
-
- SmListSym SymbolList;
- String Name;
- SmSymSetManager *pSymSetManager;
-
-public:
- SmSymSet();
- SmSymSet(const SmSymSet& rSymbolSet);
- SmSymSet(const String& rName);
- ~SmSymSet();
-
- SmSymSet& operator = (const SmSymSet& rSymbolSet);
-
- const String& GetName() const { return Name; }
- USHORT GetCount() const { return (USHORT) SymbolList.Count(); }
-
- const SmSym& GetSymbol(USHORT SymbolNo) const
+ bool operator()( const String &r1, const String &r2 ) const
{
- DBG_ASSERT(SymbolList.GetObject(SymbolNo), "Symbol nicht vorhanden");
- return *SymbolList.GetObject(SymbolNo);
+ // r1 < r2 ?
+ return r1.CompareTo( r2 ) == COMPARE_LESS;
}
-
- USHORT AddSymbol(SmSym* pSymbol);
- void DeleteSymbol(USHORT SymbolNo);
- SmSym * RemoveSymbol(USHORT SymbolNo);
- USHORT GetSymbolPos(const String& rName);
};
-DECLARE_DYNARRAY(SmArraySymSet, SmSymSet *)
-
-/**************************************************************************/
-
-class SmSymbolDialog;
-
-
-struct SmSymSetManager_Impl
-{
- SmArraySymSet SymbolSets;
- SmSymSetManager & rSymSetMgr;
- SmSym** HashEntries;
- USHORT NoSymbolSets;
- USHORT NoHashEntries;
- BOOL Modified;
-
- SmSymSetManager_Impl( SmSymSetManager &rMgr, USHORT HashTableSize );
- ~SmSymSetManager_Impl();
- SmSymSetManager_Impl & operator = ( const SmSymSetManager_Impl &rImpl );
-};
+// type of the actual container to hold the symbols
+typedef std::map< String, SmSym, lt_String > SymbolMap_t;
+// vector of pointers to the actual symbols in the above container
+typedef std::vector< const SmSym * > SymbolPtrVec_t;
-class SmSymSetManager : public SfxListener
+class SmSymbolManager : public SfxListener
{
- friend struct SmSymSetManager_Impl;
-
- SmSymSetManager_Impl *pImpl;
+ SymbolMap_t m_aSymbols;
+ bool m_bModified;
virtual void SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType,
const SfxHint& rHint, const TypeId& rHintType);
- UINT32 GetHashIndex(const String& rSymbolName);
- void EnterHashTable(SmSym& rSymbol);
- void EnterHashTable(SmSymSet& rSymbolSet);
- void FillHashTable();
- void Init();
- void Exit();
+ void Init();
+ void Exit();
public:
- SmSymSetManager(USHORT HashTableSize = 137);
- SmSymSetManager(const SmSymSetManager& rSymbolSetManager);
- ~SmSymSetManager();
+ SmSymbolManager();
+ SmSymbolManager(const SmSymbolManager& rSymbolSetManager);
+ ~SmSymbolManager();
- SmSymSetManager& operator = (const SmSymSetManager& rSymbolSetManager);
+ SmSymbolManager & operator = (const SmSymbolManager& rSymbolSetManager);
- void GetSymbols( std::vector< SmSym > &rSymbols ) const;
+ // symbol sets are for UI purpose only, thus we assemble them here
+ std::set< String > GetSymbolSetNames() const;
+ const SymbolPtrVec_t GetSymbolSet( const String& rSymbolSetName );
-
- USHORT AddSymbolSet(SmSymSet* pSymbolSet);
- void ChangeSymbolSet(SmSymSet* pSymbolSet);
- void DeleteSymbolSet(USHORT SymbolSetNo);
- USHORT GetSymbolSetPos(const String& rSymbolSetName) const;
- USHORT GetSymbolSetCount() const { return pImpl->NoSymbolSets; }
- SmSymSet *GetSymbolSet(USHORT SymbolSetNo) const
- {
- return pImpl->SymbolSets.Get(SymbolSetNo);
- }
+ USHORT GetSymbolCount() const { return static_cast< USHORT >(m_aSymbols.size()); }
+ const SymbolPtrVec_t GetSymbols() const;
+ bool AddOrReplaceSymbol( const SmSym & rSymbol, bool bForceChange = false );
+ void RemoveSymbol( const String & rSymbolName );
SmSym * GetSymbolByName(const String& rSymbolName);
const SmSym * GetSymbolByName(const String& rSymbolName) const
{
- return ((SmSymSetManager *) this)->GetSymbolByName(rSymbolName);
+ return ((SmSymbolManager *) this)->GetSymbolByName(rSymbolName);
}
-
- void AddReplaceSymbol( const SmSym & rSymbol );
- USHORT GetSymbolCount() const;
- const SmSym * GetSymbolByPos( USHORT nPos ) const;
-
- BOOL IsModified() const { return pImpl->Modified; }
- void SetModified(BOOL Modify) { pImpl->Modified = Modify; }
+
+ bool IsModified() const { return m_bModified; }
+ void SetModified(bool bModify) { m_bModified = bModify; }
void Load();
void Save();
diff --git a/starmath/prj/d.lst b/starmath/prj/d.lst
index d6f5f9f98b..bc48875e81 100644
--- a/starmath/prj/d.lst
+++ b/starmath/prj/d.lst
@@ -4,8 +4,6 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\smath
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\smath\menubar
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\smath\toolbar
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\smath\accelerator
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\smath\accelerator\en-US
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\smath\statusbar
..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid
@@ -20,5 +18,4 @@ mkdir: %_DEST%\inc%_EXT%\starmath
..\uiconfig\smath\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\smath\menubar\*.xml
..\uiconfig\smath\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\smath\toolbar\*.xml
-..\uiconfig\smath\accelerator\en-US\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\smath\accelerator\en-US\*.xml
..\uiconfig\smath\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\smath\statusbar\*.xml
diff --git a/starmath/qa/unoapi/knownissues.xcl b/starmath/qa/unoapi/knownissues.xcl
index 960ad64ce1..e11895ef3f 100644
--- a/starmath/qa/unoapi/knownissues.xcl
+++ b/starmath/qa/unoapi/knownissues.xcl
@@ -12,4 +12,7 @@ sm.SmEditAccessible::com::sun::star::accessibility::XAccessibleEventBroadcaster
sm.SmGraphicAccessible::com::sun::star::accessibility::XAccessibleEventBroadcaster
### i94275 ###
-sm.SmGraphicAccessible::com::sun::star::accessibility::XAccessibleText \ No newline at end of file
+sm.SmGraphicAccessible::com::sun::star::accessibility::XAccessibleText
+
+### i111220 ###
+sm.XMLMetaExporter::com::sun::star::document::XFilter
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx
index 277d806f8e..c2f417d15e 100644
--- a/starmath/source/cfgitem.cxx
+++ b/starmath/source/cfgitem.cxx
@@ -429,7 +429,7 @@ SmMathConfig::SmMathConfig() :
pFormat = 0;
pOther = 0;
pFontFormatList = 0;
- pSymSetMgr = 0;
+ pSymbolMgr = 0;
bIsOtherModified = bIsFormatModified = FALSE;
}
@@ -441,7 +441,7 @@ SmMathConfig::~SmMathConfig()
delete pFormat;
delete pOther;
delete pFontFormatList;
- delete pSymSetMgr;
+ delete pSymbolMgr;
}
@@ -554,14 +554,14 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol,
}
-SmSymSetManager & SmMathConfig::GetSymSetManager()
+SmSymbolManager & SmMathConfig::GetSymbolManager()
{
- if (!pSymSetMgr)
+ if (!pSymbolMgr)
{
- pSymSetMgr = new SmSymSetManager;
- pSymSetMgr->Load();
+ pSymbolMgr = new SmSymbolManager;
+ pSymbolMgr->Load();
}
- return *pSymSetMgr;
+ return *pSymbolMgr;
}
@@ -570,6 +570,7 @@ void SmMathConfig::Commit()
Save();
}
+
void SmMathConfig::Save()
{
SaveOther();
@@ -577,6 +578,7 @@ void SmMathConfig::Save()
SaveFontFormatList();
}
+
void SmMathConfig::GetSymbols( std::vector< SmSym > &rSymbols ) const
{
Sequence< OUString > aNodes( ((SmMathConfig*) this)->GetNodeNames( A2OU( SYMBOL_LIST ) ) );
@@ -627,7 +629,7 @@ void SmMathConfig::SetSymbols( const std::vector< SmSym > &rNewSymbols )
// Set
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- OUString aTmp( rSymbol.GetSetName() );
+ OUString aTmp( rSymbol.GetSymbolSetName() );
if (rSymbol.IsPredefined())
aTmp = GetExportSymbolSetName( aTmp );
pVal->Value <<= aTmp;
diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx
index 77d00e2dca..be28437dd0 100644
--- a/starmath/source/cfgitem.hxx
+++ b/starmath/source/cfgitem.hxx
@@ -122,7 +122,7 @@ class SmMathConfig : public utl::ConfigItem
SmFormat * pFormat;
SmCfgOther * pOther;
SmFontFormatList * pFontFormatList;
- SmSymSetManager * pSymSetMgr;
+ SmSymbolManager * pSymbolMgr;
BOOL bIsOtherModified;
BOOL bIsFormatModified;
@@ -182,7 +182,7 @@ public:
//using utl::ConfigItem::ReplaceSetProperties;
//using utl::ConfigItem::GetReadOnlyStates;
- SmSymSetManager & GetSymSetManager();
+ SmSymbolManager & GetSymbolManager();
void GetSymbols( std::vector< SmSym > &rSymbols ) const;
void SetSymbols( const std::vector< SmSym > &rNewSymbols );
diff --git a/starmath/source/commands.src b/starmath/source/commands.src
index 0b42320ad7..8a84ec218d 100644
--- a/starmath/source/commands.src
+++ b/starmath/source/commands.src
@@ -223,6 +223,7 @@ String RID_LEFTARROW { Text = "leftarrow " ; };
String RID_RIGHTARROW { Text = "rightarrow " ; };
String RID_UPARROW { Text = "uparrow " ; };
String RID_DOWNARROW { Text = "downarrow " ; };
+String RID_NOSPACE { Text = "nospace {<?>} " ; };
//////////////////////////////////////////
@@ -1327,6 +1328,12 @@ Menu RID_COMMANDMENU
};
MenuItem
{
+ Identifier = RID_NOSPACE;
+ HelpId = HID_SMA_NOSPACE;
+ Text [ en-US ] = "nospace {...}";
+ };
+ MenuItem
+ {
Identifier = RID_BINOMXY;
HelpId = HID_SMA_BINOMXY;
Text = "binom x y";
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 52cd03109b..7ee8f0db0f 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -426,7 +426,7 @@ IMPL_LINK( SmFontSizeDialog, DefaultButtonClickHdl, Button *, EMPTYARG /*pButton
if (pQueryBox->Execute() == RET_YES)
{
- SmModule *pp = SM_MOD1();
+ SmModule *pp = SM_MOD();
SmFormat aFmt( pp->GetConfig()->GetStandardFormat() );
WriteTo( aFmt );
pp->GetConfig()->SetStandardFormat( aFmt );
@@ -533,7 +533,7 @@ IMPL_LINK_INLINE_START( SmFontTypeDialog, DefaultButtonClickHdl, Button *, EMPTY
QueryBox *pQueryBox = new QueryBox(this, SmResId(RID_DEFAULTSAVEQUERY));
if (pQueryBox->Execute() == RET_YES)
{
- SmModule *pp = SM_MOD1();
+ SmModule *pp = SM_MOD();
SmFormat aFmt( pp->GetConfig()->GetStandardFormat() );
WriteTo( aFmt );
pp->GetConfig()->SetStandardFormat( aFmt, TRUE );
@@ -579,7 +579,7 @@ SmFontTypeDialog::SmFontTypeDialog(Window * pParent, OutputDevice *pFntListDevic
void SmFontTypeDialog::ReadFrom(const SmFormat &rFormat)
{
- SmModule *pp = SM_MOD1();
+ SmModule *pp = SM_MOD();
aVariableFont = pp->GetConfig()->GetFontPickList(FNT_VARIABLE);
aFunctionFont = pp->GetConfig()->GetFontPickList(FNT_FUNCTION);
@@ -601,7 +601,7 @@ void SmFontTypeDialog::ReadFrom(const SmFormat &rFormat)
void SmFontTypeDialog::WriteTo(SmFormat &rFormat) const
{
- SmModule *pp = SM_MOD1();
+ SmModule *pp = SM_MOD();
pp->GetConfig()->GetFontPickList(FNT_VARIABLE) = aVariableFont;
pp->GetConfig()->GetFontPickList(FNT_FUNCTION) = aFunctionFont;
@@ -740,7 +740,7 @@ IMPL_LINK( SmDistanceDialog, DefaultButtonClickHdl, Button *, EMPTYARG /*pButton
if (pQueryBox->Execute() == RET_YES)
{
- SmModule *pp = SM_MOD1();
+ SmModule *pp = SM_MOD();
SmFormat aFmt( pp->GetConfig()->GetStandardFormat() );
WriteTo( aFmt );
pp->GetConfig()->SetStandardFormat( aFmt );
@@ -1063,7 +1063,7 @@ IMPL_LINK( SmAlignDialog, DefaultButtonClickHdl, Button *, EMPTYARG /*pButton*/
if (pQueryBox->Execute() == RET_YES)
{
- SmModule *pp = SM_MOD1();
+ SmModule *pp = SM_MOD();
SmFormat aFmt( pp->GetConfig()->GetStandardFormat() );
WriteTo( aFmt );
pp->GetConfig()->SetStandardFormat( aFmt );
@@ -1140,12 +1140,12 @@ void SmShowSymbolSet::Paint(const Rectangle&)
SetMapMode(MapMode(MAP_PIXEL));
USHORT v = sal::static_int_cast< USHORT >((aVScrollBar.GetThumbPos() * nColumns));
- USHORT nSymbols = aSymbolSet.GetCount();
+ size_t nSymbols = aSymbolSet.size();
Color aTxtColor( GetTextColor() );
for (USHORT i = v; i < nSymbols ; i++)
{
- SmSym aSymbol (aSymbolSet.GetSymbol(i));
+ SmSym aSymbol (*aSymbolSet[i]);
Font aFont (aSymbol.GetFace());
aFont.SetAlign(ALIGN_TOP);
@@ -1206,7 +1206,7 @@ void SmShowSymbolSet::KeyInput(const KeyEvent& rKEvt)
case KEY_LEFT: n -= 1; break;
case KEY_RIGHT: n += 1; break;
case KEY_HOME: n = 0; break;
- case KEY_END: n = aSymbolSet.GetCount() - 1; break;
+ case KEY_END: n = static_cast< USHORT >(aSymbolSet.size() - 1); break;
case KEY_PAGEUP: n -= nColumns * nRows; break;
case KEY_PAGEDOWN: n += nColumns * nRows; break;
@@ -1218,7 +1218,7 @@ void SmShowSymbolSet::KeyInput(const KeyEvent& rKEvt)
else
n = 0;
- if (n >= aSymbolSet.GetCount())
+ if (n >= aSymbolSet.size())
n = nSelectSymbol;
// adjust scrollbar
@@ -1274,13 +1274,13 @@ SmShowSymbolSet::SmShowSymbolSet(Window *pParent, const ResId& rResId) :
}
-void SmShowSymbolSet::SetSymbolSet(const SmSymSet& rSymbolSet)
+void SmShowSymbolSet::SetSymbolSet(const SymbolPtrVec_t& rSymbolSet)
{
aSymbolSet = rSymbolSet;
- if (aSymbolSet.GetCount() > (nColumns * nRows))
+ if (static_cast< USHORT >(aSymbolSet.size()) > (nColumns * nRows))
{
- aVScrollBar.SetRange(Range(0, ((aSymbolSet.GetCount() + (nColumns - 1)) / nColumns) - nRows));
+ aVScrollBar.SetRange(Range(0, ((aSymbolSet.size() + (nColumns - 1)) / nColumns) - nRows));
aVScrollBar.Enable(TRUE);
}
else
@@ -1302,10 +1302,10 @@ void SmShowSymbolSet::SelectSymbol(USHORT nSymbol)
((nSelectSymbol - v) / nColumns) * nLen),
Size(nLen, nLen)));
- if (nSymbol < aSymbolSet.GetCount())
+ if (nSymbol < aSymbolSet.size())
nSelectSymbol = nSymbol;
- if (aSymbolSet.GetCount() == 0)
+ if (aSymbolSet.size() == 0)
nSelectSymbol = SYMBOL_NONE;
if (nSelectSymbol != SYMBOL_NONE)
@@ -1380,9 +1380,10 @@ void SmSymbolDialog::FillSymbolSets(BOOL bDeleteText)
if (bDeleteText)
aSymbolSets.SetNoSelection();
- USHORT nNumSymSets = rSymSetMgr.GetSymbolSetCount();
- for (USHORT i = 0; i < nNumSymSets; i++)
- aSymbolSets.InsertEntry(rSymSetMgr.GetSymbolSet(i)->GetName());
+ std::set< String > aSybolSetNames( rSymbolMgr.GetSymbolSetNames() );
+ std::set< String >::const_iterator aIt( aSybolSetNames.begin() );
+ for ( ; aIt != aSybolSetNames.end(); ++aIt)
+ aSymbolSets.InsertEntry( *aIt );
}
@@ -1416,7 +1417,7 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, EMPTYARG pButton )
DBG_ASSERT(pButton == &aEditBtn, "Sm : falsches Argument");
#endif
- SmSymDefineDialog *pDialog = new SmSymDefineDialog(this, pFontListDev, rSymSetMgr);
+ SmSymDefineDialog *pDialog = new SmSymDefineDialog(this, pFontListDev, rSymbolMgr);
// aktuelles Symbol und SymbolSet am neuen Dialog setzen
const XubString aSymSetName (aSymbolSets.GetSelectEntry()),
@@ -1432,9 +1433,9 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, EMPTYARG pButton )
USHORT nSymPos = GetSelectedSymbol();
// Dialog an evtl geaenderte Daten des SymbolSet Manager anpassen
- if (pDialog->Execute() == RET_OK && rSymSetMgr.IsModified())
+ if (pDialog->Execute() == RET_OK && rSymbolMgr.IsModified())
{
- rSymSetMgr.Save();
+ rSymbolMgr.Save();
FillSymbolSets();
}
@@ -1442,7 +1443,16 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, EMPTYARG pButton )
// (soweit eines vorhanden ist)
if (!SelectSymbolSet(aOldSymbolSet) && aSymbolSets.GetEntryCount() > 0)
SelectSymbolSet(aSymbolSets.GetEntry(0));
-
+ else
+ {
+ // just update display of current symbol set
+ DBG_ASSERT( aSymSetName == aSymSetName, "unexpected change in symbol set name" );
+ aSymbolSet = rSymbolMgr.GetSymbolSet( aSymbolSetName );
+ aSymbolSetDisplay.SetSymbolSet( aSymbolSet );
+ }
+
+ if (nSymPos >= aSymbolSet.size())
+ nSymPos = static_cast< USHORT >(aSymbolSet.size()) - 1;
SelectSymbol( nSymPos );
delete pDialog;
@@ -1499,7 +1509,7 @@ IMPL_LINK_INLINE_END( SmSymbolDialog, CloseClickHdl, Button *, pButton )
SmSymbolDialog::SmSymbolDialog(Window *pParent, OutputDevice *pFntListDevice,
- SmSymSetManager &rMgr, SmViewShell &rViewShell, BOOL bFreeRes) :
+ SmSymbolManager &rMgr, SmViewShell &rViewShell, BOOL bFreeRes) :
ModalDialog (pParent, SmResId(RID_SYMBOLDIALOG)),
aSymbolSetText (this, SmResId(1)),
aSymbolSets (this, SmResId(1)),
@@ -1510,13 +1520,14 @@ SmSymbolDialog::SmSymbolDialog(Window *pParent, OutputDevice *pFntListDevice,
aCloseBtn (this, SmResId(3)),
aEditBtn (this, SmResId(1)),
rViewSh (rViewShell),
- rSymSetMgr (rMgr),
+ rSymbolMgr (rMgr),
pFontListDev (pFntListDevice)
{
if (bFreeRes)
FreeResource();
- pSymSet = NULL;
+ aSymbolSetName = String();
+ aSymbolSet.clear();
FillSymbolSets();
if (aSymbolSets.GetEntryCount() > 0)
SelectSymbolSet(aSymbolSets.GetEntry(0));
@@ -1580,18 +1591,17 @@ BOOL SmSymbolDialog::SelectSymbolSet(const XubString &rSymbolSetName)
BOOL bRet = FALSE;
USHORT nPos = aSymbolSets.GetEntryPos(rSymbolSetName);
- pSymSet = NULL;
+ aSymbolSetName = String();
+ aSymbolSet.clear();
if (nPos != LISTBOX_ENTRY_NOTFOUND)
{
aSymbolSets.SelectEntryPos(nPos);
- USHORT nSymbolSetNo = rSymSetMgr.GetSymbolSetPos(aSymbolSets.GetSelectEntry());
- pSymSet = rSymSetMgr.GetSymbolSet(nSymbolSetNo);
-#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(pSymSet, "Sm : NULL pointer");
-#endif
- aSymbolSetDisplay.SetSymbolSet(*pSymSet);
- if (pSymSet->GetCount() > 0)
+ aSymbolSetName = rSymbolSetName;
+ aSymbolSet = rSymbolMgr.GetSymbolSet( aSymbolSetName );
+
+ aSymbolSetDisplay.SetSymbolSet( aSymbolSet );
+ if (aSymbolSet.size() > 0)
SelectSymbol(0);
bRet = TRUE;
@@ -1606,8 +1616,8 @@ BOOL SmSymbolDialog::SelectSymbolSet(const XubString &rSymbolSetName)
void SmSymbolDialog::SelectSymbol(USHORT nSymbolNo)
{
const SmSym *pSym = NULL;
- if (pSymSet && nSymbolNo < pSymSet->GetCount())
- pSym = &pSymSet->GetSymbol(nSymbolNo);
+ if (aSymbolSetName.Len() > 0 && nSymbolNo < static_cast< USHORT >(aSymbolSet.size()))
+ pSym = aSymbolSet[ nSymbolNo ];
aSymbolSetDisplay.SelectSymbol(nSymbolNo);
aSymbolDisplay.SetSymbol(pSym);
@@ -1618,7 +1628,8 @@ void SmSymbolDialog::SelectSymbol(USHORT nSymbolNo)
const SmSym * SmSymbolDialog::GetSymbol() const
{
USHORT nSymbolNo = aSymbolSetDisplay.GetSelectSymbol();
- return pSymSet == NULL ? NULL : &pSymSet->GetSymbol(nSymbolNo);
+ bool bValid = aSymbolSetName.Len() > 0 && nSymbolNo < static_cast< USHORT >(aSymbolSet.size());
+ return bValid ? aSymbolSet[ nSymbolNo ] : NULL;
}
@@ -1678,15 +1689,10 @@ void SmSymDefineDialog::FillSymbols(ComboBox &rComboBox, BOOL bDeleteText)
if (bDeleteText)
rComboBox.SetText(XubString());
- ComboBox &rSymbolSets = &rComboBox == &aOldSymbols ?
- aOldSymbolSets : aSymbolSets;
- const SmSymSet *pSymSet = GetSymbolSet(rSymbolSets);
- if (pSymSet)
- { USHORT nNumSymbols = pSymSet->GetCount();
- for (USHORT i = 0; i < nNumSymbols; i++)
- rComboBox.InsertEntry(pSymSet->GetSymbol(i).GetName());
- }
-
+ ComboBox &rBox = &rComboBox == &aOldSymbols ? aOldSymbolSets : aSymbolSets;
+ SymbolPtrVec_t aSymSet( aSymbolMgrCopy.GetSymbolSet( rBox.GetText() ) );
+ for (size_t i = 0; i < aSymSet.size(); ++i)
+ rComboBox.InsertEntry( aSymSet[i]->GetName() );
}
@@ -1701,9 +1707,10 @@ void SmSymDefineDialog::FillSymbolSets(ComboBox &rComboBox, BOOL bDeleteText)
if (bDeleteText)
rComboBox.SetText(XubString());
- USHORT nNumSymSets = aSymSetMgrCopy.GetSymbolSetCount();
- for (USHORT i = 0; i < nNumSymSets; i++)
- rComboBox.InsertEntry(aSymSetMgrCopy.GetSymbolSet(i)->GetName());
+ const std::set< String > aSymbolSetNames( aSymbolMgrCopy.GetSymbolSetNames() );
+ std::set< String >::const_iterator aIt( aSymbolSetNames.begin() );
+ for ( ; aIt != aSymbolSetNames.end(); ++aIt)
+ rComboBox.InsertEntry( *aIt );
}
@@ -1748,26 +1755,13 @@ void SmSymDefineDialog::FillStyles(BOOL bDeleteText)
}
-SmSymSet * SmSymDefineDialog::GetSymbolSet(const ComboBox &rComboBox)
-{
-#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(&rComboBox == &aOldSymbolSets || &rComboBox == &aSymbolSets,
- "Sm : falsche ComboBox");
-#endif
- USHORT nSymbolSetNo = aSymSetMgrCopy.GetSymbolSetPos(rComboBox.GetText());
-
- return nSymbolSetNo == SYMBOLSET_NONE ?
- NULL : aSymSetMgrCopy.GetSymbolSet(nSymbolSetNo);
-}
-
-
SmSym * SmSymDefineDialog::GetSymbol(const ComboBox &rComboBox)
{
#if OSL_DEBUG_LEVEL > 1
DBG_ASSERT(&rComboBox == &aOldSymbols || &rComboBox == &aSymbols,
"Sm : falsche ComboBox");
#endif
- return aSymSetMgrCopy.GetSymbolByName(rComboBox.GetText());
+ return aSymbolMgrCopy.GetSymbolByName(rComboBox.GetText());
}
@@ -1897,32 +1891,23 @@ IMPL_LINK( SmSymDefineDialog, AddClickHdl, Button *, EMPTYARG pButton )
DBG_ASSERT(aAddBtn.IsEnabled(), "Sm : Voraussetzungen erfuellt ??");
#endif
- SmSymSet *pSymSet = GetSymbolSet(aSymbolSets);
-
- // SymbolSet einfuegen falls es noch nicht existiert
- if (!pSymSet)
- {
- pSymSet = new SmSymSet(aSymbolSets.GetText());
- aSymSetMgrCopy.AddSymbolSet(pSymSet);
- FillSymbolSets(aOldSymbolSets, FALSE);
- FillSymbolSets(aSymbolSets, FALSE);
- }
-#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(pSymSet, "Sm : NULL pointer");
-#endif
-
- // Symbol ins SymbolSet einfuegen
+ // add symbol
// TO_DO_UCS4 (#i74049): get rid of cast without loosing UCS4 functionality
- SmSym *pSym = new SmSym(aSymbols.GetText(), aCharsetDisplay.GetFont(),
- sal::static_int_cast< sal_Unicode >(aCharsetDisplay.GetSelectCharacter()),
- aSymbolSets.GetText());
- pSymSet->AddSymbol(pSym);
-
- // update der Hash Tabelle erzwingen (damit aAddBtn disabled wird).
- // (wird spaeter nach Ueberarbeitung von symbol.cxx ueberfluessig werden).
- aSymSetMgrCopy.ChangeSymbolSet((SmSymSet *)1);
-
- // Symbolliste aktualiseren
+ const SmSym aNewSymbol( aSymbols.GetText(), aCharsetDisplay.GetFont(),
+ sal::static_int_cast< sal_Unicode >( aCharsetDisplay.GetSelectCharacter() ),
+ aSymbolSets.GetText() );
+ //DBG_ASSERT( aSymbolMgrCopy.GetSymbolByName(aTmpSymbolName) == NULL, "symbol already exists" );
+ aSymbolMgrCopy.AddOrReplaceSymbol( aNewSymbol );
+
+ // update display of new symbol
+ aSymbolDisplay.SetChar( aNewSymbol.GetCharacter() );
+ aSymbolDisplay.SetFont( aNewSymbol.GetFace() );
+ aSymbolName.SetText( aNewSymbol.GetName() );
+ aSymbolSetName.SetText( aNewSymbol.GetSymbolSetName() );
+
+ // update list box entries
+ FillSymbolSets(aOldSymbolSets, FALSE);
+ FillSymbolSets(aSymbolSets, FALSE);
FillSymbols(aOldSymbols ,FALSE);
FillSymbols(aSymbols ,FALSE);
@@ -1940,62 +1925,37 @@ IMPL_LINK( SmSymDefineDialog, ChangeClickHdl, Button *, EMPTYARG pButton )
DBG_ASSERT(aChangeBtn.IsEnabled(), "Sm : Voraussetzungen erfuellt ??");
#endif
- // finden des SymbolSets zum alten Symbol
- SmSymSet *pOldSymSet = GetSymbolSet(aOldSymbolSets);
-#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(pOldSymSet, "Sm : NULL pointer");
-#endif
-
- // suchen des neuen SymbolSets
- SmSymSet *pNewSymSet = GetSymbolSet(aSymbolSets);
- // SymbolSet einfuegen falls es noch nicht existiert
- if (!pNewSymSet)
- {
- pNewSymSet = new SmSymSet(aSymbolSets.GetText());
- aSymSetMgrCopy.AddSymbolSet(pNewSymSet);
- FillSymbolSets(aOldSymbolSets, FALSE);
- FillSymbolSets(aSymbolSets, FALSE);
- }
-
- // das (alte) Symbol besorgen
- USHORT nSymbol = pOldSymSet->GetSymbolPos(aOldSymbols.GetText());
- SmSym *pSym = (SmSym *) &pOldSymSet->GetSymbol(nSymbol);
-#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT( SYMBOL_NONE != nSymbol, "symbol not found" );
- DBG_ASSERT(pSym, "Sm : NULL pointer");
-#endif
-
- // apply changes
- pSym->SetName( aSymbols.GetText() );
- //! get font from symbol-display since charset-display does not keep
+ // get new Sybol to use
+ //! get font from symbol-disp lay since charset-display does not keep
//! the bold attribut.
- pSym->SetFace( aSymbolDisplay.GetFont() );
// TO_DO_UCS4 (#i74049): get rid of cast without loosing UCS4 functionality
- pSym->SetCharacter( sal::static_int_cast< sal_Unicode >(aCharsetDisplay.GetSelectCharacter()) );
-
- // das SymbolSet wechseln wenn noetig
- if (pOldSymSet != pNewSymSet)
- {
- pNewSymSet->AddSymbol( new SmSym( *pSym ) );
- pOldSymSet->DeleteSymbol(nSymbol);
-
- //
- // update controls
- //
- // actualize symbol-lists in the dialog
- String aTmpOldSymbolName( pOrigSymbol->GetName() );
- aOldSymbols.SetText( String() );
- aOldSymbols.RemoveEntry( aTmpOldSymbolName );
- if (aSymbolSets.GetText() == aOldSymbolSets.GetText())
- aSymbols.RemoveEntry( aTmpOldSymbolName );
- // clear display for original symbol
+ const SmSym aNewSymbol( aSymbols.GetText(), aCharsetDisplay.GetFont(),
+ sal::static_int_cast< sal_Unicode >( aCharsetDisplay.GetSelectCharacter() ),
+ aSymbolSets.GetText() );
+
+ // remove old symbol if the name was changed then add new one
+// const bool bSetNameChanged = aOldSymbolSets.GetText() != aSymbolSets.GetText();
+ const bool bNameChanged = aOldSymbols.GetText() != aSymbols.GetText();
+ if (bNameChanged)
+ aSymbolMgrCopy.RemoveSymbol( aOldSymbols.GetText() );
+ aSymbolMgrCopy.AddOrReplaceSymbol( aNewSymbol, true );
+
+ // clear display for original symbol if necessary
+ if (bNameChanged)
SetOrigSymbol(NULL, XubString());
- }
-
- //!! den SymbolSet Manger dazu zwingen seinen HashTable zu aktualisieren,
- //!! um mit moeglich neuen bzw fehlenden alten Symbol Namen konform zu sein.
- aSymSetMgrCopy.ChangeSymbolSet((SmSymSet *)1);
+ // update display of new symbol
+ aSymbolDisplay.SetChar( aNewSymbol.GetCharacter() );
+ aSymbolDisplay.SetFont( aNewSymbol.GetFace() );
+ aSymbolName.SetText( aNewSymbol.GetName() );
+ aSymbolSetName.SetText( aNewSymbol.GetSymbolSetName() );
+
+ // update list box entries
+ FillSymbolSets(aOldSymbolSets, FALSE);
+ FillSymbolSets(aSymbolSets, FALSE);
+ FillSymbols(aOldSymbols ,FALSE);
+ FillSymbols(aSymbols ,FALSE);
+
UpdateButtons();
return 0;
@@ -2012,33 +1972,16 @@ IMPL_LINK( SmSymDefineDialog, DeleteClickHdl, Button *, EMPTYARG pButton )
if (pOrigSymbol)
{
- // loeschen des Symbols:
- //
- // zugehoeriges SymbolSet finden
- SmSymSet *pSymSet = GetSymbolSet(aOldSymbolSets);
- // finden des Index
- XubString aTmpOldSymbolName (pOrigSymbol->GetName());
- USHORT nSymbolNo = pSymSet->GetSymbolPos(aTmpOldSymbolName);
- // Bezuege auf das Symbols loeschen
+ aSymbolMgrCopy.RemoveSymbol( pOrigSymbol->GetName() );
+
+ // clear display for original symbol
SetOrigSymbol(NULL, XubString());
- // und weg mit dem Symbol
- pSymSet->DeleteSymbol(nSymbolNo);
-#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT(pSymSet, "Sm : NULL pointer");
- DBG_ASSERT(nSymbolNo != SYMBOL_NONE, "Sm : kein Symbol");
-#endif
- //!! den SymbolSet Manger dazu zwingen seinen HashTable zu aktualisieren,
- //!! was er naemlich nicht tut, wenn in einem seiner SymbolSets geaendert/
- //!! geloescht wird, was wiederum zu einem Absturz fuehren kann (wenn er
- //!! ueber ein nicht mehr existentes aber nicht entferntes Symbol iteriert).
- aSymSetMgrCopy.ChangeSymbolSet((SmSymSet *)1);
-
- // aktualisieren der Symboleintraege des Dialogs
- aOldSymbols.SetText(XubString());
- aOldSymbols.RemoveEntry(aTmpOldSymbolName);
- if (aSymbolSets.GetText() == aOldSymbolSets.GetText())
- aSymbols.RemoveEntry(aTmpOldSymbolName);
+ // update list box entries
+ FillSymbolSets(aOldSymbolSets, FALSE);
+ FillSymbolSets(aSymbolSets, FALSE);
+ FillSymbols(aOldSymbols ,FALSE);
+ FillSymbols(aSymbols ,FALSE);
}
UpdateButtons();
@@ -2070,7 +2013,7 @@ void SmSymDefineDialog::UpdateButtons()
&& aCharsetDisplay.GetSelectCharacter() == pOrigSymbol->GetCharacter();
// hinzufuegen nur wenn es noch kein Symbol desgleichen Namens gibt
- bAdd = aSymSetMgrCopy.GetSymbolByName(aTmpSymbolName) == NULL;
+ bAdd = aSymbolMgrCopy.GetSymbolByName(aTmpSymbolName) == NULL;
// loeschen nur wenn alle Einstellungen gleich sind
bDelete = pOrigSymbol != NULL;
@@ -2078,9 +2021,12 @@ void SmSymDefineDialog::UpdateButtons()
// aendern wenn bei gleichem Namen mindestens eine Einstellung anders ist
// oder wenn es noch kein Symbol des neuen Namens gibt (wuerde implizites
// loeschen des bereits vorhandenen Symbols erfordern)
- BOOL bEqualName = pOrigSymbol && aTmpSymbolName == pOrigSymbol->GetName();
- bChange = pOrigSymbol && ( (bEqualName && !bEqual) || (!bEqualName && bAdd) );
- }
+// BOOL bEqualName = pOrigSymbol && aTmpSymbolName == pOrigSymbol->GetName();
+// bChange = pOrigSymbol && ( (bEqualName && !bEqual) || (!bEqualName && bAdd) );
+
+ // aendern nur falls altes Symbol vorhanden und am neuen etwas anders ist
+ bChange = pOrigSymbol && !bEqual;
+}
aAddBtn .Enable(bAdd);
aChangeBtn.Enable(bChange);
@@ -2089,7 +2035,7 @@ void SmSymDefineDialog::UpdateButtons()
SmSymDefineDialog::SmSymDefineDialog(Window * pParent,
- OutputDevice *pFntListDevice, SmSymSetManager &rMgr, BOOL bFreeRes) :
+ OutputDevice *pFntListDevice, SmSymbolManager &rMgr, BOOL bFreeRes) :
ModalDialog (pParent, SmResId(RID_SYMDEFINEDIALOG)),
aOldSymbolText (this, SmResId(1)),
aOldSymbols (this, SmResId(1)),
@@ -2120,7 +2066,7 @@ SmSymDefineDialog::SmSymDefineDialog(Window * pParent,
aRightArrow (this, SmResId(1)),
aRigthArrow_Im (SmResId(1)),
aRigthArrow_Im_HC (SmResId(2)), // hi-contrast version
- rSymSetMgr (rMgr),
+ rSymbolMgr (rMgr),
pSubsetMap (NULL),
pFontList (NULL)
{
@@ -2131,9 +2077,10 @@ SmSymDefineDialog::SmSymDefineDialog(Window * pParent,
pOrigSymbol = 0;
- // make autocompletion for symbols case-sensitive
- aOldSymbols.EnableAutocomplete(TRUE, TRUE);
- aSymbols .EnableAutocomplete(TRUE, TRUE);
+ // auto completion is troublesome since that symbols character also gets automatically selected in the
+ // display and if the user previously selected a character to define/redefine that one this is bad
+ aOldSymbols.EnableAutocomplete( FALSE, TRUE );
+ aSymbols .EnableAutocomplete( FALSE, TRUE );
FillFonts();
if (aFonts.GetEntryCount() > 0)
@@ -2141,7 +2088,7 @@ SmSymDefineDialog::SmSymDefineDialog(Window * pParent,
InitColor_Impl();
- SetSymbolSetManager(rSymSetMgr);
+ SetSymbolSetManager(rSymbolMgr);
aOldSymbols .SetSelectHdl(LINK(this, SmSymDefineDialog, OldSymbolChangeHdl));
aOldSymbolSets .SetSelectHdl(LINK(this, SmSymDefineDialog, OldSymbolSetChangeHdl));
@@ -2215,41 +2162,23 @@ short SmSymDefineDialog::Execute()
short nResult = ModalDialog::Execute();
// Aenderungen uebernehmen falls Dialog mit OK beendet wurde
- if (aSymSetMgrCopy.IsModified() && nResult == RET_OK)
- {
- // leere SymbolSets aus dem Ergebnis entfernen.
- // Dabei von hinten durch das array iterieren, da beim loeschen die
- // Elemente aufruecken.
- USHORT nSymbolSets = aSymSetMgrCopy.GetSymbolSetCount();
- for (USHORT i = 0; i < nSymbolSets; i++)
- {
- USHORT nIdx = nSymbolSets - 1 - i;
- if (aSymSetMgrCopy.GetSymbolSet(nIdx)->GetCount() == 0)
- aSymSetMgrCopy.DeleteSymbolSet(nIdx);
- }
-
-
-
- rSymSetMgr = aSymSetMgrCopy;
-#ifdef DEBUG
-// USHORT nS = rSymSetMgr.GetSymbolSetCount();
-#endif
- }
+ if (aSymbolMgrCopy.IsModified() && nResult == RET_OK)
+ rSymbolMgr = aSymbolMgrCopy;
return nResult;
}
-void SmSymDefineDialog::SetSymbolSetManager(const SmSymSetManager &rMgr)
+void SmSymDefineDialog::SetSymbolSetManager(const SmSymbolManager &rMgr)
{
- aSymSetMgrCopy = rMgr;
+ aSymbolMgrCopy = rMgr;
#ifdef DEBUG
-// USHORT nS = aSymSetMgrCopy.GetSymbolSetCount();
+// USHORT nS = aSymbolMgrCopy.GetSymbolSetCount();
#endif
// Das modified Flag der Kopie auf FALSE setzen, damit man spaeter damit
// testen kann ob sich was geaendert hat.
- aSymSetMgrCopy.SetModified(FALSE);
+ aSymbolMgrCopy.SetModified(FALSE);
FillSymbolSets(aOldSymbolSets);
if (aOldSymbolSets.GetEntryCount() > 0)
@@ -2404,13 +2333,13 @@ BOOL SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
{
// bei Wechsel des alten Symbols nur vorhandene anzeigen sonst keins
const SmSym *pOldSymbol = NULL;
- XubString aTMpOldSymbolSetName;
+ XubString aTmpOldSymbolSetName;
if (nPos != COMBOBOX_ENTRY_NOTFOUND)
{
- pOldSymbol = aSymSetMgrCopy.GetSymbolByName(aNormName);
- aTMpOldSymbolSetName = aOldSymbolSets.GetText();
+ pOldSymbol = aSymbolMgrCopy.GetSymbolByName(aNormName);
+ aTmpOldSymbolSetName = aOldSymbolSets.GetText();
}
- SetOrigSymbol(pOldSymbol, aTMpOldSymbolSetName);
+ SetOrigSymbol(pOldSymbol, aTmpOldSymbolSetName);
}
else
aSymbolName.SetText(rComboBox.GetText());
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index c4c1af898e..ee2a552eef 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -143,8 +143,8 @@ void SmDocShell::LoadSymbols()
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::LoadSymbols" );
- SmModule *pp = SM_MOD1();
- pp->GetSymSetManager().Load();
+ SmModule *pp = SM_MOD();
+ pp->GetSymbolManager().Load();
}
@@ -274,7 +274,7 @@ void SmDocShell::ArrangeFormula()
pOutDev = &pView->GetGraphicWindow();
else
{
- pOutDev = &SM_MOD1()->GetDefaultVirtualDev();
+ pOutDev = &SM_MOD()->GetDefaultVirtualDev();
pOutDev->SetMapMode( MapMode(MAP_100TH_MM) );
}
}
@@ -608,7 +608,7 @@ Printer* SmDocShell::GetPrt()
SID_NO_RIGHT_SPACES, SID_NO_RIGHT_SPACES,
0);
- SmModule *pp = SM_MOD1();
+ SmModule *pp = SM_MOD();
pp->GetConfig()->ConfigToItemSet(*pOptions);
pPrinter = new SfxPrinter(pOptions);
pPrinter->SetMapMode( MapMode(MAP_100TH_MM) );
@@ -690,7 +690,7 @@ SmDocShell::SmDocShell( const sal_uInt64 i_nSfxCreationFlags ) :
SetPool(&SFX_APP()->GetPool());
- SmModule *pp = SM_MOD1();
+ SmModule *pp = SM_MOD();
aFormat = pp->GetConfig()->GetStandardFormat();
StartListening(aFormat);
@@ -705,7 +705,7 @@ SmDocShell::~SmDocShell()
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::~SmDocShell" );
- SmModule *pp = SM_MOD1();
+ SmModule *pp = SM_MOD();
EndListening(aFormat);
EndListening(*pp->GetConfig());
@@ -1001,7 +1001,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
case SID_AUTO_REDRAW :
{
- SmModule *pp = SM_MOD1();
+ SmModule *pp = SM_MOD();
BOOL bRedraw = pp->GetConfig()->IsAutoRedraw();
pp->GetConfig()->SetAutoRedraw(!bRedraw);
}
@@ -1020,7 +1020,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
// get device used to retrieve the FontList
OutputDevice *pDev = GetPrinter();
if (!pDev || pDev->GetDevFontCount() == 0)
- pDev = &SM_MOD1()->GetDefaultVirtualDev();
+ pDev = &SM_MOD()->GetDefaultVirtualDev();
DBG_ASSERT (pDev, "device for font list missing" );
SmFontTypeDialog *pFontTypeDialog = new SmFontTypeDialog( NULL, pDev );
@@ -1104,7 +1104,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
pAlignDialog->WriteTo(aNewFormat);
- SmModule *pp = SM_MOD1();
+ SmModule *pp = SM_MOD();
SmFormat aFmt( pp->GetConfig()->GetStandardFormat() );
pAlignDialog->WriteTo( aFmt );
pp->GetConfig()->SetStandardFormat( aFmt );
@@ -1201,7 +1201,7 @@ void SmDocShell::GetState(SfxItemSet &rSet)
case SID_AUTO_REDRAW :
{
- SmModule *pp = SM_MOD1();
+ SmModule *pp = SM_MOD();
BOOL bRedraw = pp->GetConfig()->IsAutoRedraw();
rSet.Put(SfxBoolItem(SID_AUTO_REDRAW, bRedraw));
@@ -1290,8 +1290,8 @@ void SmDocShell::SaveSymbols()
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SaveSymbols" );
- SmModule *pp = SM_MOD1();
- pp->GetSymSetManager().Save();
+ SmModule *pp = SM_MOD();
+ pp->GetSymbolManager().Save();
}
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index 20e9b35a55..f6add289ba 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -113,14 +113,13 @@ SmEditWindow::SmEditWindow( SmCmdBoxWindow &rMyCmdBoxWin ) :
// Even RTL languages don't use RTL for math
rCmdBox.GetEditWindow()->EnableRTL( FALSE );
- ApplyColorConfigValues( SM_MOD1()->GetColorConfig() );
+ ApplyColorConfigValues( SM_MOD()->GetColorConfig() );
// compare DataChanged
SetBackground( GetSettings().GetStyleSettings().GetWindowColor() );
aModifyTimer.SetTimeoutHdl(LINK(this, SmEditWindow, ModifyTimerHdl));
- aModifyTimer.SetTimeout(2000);
- aModifyTimer.Start();
+ aModifyTimer.SetTimeout(500);
aCursorMoveTimer.SetTimeoutHdl(LINK(this, SmEditWindow, CursorMoveTimerHdl));
aCursorMoveTimer.SetTimeout(500);
@@ -216,7 +215,7 @@ void SmEditWindow::DataChanged( const DataChangedEvent& )
{
const StyleSettings aSettings( GetSettings().GetStyleSettings() );
- ApplyColorConfigValues( SM_MOD1()->GetColorConfig() );
+ ApplyColorConfigValues( SM_MOD()->GetColorConfig() );
SetBackground( aSettings.GetWindowColor() );
// edit fields in other Applications use this font instead of
@@ -250,10 +249,9 @@ void SmEditWindow::DataChanged( const DataChangedEvent& )
IMPL_LINK( SmEditWindow, ModifyTimerHdl, Timer *, EMPTYARG /*pTimer*/ )
{
- SmModule *pp = SM_MOD1();
+ SmModule *pp = SM_MOD();
if (pp->GetConfig()->IsAutoRedraw())
Flush();
- aModifyTimer.Start();
return 0;
}
@@ -882,7 +880,10 @@ void SmEditWindow::Cut()
{
DBG_ASSERT( pEditView, "EditView missing" );
if (pEditView)
+ {
pEditView->Cut();
+ GetDoc()->SetModified( TRUE );
+ }
}
void SmEditWindow::Copy()
@@ -896,14 +897,20 @@ void SmEditWindow::Paste()
{
DBG_ASSERT( pEditView, "EditView missing" );
if (pEditView)
+ {
pEditView->Paste();
+ GetDoc()->SetModified( TRUE );
+ }
}
void SmEditWindow::Delete()
{
DBG_ASSERT( pEditView, "EditView missing" );
if (pEditView)
+ {
pEditView->DeleteSelected();
+ GetDoc()->SetModified( TRUE );
+ }
}
void SmEditWindow::InsertText(const String& Text)
diff --git a/starmath/source/makefile.mk b/starmath/source/makefile.mk
index eda4d91083..596060397e 100644
--- a/starmath/source/makefile.mk
+++ b/starmath/source/makefile.mk
@@ -48,32 +48,32 @@ SRC2FILES = smres.src \
commands.src
SLO1FILES = \
- $(SLO)$/register.obj \
- $(SLO)$/typemap.obj \
+ $(SLO)$/accessibility.obj \
+ $(SLO)$/edit.obj \
+ $(SLO)$/eqnolefilehdr.obj \
+ $(SLO)$/mathmlexport.obj \
+ $(SLO)$/mathmlimport.obj \
$(SLO)$/symbol.obj \
- $(SLO)$/toolbox.obj \
+ $(SLO)$/types.obj \
+ $(SLO)$/unodoc.obj \
$(SLO)$/action.obj \
- $(SLO)$/accessibility.obj \
$(SLO)$/cfgitem.obj \
$(SLO)$/config.obj \
$(SLO)$/dialog.obj \
$(SLO)$/document.obj \
- $(SLO)$/mathtype.obj \
- $(SLO)$/mathmlimport.obj \
- $(SLO)$/mathmlexport.obj \
$(SLO)$/format.obj \
+ $(SLO)$/mathtype.obj \
$(SLO)$/node.obj \
$(SLO)$/parse.obj \
- $(SLO)$/utility.obj \
+ $(SLO)$/register.obj \
$(SLO)$/smdll.obj \
+ $(SLO)$/toolbox.obj \
+ $(SLO)$/typemap.obj \
$(SLO)$/smmod.obj \
- $(SLO)$/types.obj \
- $(SLO)$/view.obj \
- $(SLO)$/edit.obj \
+ $(SLO)$/utility.obj \
$(SLO)$/rect.obj \
$(SLO)$/unomodel.obj \
- $(SLO)$/unodoc.obj \
- $(SLO)$/eqnolefilehdr.obj
+ $(SLO)$/view.obj
SLO2FILES = \
$(SLO)$/register.obj \
@@ -88,6 +88,7 @@ EXCEPTIONSFILES = \
$(SLO)$/register.obj \
$(SLO)$/accessibility.obj \
$(SLO)$/cfgitem.obj \
+ $(SLO)$/dialog.obj \
$(SLO)$/document.obj \
$(SLO)$/node.obj \
$(SLO)$/parse.obj \
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 16b3495a1f..d0991d8153 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -115,7 +115,7 @@ Color SmTmpDevice::Impl_GetColor( const Color& rColor )
if (OUTDEV_WINDOW == rOutDev.GetOutDevType())
aBgCol = ((Window &) rOutDev).GetDisplayBackground().GetColor();
- nNewCol = SM_MOD1()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor;
+ nNewCol = SM_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor;
Color aTmpColor( nNewCol );
if (aBgCol.IsDark() && aTmpColor.IsDark())
@@ -831,8 +831,9 @@ void SmLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
return;
// make distance depend on font size
- long nDist = +(rFormat.GetDistance(DIS_HORIZONTAL)
- * GetFont().GetSize().Height()) / 100L;
+ long nDist = (rFormat.GetDistance(DIS_HORIZONTAL) * GetFont().GetSize().Height()) / 100L;
+ if (!IsUseExtraSpaces())
+ nDist = 0;
Point aPos;
for (i = 0; i < nSize; i++)
@@ -2803,9 +2804,9 @@ void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell
SmNode::Prepare(rFormat, rDocShell);
const SmSym *pSym;
- SmModule *pp = SM_MOD1();
+ SmModule *pp = SM_MOD();
- if (NULL != (pSym = pp->GetSymSetManager().GetSymbolByName(GetToken().aText)))
+ if (NULL != (pSym = pp->GetSymbolManager().GetSymbolByName(GetToken().aText)))
{
SetText( pSym->GetCharacter() );
GetFont() = pSym->GetFace();
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 072ccb2038..7a78ee5579 100644..100755
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -242,12 +242,13 @@ static const SmTokenTableEntry aTokenTable[] =
{ "ni", TNI, MS_NI, TGRELATION, 0},
{ "nitalic", TNITALIC, '\0', TGFONTATTR, 5},
{ "none", TNONE, '\0', TGLBRACES | TGRBRACES, 0},
+ { "nospace", TNOSPACE, '\0', TGSTANDALONE, 5},
{ "notin", TNOTIN, MS_NOTIN, TGRELATION, 0},
+ { "nroot", TNROOT, MS_SQRT, TGUNOPER, 5},
{ "nsubset", TNSUBSET, MS_NSUBSET, TGRELATION, 0 },
{ "nsupset", TNSUPSET, MS_NSUPSET, TGRELATION, 0 },
{ "nsubseteq", TNSUBSETEQ, MS_NSUBSETEQ, TGRELATION, 0 },
{ "nsupseteq", TNSUPSETEQ, MS_NSUPSETEQ, TGRELATION, 0 },
- { "nroot", TNROOT, MS_SQRT, TGUNOPER, 5},
{ "odivide", TODIVIDE, MS_ODIVIDE, TGPRODUCT, 0},
{ "odot", TODOT, MS_ODOT, TGPRODUCT, 0},
{ "ominus", TOMINUS, MS_OMINUS, TGSUM, 0},
@@ -380,7 +381,7 @@ BOOL SmParser::IsDelimiter( const String &rTxt, xub_StrLen nPos )
BOOL bIsDelim = *pDelim != 0;
- INT16 nTypJp = SM_MOD1()->GetSysLocale().GetCharClass().getType( rTxt, nPos );
+ INT16 nTypJp = SM_MOD()->GetSysLocale().GetCharClass().getType( rTxt, nPos );
bIsDelim |= nTypJp == com::sun::star::i18n::UnicodeType::SPACE_SEPARATOR ||
nTypJp == com::sun::star::i18n::UnicodeType::CONTROL;
@@ -438,7 +439,7 @@ void SmParser::NextToken()
xub_StrLen nRealStart;
BOOL bCont;
BOOL bNumStart = FALSE;
- CharClass aCC(SM_MOD1()->GetSysLocale().GetCharClass().getLocale());
+ CharClass aCC(SM_MOD()->GetSysLocale().GetCharClass().getLocale());
do
{
// skip white spaces
@@ -731,7 +732,7 @@ void SmParser::NextToken()
xub_StrLen nTmpStart = sal::static_int_cast< xub_StrLen >(rnEndPos +
aTmpRes.LeadingWhiteSpace);
- // default setting fo the case that no identifier
+ // default setting for the case that no identifier
// i.e. a valid symbol-name is following the '%'
// character
CurToken.eType = TTEXT;
@@ -1132,6 +1133,16 @@ void SmParser::Line()
void SmParser::Expression()
{
+ BOOL bUseExtraSpaces = TRUE;
+ SmNode *pNode = NodeStack.Pop();
+ if (pNode)
+ {
+ if (pNode->GetToken().eType == TNOSPACE)
+ bUseExtraSpaces = FALSE;
+ else
+ NodeStack.Push(pNode); // push the node from above again (now to be used as argument to this current 'nospace' node)
+ }
+
USHORT n = 0;
SmNodeArray RelationArray;
@@ -1147,8 +1158,9 @@ void SmParser::Expression()
RelationArray[n - 1] = NodeStack.Pop();
}
- SmStructureNode *pSNode = new SmExpressionNode(CurToken);
+ SmExpressionNode *pSNode = new SmExpressionNode(CurToken);
pSNode->SetSubNodes(RelationArray);
+ pSNode->SetUseExtraSpaces(bUseExtraSpaces);
NodeStack.Push(pSNode);
}
@@ -1270,7 +1282,7 @@ void SmParser::SubSup(ULONG nActiveGroup)
return;
SmSubSupNode *pNode = new SmSubSupNode(CurToken);
- //! Of course 'CurToken' ist just the first sub-/supscript token.
+ //! Of course 'CurToken' is just the first sub-/supscript token.
//! It should be of no further interest. The positions of the
//! sub-/supscripts will be identified by the corresponding subnodes
//! index in the 'aSubNodes' array (enum value from 'SmSubSup').
@@ -1362,7 +1374,7 @@ void SmParser::Blank()
// Blanks am Zeilenende ignorieren wenn die entsprechende Option gesetzt ist
if ( CurToken.eType == TNEWLINE ||
- (CurToken.eType == TEND && SM_MOD1()->GetConfig()->IsIgnoreSpacesRight()) )
+ (CurToken.eType == TEND && SM_MOD()->GetConfig()->IsIgnoreSpacesRight()) )
{
pBlankNode->Clear();
}
@@ -1374,30 +1386,51 @@ void SmParser::Blank()
void SmParser::Term()
{
switch (CurToken.eType)
- { case TESCAPE :
+ {
+ case TESCAPE :
Escape();
break;
+ case TNOSPACE :
case TLGROUP :
- NextToken();
-
- // allow for empty group
- if (CurToken.eType == TRGROUP)
- { SmStructureNode *pSNode = new SmExpressionNode(CurToken);
- pSNode->SetSubNodes(NULL, NULL);
- NodeStack.Push(pSNode);
-
+ {
+ bool bNoSpace = CurToken.eType == TNOSPACE;
+ if (bNoSpace) // push 'no space' node and continue to parse expression
+ {
+ NodeStack.Push(new SmExpressionNode(CurToken));
NextToken();
}
- else // go as usual
- { Align();
- if (CurToken.eType != TRGROUP)
- Error(PE_RGROUP_EXPECTED);
- else
- { NextToken();
+ if (CurToken.eType != TLGROUP)
+ {
+ NodeStack.Pop(); // get rid of the 'no space' node pushed above
+ Term();
+ }
+ else
+ {
+ NextToken();
+
+ // allow for empty group
+ if (CurToken.eType == TRGROUP)
+ {
+ if (bNoSpace) // get rid of the 'no space' node pushed above
+ NodeStack.Pop();
+ SmStructureNode *pSNode = new SmExpressionNode(CurToken);
+ pSNode->SetSubNodes(NULL, NULL);
+ NodeStack.Push(pSNode);
+
+ NextToken();
+ }
+ else // go as usual
+ {
+ Align();
+ if (CurToken.eType != TRGROUP)
+ Error(PE_RGROUP_EXPECTED);
+ else
+ NextToken();
}
}
- break;
+ }
+ break;
case TLEFT :
Brace();
@@ -2286,13 +2319,13 @@ void SmParser::Special()
// UI uses localized names XML file format does not.)
if (IsImportSymbolNames())
{
- const SmLocalizedSymbolData &rLSD = SM_MOD1()->GetLocSymbolData();
+ const SmLocalizedSymbolData &rLSD = SM_MOD()->GetLocSymbolData();
aNewName = rLSD.GetUiSymbolName( rName );
bReplace = TRUE;
}
else if (IsExportSymbolNames())
{
- const SmLocalizedSymbolData &rLSD = SM_MOD1()->GetLocSymbolData();
+ const SmLocalizedSymbolData &rLSD = SM_MOD()->GetLocSymbolData();
aNewName = rLSD.GetExportSymbolName( rName );
bReplace = TRUE;
}
@@ -2300,7 +2333,7 @@ void SmParser::Special()
else // 5.0 <-> 6.0 formula text (symbol name) conversion
{
LanguageType nLanguage = GetLanguage();
- SmLocalizedSymbolData &rData = SM_MOD1()->GetLocSymbolData();
+ SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData();
const ResStringArray *pFrom = 0;
const ResStringArray *pTo = 0;
if (CONVERT_50_TO_60 == GetConversion())
diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx
index 9f753ec5fe..f3545d3f50 100644
--- a/starmath/source/rect.cxx
+++ b/starmath/source/rect.cxx
@@ -715,7 +715,7 @@ BOOL SmGetGlyphBoundRect(const OutputDevice &rDev,
{
// since we format for the printer (where GetTextBoundRect will fail)
// we need a virtual device here.
- pGlyphDev = &SM_MOD1()->GetDefaultVirtualDev();
+ pGlyphDev = &SM_MOD()->GetDefaultVirtualDev();
}
const FontMetric aDevFM (rDev.GetFontMetric());
diff --git a/starmath/source/smdll.cxx b/starmath/source/smdll.cxx
index 2b4b90499a..20c0713745 100644
--- a/starmath/source/smdll.cxx
+++ b/starmath/source/smdll.cxx
@@ -40,6 +40,7 @@
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
#include <sfx2/app.hxx>
+#include <sfx2/taskpane.hxx>
#ifndef _SMDLL_HXX
#include <smdll.hxx>
@@ -75,7 +76,7 @@ void SmDLL::Init()
SmModule** ppShlPtr = (SmModule**) GetAppData(SHL_SM);
*ppShlPtr = new SmModule( &rFactory );
- SfxModule *p = SM_MOD1();
+ SfxModule *p = SM_MOD();
SmModule *pp = (SmModule *) p;
rFactory.SetDocumentServiceName( String::CreateFromAscii("com.sun.star.formula.FormulaProperties") );
@@ -94,6 +95,8 @@ void SmDLL::Init()
SmToolBoxWrapper::RegisterChildWindow(TRUE);
SmCmdBoxWrapper::RegisterChildWindow(TRUE);
+
+ ::sfx2::TaskPaneWrapper::RegisterChildWindow( FALSE, pp );
}
/*************************************************************************
diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx
index aa1f2b36bb..ca4bcf9792 100644
--- a/starmath/source/smmod.cxx
+++ b/starmath/source/smmod.cxx
@@ -98,7 +98,7 @@ const String SmLocalizedSymbolData::GetUiSymbolName( const String &rExportName )
{
String aRes;
- const SmLocalizedSymbolData &rData = SM_MOD1()->GetLocSymbolData();
+ const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData();
const ResStringArray &rUiNames = rData.GetUiSymbolNamesArray();
const ResStringArray &rExportNames = rData.GetExportSymbolNamesArray();
USHORT nCount = sal::static_int_cast< xub_StrLen >(rExportNames.Count());
@@ -119,7 +119,7 @@ const String SmLocalizedSymbolData::GetExportSymbolName( const String &rUiName )
{
String aRes;
- const SmLocalizedSymbolData &rData = SM_MOD1()->GetLocSymbolData();
+ const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData();
const ResStringArray &rUiNames = rData.GetUiSymbolNamesArray();
const ResStringArray &rExportNames = rData.GetExportSymbolNamesArray();
USHORT nCount = sal::static_int_cast< xub_StrLen >(rUiNames.Count());
@@ -140,7 +140,7 @@ const String SmLocalizedSymbolData::GetUiSymbolSetName( const String &rExportNam
{
String aRes;
- const SmLocalizedSymbolData &rData = SM_MOD1()->GetLocSymbolData();
+ const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData();
const ResStringArray &rUiNames = rData.GetUiSymbolSetNamesArray();
const ResStringArray &rExportNames = rData.GetExportSymbolSetNamesArray();
USHORT nCount = sal::static_int_cast< xub_StrLen >(rExportNames.Count());
@@ -161,7 +161,7 @@ const String SmLocalizedSymbolData::GetExportSymbolSetName( const String &rUiNam
{
String aRes;
- const SmLocalizedSymbolData &rData = SM_MOD1()->GetLocSymbolData();
+ const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData();
const ResStringArray &rUiNames = rData.GetUiSymbolSetNamesArray();
const ResStringArray &rExportNames = rData.GetExportSymbolSetNamesArray();
USHORT nCount = sal::static_int_cast< xub_StrLen >(rUiNames.Count());
@@ -311,9 +311,9 @@ SmConfig * SmModule::GetConfig()
return pConfig;
}
-SmSymSetManager & SmModule::GetSymSetManager()
+SmSymbolManager & SmModule::GetSymbolManager()
{
- return GetConfig()->GetSymSetManager();
+ return GetConfig()->GetSymbolManager();
}
SmLocalizedSymbolData & SmModule::GetLocSymbolData() const
diff --git a/starmath/source/smres.src b/starmath/source/smres.src
index ae6bb31fd0..5761f1beb6 100644..100755
--- a/starmath/source/smres.src
+++ b/starmath/source/smres.src
@@ -1556,7 +1556,7 @@ FloatingWindow RID_TOOLBOXWINDOW
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 0 , 0 ) ;
- Text [ en-US ] = "Formula Elements" ;
+ Text [ en-US ] = "Elements" ;
ToolBox 1
{
diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx
index 7ed0ff1c7c..d40bd4f557 100644
--- a/starmath/source/symbol.cxx
+++ b/starmath/source/symbol.cxx
@@ -34,12 +34,13 @@
#include <ucbhelper/content.hxx>
#include <vcl/msgbox.hxx>
-#ifndef _SV_RESARY_HXX
-#include <tools/resary.hxx>
-#endif
#include <sfx2/dispatch.hxx>
#include <sfx2/docfile.hxx>
+#include <map>
+#include <vector>
+#include <iterator>
+
#include "symbol.hxx"
#include "view.hxx"
#include "utility.hxx"
@@ -55,72 +56,38 @@ using namespace ::com::sun::star::ucb;
using namespace ::com::sun::star::uno;
using namespace ::rtl;
-// Das hier muss auch mal alles "uberarbeitet werden. Insbesondere die nicht
-// funktionierende und bei l"oschen/"andern von Symbolen nicht gepflegte
-// Hash Tabelle!!! Diese aktualisert sich erst im Wertzuweisungsoperator
-// beim Verlassen des 'SmSymDefineDialog's!
-
-/**************************************************************************/
-/*
-**
-** MACRO DEFINTION
-**
-**/
-
-#define SF_SM20IDENT 0x03031963L
-#define SF_IDENT 0x30334D53L
-
-
-SV_IMPL_PTRARR( SymbolArray, SmSym * );
/**************************************************************************/
-/*
-**
-** DATA DEFINITION
-**
-**/
-
-long SF_Ident = SF_IDENT;
-
-/**************************************************************************/
-/*
-**
-** CLASS IMPLEMENTATION
-**
-**/
SmSym::SmSym() :
- Name(C2S("unknown")),
- aSetName(C2S("unknown")),
- pHashNext(0),
- pSymSetManager(0),
- Character('\0'),
- bPredefined(FALSE),
- bDocSymbol(FALSE)
+ m_aName(C2S("unknown")),
+ m_aSetName(C2S("unknown")),
+ m_cChar('\0'),
+ m_bPredefined(FALSE),
+ m_bDocSymbol(FALSE)
{
- aExportName = Name;
- Face.SetTransparent(TRUE);
- Face.SetAlign(ALIGN_BASELINE);
+ m_aExportName = m_aName;
+ m_aFace.SetTransparent(TRUE);
+ m_aFace.SetAlign(ALIGN_BASELINE);
}
SmSym::SmSym(const SmSym& rSymbol)
{
- pSymSetManager = 0;
*this = rSymbol;
}
-SmSym::SmSym(const String& rName, const Font& rFont, sal_Unicode aChar,
+SmSym::SmSym(const String& rName, const Font& rFont, sal_Unicode cChar,
const String& rSet, BOOL bIsPredefined)
{
- Name = aExportName = rName;
+ m_aName = m_aExportName = rName;
- Face = rFont;
- Face.SetTransparent(TRUE);
- Face.SetAlign(ALIGN_BASELINE);
+ m_aFace = rFont;
+ m_aFace.SetTransparent(TRUE);
+ m_aFace.SetAlign(ALIGN_BASELINE);
- Character = aChar;
+ m_cChar = cChar;
//! according to HDU this should not be used anymore now
//! since this was necessary in the early days but should
//! not be done now since this is handled now at a more
@@ -132,481 +99,231 @@ SmSym::SmSym(const String& rName, const Font& rFont, sal_Unicode aChar,
//
// if (RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet())
// Character |= 0xF000;
- aSetName = rSet;
- bPredefined = bIsPredefined;
- bDocSymbol = FALSE;
-
- pHashNext = 0;
- pSymSetManager = 0;
+ m_aSetName = rSet;
+ m_bPredefined = bIsPredefined;
+ m_bDocSymbol = FALSE;
}
SmSym& SmSym::operator = (const SmSym& rSymbol)
{
- Name = rSymbol.Name;
- Face = rSymbol.Face;
- Character = rSymbol.Character;
- aSetName = rSymbol.aSetName;
- bPredefined = rSymbol.bPredefined;
- bDocSymbol = rSymbol.bDocSymbol;
- aExportName = rSymbol.aExportName;
-
- pHashNext = 0;
+ m_aName = rSymbol.m_aName;
+ m_aExportName = rSymbol.m_aExportName;
+ m_cChar = rSymbol.m_cChar;
+ m_aFace = rSymbol.m_aFace;
+ m_aSetName = rSymbol.m_aSetName;
+ m_bPredefined = rSymbol.m_bPredefined;
+ m_bDocSymbol = rSymbol.m_bDocSymbol;
+ SmSymbolManager * pSymSetManager = &SM_MOD()->GetSymbolManager();
if (pSymSetManager)
- pSymSetManager->SetModified(TRUE);
+ pSymSetManager->SetModified(true);
return *this;
}
-/**************************************************************************/
-SmSymSet::SmSymSet() :
- Name(C2S("unknown")),
- pSymSetManager(0)
+bool SmSym::IsEqualInUI( const SmSym& rSymbol ) const
{
- SymbolList.Clear();
-}
-
-SmSymSet::SmSymSet(const SmSymSet& rSymbolSet)
-{
- pSymSetManager = 0;
- *this = rSymbolSet;
-}
-
-SmSymSet::SmSymSet(const String& rName)
-{
- Name = rName;
- SymbolList.Clear();
-
- pSymSetManager = 0;
-}
-
-SmSymSet::~SmSymSet()
-{
- for (USHORT i = 0; i < GetCount(); i++)
- delete SymbolList.GetObject(i);
-}
-
-SmSymSet& SmSymSet::operator = (const SmSymSet& rSymbolSet)
-{
- USHORT i;
- for (i = 0; i < GetCount(); i++)
- delete SymbolList.GetObject(i);
-
- Name = rSymbolSet.Name;
- SymbolList.Clear();
- for (i = 0; i < rSymbolSet.GetCount(); i++)
- AddSymbol(new SmSym(rSymbolSet.GetSymbol(i)));
-
- if (pSymSetManager)
- pSymSetManager->SetModified(TRUE);
-
- return *this;
-}
-
-USHORT SmSymSet::AddSymbol(SmSym* pSymbol)
-{
- DBG_ASSERT(pSymbol, "Kein Symbol");
-
- if (pSymbol)
- pSymbol->SetSetName( GetName() );
- SymbolList.Insert(pSymbol, LIST_APPEND);
- DBG_ASSERT(SymbolList.GetPos(pSymbol) == SymbolList.Count() - 1,
- "Sm : ... ergibt falschen return Wert");
-
- if (pSymSetManager)
- pSymSetManager->SetModified(TRUE);
-
- return (USHORT) SymbolList.Count() - 1;
-}
-
-void SmSymSet::DeleteSymbol(USHORT SymbolNo)
-{
- delete RemoveSymbol(SymbolNo);
-}
-
-SmSym * SmSymSet::RemoveSymbol(USHORT SymbolNo)
-{
- DBG_ASSERT(SymbolList.GetObject(SymbolNo), "Symbol nicht vorhanden");
-
- SmSym *pSym = SymbolList.GetObject(SymbolNo);
- SymbolList.Remove(SymbolNo);
-
- if (pSymSetManager)
- pSymSetManager->SetModified(TRUE);
-
- return pSym;
-}
-
-USHORT SmSymSet::GetSymbolPos(const String& rName)
-{
- for (USHORT i = 0; i < GetCount(); i++)
- if (SymbolList.GetObject(i)->GetName() == rName)
- return (i);
-
- return SYMBOL_NONE;
-}
-
-/**************************************************************************/
-
-SmSymSetManager_Impl::SmSymSetManager_Impl(
- SmSymSetManager &rMgr, USHORT HashTableSize ) :
-
- rSymSetMgr (rMgr)
-{
- NoSymbolSets = 0;
- NoHashEntries = HashTableSize;
- HashEntries = new SmSym *[NoHashEntries];
- memset( HashEntries, 0, sizeof(SmSym *) * NoHashEntries );
- Modified = FALSE;
-}
-
-
-SmSymSetManager_Impl::~SmSymSetManager_Impl()
-{
- for (USHORT i = 0; i < NoSymbolSets; ++i)
- delete SymbolSets.Get(i);
- SymbolSets.Clear();
-
- NoSymbolSets = 0;
- if (HashEntries)
- {
- delete[] HashEntries;
- HashEntries = 0;
- }
- NoHashEntries = 0;
- Modified = FALSE;
-}
-
-
-SmSymSetManager_Impl & SmSymSetManager_Impl::operator = ( const SmSymSetManager_Impl &rImpl )
-{
- //! rMySymSetMgr remains unchanged
-
- NoHashEntries = rImpl.NoHashEntries;
- if (HashEntries)
- delete [] HashEntries;
- HashEntries = new SmSym *[NoHashEntries];
- memset( HashEntries, 0, sizeof(SmSym *) * NoHashEntries );
-
- NoSymbolSets = 0;
- SymbolSets.Clear();
- for (USHORT i = 0; i < rImpl.NoSymbolSets; ++i)
- {
- rSymSetMgr.AddSymbolSet( new SmSymSet( *rImpl.rSymSetMgr.GetSymbolSet(i) ) );
- }
- DBG_ASSERT( NoSymbolSets == rImpl.NoSymbolSets,
- "incorrect number of symbolsets" );
-
- Modified = TRUE;
- return *this;
-}
+ return m_aName == rSymbol.m_aName &&
+ m_aFace == rSymbol.m_aFace &&
+ m_cChar == rSymbol.m_cChar;
+}
/**************************************************************************/
-void SmSymSetManager::SFX_NOTIFY(SfxBroadcaster& /*rBC*/, const TypeId& rBCType,
+void SmSymbolManager::SFX_NOTIFY(SfxBroadcaster& /*rBC*/, const TypeId& rBCType,
const SfxHint& /*rHint*/, const TypeId& rHintType)
{
}
-UINT32 SmSymSetManager::GetHashIndex(const String& rSymbolName)
-{
- UINT32 x = 1;
- for (xub_StrLen i = 0; i < rSymbolName.Len(); i++)
- x += x * rSymbolName.GetChar(i) + i;
-
- return x % pImpl->NoHashEntries;
-}
-
-
-void SmSymSetManager::EnterHashTable(SmSym& rSymbol)
+void SmSymbolManager::Init()
{
- int j = GetHashIndex( rSymbol.GetName() );
- if (pImpl->HashEntries[j] == 0)
- pImpl->HashEntries[j] = &rSymbol;
- else
- {
- SmSym *p = pImpl->HashEntries[j];
- while (p->pHashNext)
- p = p->pHashNext;
- p->pHashNext = &rSymbol;
- }
- rSymbol.pHashNext = 0;
-}
-
-
-void SmSymSetManager::EnterHashTable(SmSymSet& rSymbolSet)
-{
- for (USHORT i = 0; i < rSymbolSet.GetCount(); i++)
- EnterHashTable( *rSymbolSet.SymbolList.GetObject(i) );
-}
-
-void SmSymSetManager::FillHashTable()
-{
- if (pImpl->HashEntries)
- {
- memset( pImpl->HashEntries, 0, pImpl->NoHashEntries * sizeof(SmSym *) );
-
- for (UINT32 i = 0; i < pImpl->NoSymbolSets; i++)
- EnterHashTable( *GetSymbolSet( (USHORT) i ) );
- }
-}
-
-void SmSymSetManager::Init()
-{
- SmModule *pp = SM_MOD1();
+ SmModule *pp = SM_MOD();
StartListening(*pp->GetConfig());
}
-void SmSymSetManager::Exit()
+void SmSymbolManager::Exit()
{
- SmModule *pp = SM_MOD1();
+ SmModule *pp = SM_MOD();
EndListening(*pp->GetConfig());
}
-SmSymSetManager::SmSymSetManager(USHORT HashTableSize)
+SmSymbolManager::SmSymbolManager()
{
- pImpl = new SmSymSetManager_Impl( *this, HashTableSize );
+ m_bModified = false;
}
-SmSymSetManager::SmSymSetManager(const SmSymSetManager& rSymbolSetManager) :
+SmSymbolManager::SmSymbolManager(const SmSymbolManager& rSymbolSetManager) :
SfxListener()
{
- pImpl = new SmSymSetManager_Impl( *this, rSymbolSetManager.pImpl->NoHashEntries );
- *pImpl = *rSymbolSetManager.pImpl;
+ m_aSymbols = rSymbolSetManager.m_aSymbols;
+ m_bModified = true;
}
-SmSymSetManager::~SmSymSetManager()
+SmSymbolManager::~SmSymbolManager()
{
- delete pImpl;
- pImpl = 0;
}
-SmSymSetManager& SmSymSetManager::operator = (const SmSymSetManager& rSymbolSetManager)
-{
- *pImpl = *rSymbolSetManager.pImpl;
- return *this;
-}
-USHORT SmSymSetManager::AddSymbolSet(SmSymSet* pSymbolSet)
+SmSymbolManager& SmSymbolManager::operator = (const SmSymbolManager& rSymbolSetManager)
{
- if (pImpl->NoSymbolSets >= pImpl->SymbolSets.GetSize())
- pImpl->SymbolSets.SetSize(pImpl->NoSymbolSets + 1);
-
- pImpl->SymbolSets.Put(pImpl->NoSymbolSets++, pSymbolSet);
-
- pSymbolSet->pSymSetManager = this;
-
- for (USHORT i = 0; i < pSymbolSet->GetCount(); i++)
- pSymbolSet->SymbolList.GetObject(i)->pSymSetManager = this;
-
- FillHashTable();
- pImpl->Modified = TRUE;
-
- return (USHORT) (pImpl->NoSymbolSets - 1);
+ m_aSymbols = rSymbolSetManager.m_aSymbols;
+ m_bModified = true;
+ return *this;
}
-void SmSymSetManager::ChangeSymbolSet(SmSymSet* pSymbolSet)
-{
- if (pSymbolSet)
- {
- FillHashTable();
- pImpl->Modified = TRUE;
- }
-}
-void SmSymSetManager::DeleteSymbolSet(USHORT SymbolSetNo)
+SmSym *SmSymbolManager::GetSymbolByName(const String& rSymbolName)
{
- delete pImpl->SymbolSets.Get(SymbolSetNo);
- pImpl->NoSymbolSets--;
-
- for (UINT32 i = SymbolSetNo; i < pImpl->NoSymbolSets; i++)
- pImpl->SymbolSets.Put(i, pImpl->SymbolSets.Get(i + 1));
-
- FillHashTable();
-
- pImpl->Modified = TRUE;
+ SmSym *pRes = NULL;
+ SymbolMap_t::iterator aIt( m_aSymbols.find( rSymbolName ) );
+ if (aIt != m_aSymbols.end())
+ pRes = &aIt->second;
+ return pRes;
}
-USHORT SmSymSetManager::GetSymbolSetPos(const String& rSymbolSetName) const
+const SymbolPtrVec_t SmSymbolManager::GetSymbols() const
{
- for (USHORT i = 0; i < pImpl->NoSymbolSets; i++)
- if (pImpl->SymbolSets.Get(i)->GetName() == rSymbolSetName)
- return (i);
-
- return SYMBOLSET_NONE;
-}
-
-SmSym *SmSymSetManager::GetSymbolByName(const String& rSymbolName)
-{
- SmSym *pSym = pImpl->HashEntries[GetHashIndex(rSymbolName)];
- while (pSym)
- {
- if (pSym->Name == rSymbolName)
- break;
- pSym = pSym->pHashNext;
- }
-
- return pSym;
+ SymbolPtrVec_t aRes;
+ SymbolMap_t::const_iterator aIt( m_aSymbols.begin() );
+ for ( ; aIt != m_aSymbols.end(); ++aIt)
+ aRes.push_back( &aIt->second );
+// DBG_ASSERT( sSymbols.size() == m_aSymbols.size(), "number of symbols mismatch " );
+ return aRes;
}
-void SmSymSetManager::AddReplaceSymbol( const SmSym &rSymbol )
+bool SmSymbolManager::AddOrReplaceSymbol( const SmSym &rSymbol, bool bForceChange )
{
- SmSym *pSym = GetSymbolByName( rSymbol.GetName() );
- if (pSym)
+ bool bAdded = false;
+
+ const String aSymbolName( rSymbol.GetName() );
+ if (aSymbolName.Len() > 0 && rSymbol.GetSymbolSetName().Len() > 0)
{
- *pSym = rSymbol;
- }
- else
- {
- USHORT nPos = GetSymbolSetPos( rSymbol.GetSetName() );
- if (SYMBOLSET_NONE == nPos)
+ const SmSym *pFound = GetSymbolByName( aSymbolName );
+ const bool bSymbolConflict = pFound && !pFound->IsEqualInUI( rSymbol );
+
+ // avoid having the same symbol name twice but with different symbols in use
+ if (!pFound || bForceChange)
{
- AddSymbolSet( new SmSymSet( rSymbol.GetSetName() ) );
- nPos = GetSymbolSetPos( rSymbol.GetSetName() );
+ m_aSymbols[ aSymbolName ] = rSymbol;
+ bAdded = true;
}
- DBG_ASSERT( nPos != SYMBOLSET_NONE, "SymbolSet not found");
- SmSym *pTmpSym = new SmSym( rSymbol );
- GetSymbolSet( nPos )->AddSymbol( pTmpSym );
- EnterHashTable( *pTmpSym );
+ else if (pFound && !bForceChange && bSymbolConflict)
+ {
+ // TODO: but what ...
+ DBG_ASSERT( 0, "symbol conflict, different symbol with same name found!" );
+ }
}
- SetModified( TRUE );
-}
+
+ DBG_ASSERT( bAdded, "failed to add symbol" );
+ if (bAdded)
+ m_bModified = true;
-
-USHORT SmSymSetManager::GetSymbolCount() const
-{
- USHORT nRes = 0;
- USHORT nSets = GetSymbolSetCount();
- for (USHORT i = 0; i < nSets; ++i)
- nRes = nRes + GetSymbolSet(i)->GetCount();
- return nRes;
+ return bAdded;
}
-const SmSym * SmSymSetManager::GetSymbolByPos( USHORT nPos ) const
+void SmSymbolManager::RemoveSymbol( const String & rSymbolName )
{
- const SmSym *pRes = 0;
-
- INT16 nIdx = 0;
- USHORT nSets = GetSymbolSetCount();
- USHORT i = 0;
- while (i < nSets && !pRes)
+ if (rSymbolName.Len() > 0)
{
- USHORT nEntries = GetSymbolSet(i)->GetCount();
- if (nPos < nIdx + nEntries)
- pRes = &GetSymbolSet(i)->GetSymbol( nPos - nIdx );
- else
- nIdx = nIdx + nEntries;
- ++i;
+ size_t nOldSize = m_aSymbols.size();
+ m_aSymbols.erase( rSymbolName );
+ m_bModified = nOldSize != m_aSymbols.size();
}
-
- return pRes;
}
+
+std::set< String > SmSymbolManager::GetSymbolSetNames() const
+{
+ std::set< String > aRes;
+ SymbolMap_t::const_iterator aIt( m_aSymbols.begin() );
+ for ( ; aIt != m_aSymbols.end(); ++aIt )
+ aRes.insert( aIt->second.GetSymbolSetName() );
+ return aRes;
+}
-void SmSymSetManager::GetSymbols( std::vector< SmSym > &rSymbols ) const
+
+const SymbolPtrVec_t SmSymbolManager::GetSymbolSet( const String& rSymbolSetName )
{
- INT32 nCount = GetSymbolCount();
- rSymbols.resize( nCount );
- USHORT nPos = 0;
- std::vector< SmSym >::iterator aIt( rSymbols.begin() );
- std::vector< SmSym >::iterator aEnd( rSymbols.end() );
- while (aIt != aEnd)
+ SymbolPtrVec_t aRes;
+ if (rSymbolSetName.Len() > 0)
{
- const SmSym *pSym = GetSymbolByPos( nPos++ );
- DBG_ASSERT( pSym, "symbol missing" );
- if (pSym)
- *aIt++ = *pSym;
+ SymbolMap_t::const_iterator aIt( m_aSymbols.begin() );
+ for ( ; aIt != m_aSymbols.end(); ++aIt )
+ {
+ if (aIt->second.GetSymbolSetName() == rSymbolSetName)
+ aRes.push_back( &aIt->second );
+ }
}
- DBG_ASSERT( nPos == nCount, "index out of range?" );
+ return aRes;
}
+
-
-void SmSymSetManager::Load()
+void SmSymbolManager::Load()
{
std::vector< SmSym > aSymbols;
- SmMathConfig &rCfg = *SM_MOD1()->GetConfig();
+ SmMathConfig &rCfg = *SM_MOD()->GetConfig();
rCfg.GetSymbols( aSymbols );
- INT32 nSymbolCount = aSymbols.size();
+ size_t nSymbolCount = aSymbols.size();
- USHORT i;
- for (i = 0; i < nSymbolCount; ++i)
+ m_aSymbols.clear();
+ for (size_t i = 0; i < nSymbolCount; ++i)
{
const SmSym &rSym = aSymbols[i];
- DBG_ASSERT( rSym.Name.Len() > 0, "symbol without name!" );
- if (rSym.Name.Len() > 0)
- {
- SmSymSet *pSymSet = 0;
- const String &rSetName = rSym.GetSetName();
- USHORT nSetPos = GetSymbolSetPos( rSetName );
- if (SYMBOLSET_NONE != nSetPos)
- pSymSet = GetSymbolSet( nSetPos );
- else
- {
- pSymSet = new SmSymSet( rSetName );
- AddSymbolSet( pSymSet );
- }
-
- pSymSet->AddSymbol( new SmSym( rSym ) );
- }
+ DBG_ASSERT( rSym.GetName().Len() > 0, "symbol without name!" );
+ if (rSym.GetName().Len() > 0)
+ AddOrReplaceSymbol( rSym );
}
- // build HashTables
- INT32 nSymbolSetCount = GetSymbolSetCount();
- for (i = 0; i < nSymbolSetCount; ++i)
- ChangeSymbolSet( GetSymbolSet( i ) );
+ m_bModified = true;
if (0 == nSymbolCount)
{
DBG_ERROR( "no symbol set found" );
- pImpl->Modified = FALSE;
+ m_bModified = false;
}
}
-void SmSymSetManager::Save()
+void SmSymbolManager::Save()
{
- SmMathConfig &rCfg = *SM_MOD1()->GetConfig();
-
- // get number of Symbols
- USHORT nSymbolCount = 0;
- USHORT nSetCount = GetSymbolSetCount();
- USHORT i;
- for (i = 0; i < nSetCount; ++i)
- nSymbolCount = nSymbolCount + GetSymbolSet( i )->GetCount();
-
- if (nSymbolCount)
+ if (m_bModified)
{
- USHORT nSaveSymbolCnt = 0;
- const SmSym **pSymbols = new const SmSym* [ nSymbolCount ];
- const SmSym **pSym = pSymbols;
- for (i = 0; i < nSetCount; ++i)
+ SmMathConfig &rCfg = *SM_MOD()->GetConfig();
+
+#if 0
+ USHORT nSymbolCount = GetSymbolCount();
+ USHORT nSaveSymbolCnt = 0;
+ const SmSym **pSymbols = new const SmSym* [ nSymbolCount ];
+ const SmSym **pSym = pSymbols;
+ for (USHORT j = 0; j < nSymbolCount; ++j)
{
- const SmSymSet *pSymSet = GetSymbolSet( i );
- USHORT n = pSymSet->GetCount();
- for (USHORT j = 0; j < n; ++j)
+ const SmSym &rSym = *pSymSet->GetSymbol( j );
+ if (!rSym.IsDocSymbol())
{
- const SmSym &rSym = pSymSet->GetSymbol( j );
- if (!rSym.IsDocSymbol())
- {
- *pSym++ = &rSym;
- ++nSaveSymbolCnt;
- }
+ *pSym++ = &rSym;
+ ++nSaveSymbolCnt;
}
}
DBG_ASSERT(pSym - pSymbols == nSaveSymbolCnt, "wrong number of symbols" );
-
+#endif
+ SymbolPtrVec_t aTmp( GetSymbols() );
std::vector< SmSym > aSymbols;
- GetSymbols( aSymbols );
+ for (size_t i = 0; i < aTmp.size(); ++i)
+ aSymbols.push_back( *aTmp[i] );
rCfg.SetSymbols( aSymbols );
+#if 0
delete [] pSymbols;
+#endif
+
+ m_bModified = false;
}
}
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 7a9a9434bb..7d73b0c737 100644..100755
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -85,7 +85,7 @@ SmPrintUIOptions::SmPrintUIOptions()
if( aLocalizedStrings.Count() < 18 ) // bad resource ?
return;
- SmModule *pp = SM_MOD1();
+ SmModule *pp = SM_MOD();
SmConfig *pConfig = pp->GetConfig();
DBG_ASSERT( pConfig, "SmConfig not found" );
if (!pConfig)
@@ -684,7 +684,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
0
};
SfxItemSet *pItemSet = new SfxItemSet( pDocSh->GetPool(), nRange );
- SmModule *pp = SM_MOD1();
+ SmModule *pp = SM_MOD();
pp->GetConfig()->ConfigToItemSet(*pItemSet);
SfxPrinter *pPrinter = SfxPrinter::Create ( aStream, pItemSet );
@@ -701,8 +701,8 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
if ( *pValues >>= aSequence )
{
sal_uInt32 nSize = aSequence.getLength();
- SmModule *pp = SM_MOD1();
- SmSymSetManager &rManager = pp->GetSymSetManager();
+ SmModule *pp = SM_MOD();
+ SmSymbolManager &rManager = pp->GetSymbolManager();
SymbolDescriptor *pDescriptor = aSequence.getArray();
for (sal_uInt32 i = 0; i < nSize ; i++, pDescriptor++)
{
@@ -717,7 +717,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
pDescriptor->sSymbolSet );
aSymbol.SetExportName ( pDescriptor->sExportName );
aSymbol.SetDocSymbol( TRUE );
- rManager.AddReplaceSymbol ( aSymbol );
+ rManager.AddOrReplaceSymbol ( aSymbol );
}
}
else
@@ -886,14 +886,15 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu
case HANDLE_SYMBOLS:
{
// this is get
- SmModule *pp = SM_MOD1();
- const SmSymSetManager &rManager = pp->GetSymSetManager();
+ SmModule *pp = SM_MOD();
+ const SmSymbolManager &rManager = pp->GetSymbolManager();
vector < const SmSym * > aVector;
- USHORT nCount = 0;
- for (USHORT i = 0, nEnd = rManager.GetSymbolCount(); i < nEnd; i++)
+ const SymbolPtrVec_t aSymbols( rManager.GetSymbols() );
+ size_t nCount = 0;
+ for (size_t i = 0; i < aSymbols.size(); ++i)
{
- const SmSym * pSymbol = rManager.GetSymbolByPos( i );
+ const SmSym * pSymbol = aSymbols[ i ];
if (pSymbol && !pSymbol->IsPredefined () )
{
aVector.push_back ( pSymbol );
@@ -903,12 +904,12 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu
Sequence < SymbolDescriptor > aSequence ( nCount );
SymbolDescriptor * pDescriptor = aSequence.getArray();
- vector <const SmSym * >::const_iterator aIter = aVector.begin(), aEnd = aVector.end();
+ vector < const SmSym * >::const_iterator aIter = aVector.begin(), aEnd = aVector.end();
for(; aIter != aEnd; pDescriptor++, aIter++)
{
pDescriptor->sName = (*aIter)->GetName();
pDescriptor->sExportName = (*aIter)->GetExportName();
- pDescriptor->sSymbolSet = (*aIter)->GetSetName();
+ pDescriptor->sSymbolSet = (*aIter)->GetSymbolSetName();
pDescriptor->nCharacter = static_cast < sal_Int32 > ((*aIter)->GetCharacter());
Font rFont = (*aIter)->GetFace();
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index d8d6c657b0..4698d7d71a 100644..100755
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -107,7 +107,7 @@ SmGraphicWindow::SmGraphicWindow(SmViewShell* pShell):
const Fraction aFraction (1,1);
SetMapMode( MapMode(MAP_100TH_MM, Point(), aFraction, aFraction));
- ApplyColorConfigValues( SM_MOD1()->GetColorConfig() );
+ ApplyColorConfigValues( SM_MOD()->GetColorConfig() );
SetTotalSize();
@@ -145,7 +145,7 @@ void SmGraphicWindow::ApplyColorConfigValues( const svtools::ColorConfig &rColor
void SmGraphicWindow::DataChanged( const DataChangedEvent& rEvt )
{
- ApplyColorConfigValues( SM_MOD1()->GetColorConfig() );
+ ApplyColorConfigValues( SM_MOD()->GetColorConfig() );
ScrollableWindow::DataChanged( rEvt );
}
@@ -270,7 +270,7 @@ void SmGraphicWindow::SetCursor(const Rectangle &rRect)
// The old cursor will be removed, and the new one will be shown if
// that is activated in the ConfigItem
{
- SmModule *pp = SM_MOD1();
+ SmModule *pp = SM_MOD();
if (IsCursorVisible())
ShowCursor(FALSE); // clean up remainings of old cursor
@@ -324,7 +324,7 @@ void SmGraphicWindow::Paint(const Rectangle&)
nCol++;
const SmNode *pFound = SetCursorPos(nRow, nCol);
- SmModule *pp = SM_MOD1();
+ SmModule *pp = SM_MOD();
if (pFound && pp->GetConfig()->IsShowFormulaCursor())
ShowCursor(TRUE);
}
@@ -743,6 +743,7 @@ SFX_IMPL_INTERFACE(SmViewShell, SfxViewShell, SmResId(0))
// SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_OBJECT | SFX_VISIBILITY_SERVER,
// SmResId(RID_DRAW_OBJECTBAR) );
+ SFX_CHILDWINDOW_REGISTRATION(SID_TASKPANE);
SFX_CHILDWINDOW_REGISTRATION(SmToolBoxWrapper::GetChildWindowId());
SFX_CHILDWINDOW_REGISTRATION(SmCmdBoxWrapper::GetChildWindowId());
}
@@ -1162,7 +1163,7 @@ void SmViewShell::Impl_Print(
USHORT SmViewShell::Print(SfxProgress & /*rProgress*/, BOOL /*bIsAPI*/, PrintDialog * /*pPrintDialog*/)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Print" );
- DBG_ASSERT( 0, "SmViewShell::Print: no longer usewd with new UI print dialog. Should be removed!!" );
+ DBG_ASSERT( 0, "SmViewShell::Print: no longer used with new UI print dialog. Should be removed!!" );
return 0;
}
@@ -1190,7 +1191,7 @@ USHORT SmViewShell::SetPrinter(SfxPrinter *pNewPrinter, USHORT nDiffFlags, bool
if ((nDiffFlags & SFX_PRINTER_OPTIONS) == SFX_PRINTER_OPTIONS)
{
- SmModule *pp = SM_MOD1();
+ SmModule *pp = SM_MOD();
pp->GetConfig()->ItemSetToConfig(pNewPrinter->GetOptions());
}
return 0;
@@ -1378,7 +1379,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
{
case SID_FORMULACURSOR:
{
- SmModule *pp = SM_MOD1();
+ SmModule *pp = SM_MOD();
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem *pItem;
@@ -1680,11 +1681,11 @@ void SmViewShell::Execute(SfxRequest& rReq)
SmDocShell *pDoc = GetDoc();
OutputDevice *pDev = pDoc->GetPrinter();
if (!pDev || pDev->GetDevFontCount() == 0)
- pDev = &SM_MOD1()->GetDefaultVirtualDev();
+ pDev = &SM_MOD()->GetDefaultVirtualDev();
DBG_ASSERT (pDev, "device for font list missing" );
- SmModule *pp = SM_MOD1();
- SmSymbolDialog( NULL, pDev, pp->GetSymSetManager(), *this ).Execute();
+ SmModule *pp = SM_MOD();
+ SmSymbolDialog( NULL, pDev, pp->GetSymbolManager(), *this ).Execute();
}
break;
}
@@ -1759,7 +1760,7 @@ void SmViewShell::GetState(SfxItemSet &rSet)
case SID_FORMULACURSOR:
{
- SmModule *pp = SM_MOD1();
+ SmModule *pp = SM_MOD();
rSet.Put(SfxBoolItem(nWh, pp->GetConfig()->IsShowFormulaCursor()));
}
break;
diff --git a/starmath/uiconfig/smath/accelerator/en-GB/default.xml b/starmath/uiconfig/smath/accelerator/en-GB/default.xml
deleted file mode 100644
index 7e5e44d8ea..0000000000
--- a/starmath/uiconfig/smath/accelerator/en-GB/default.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_A" accel:mod1="true" xlink:href=".uno:Select"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:NextError"/>
- <accel:item accel:code="KEY_F3" accel:shift="true" xlink:href=".uno:PrevError"/>
- <accel:item accel:code="KEY_F4" xlink:href=".uno:NextMark"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:PrevMark"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:Draw"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
-</accel:acceleratorlist>
diff --git a/starmath/uiconfig/smath/accelerator/en-US/default.xml b/starmath/uiconfig/smath/accelerator/en-US/default.xml
deleted file mode 100644
index 7e5e44d8ea..0000000000
--- a/starmath/uiconfig/smath/accelerator/en-US/default.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_A" accel:mod1="true" xlink:href=".uno:Select"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:NextError"/>
- <accel:item accel:code="KEY_F3" accel:shift="true" xlink:href=".uno:PrevError"/>
- <accel:item accel:code="KEY_F4" xlink:href=".uno:NextMark"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:PrevMark"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:Draw"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
-</accel:acceleratorlist>
diff --git a/starmath/uiconfig/smath/menubar/menubar.xml b/starmath/uiconfig/smath/menubar/menubar.xml
index bc17f4ef6c..63bf72c0cf 100644
--- a/starmath/uiconfig/smath/menubar/menubar.xml
+++ b/starmath/uiconfig/smath/menubar/menubar.xml
@@ -1,119 +1,121 @@
<?xml version="1.0" encoding="UTF-8"?>
<menu:menubar xmlns:menu="http://openoffice.org/2001/menu" menu:id="menubar">
- <menu:menu menu:id=".uno:PickList">
+ <menu:menu menu:id=".uno:PickList">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:AddDirect"/>
+ <menu:menuitem menu:id=".uno:Open"/>
+ <menu:menuitem menu:id=".uno:RecentFileList"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AutoPilotMenu"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:CloseDoc"/>
+ <menu:menuitem menu:id=".uno:Save"/>
+ <menu:menuitem menu:id=".uno:SaveAs"/>
+ <menu:menuitem menu:id=".uno:SaveAll"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Reload"/>
+ <menu:menuitem menu:id=".uno:VersionDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ExportTo"/>
+ <menu:menu menu:id=".uno:SendToMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:AddDirect"/>
- <menu:menuitem menu:id=".uno:Open"/>
- <menu:menuitem menu:id=".uno:RecentFileList"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AutoPilotMenu"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:CloseDoc"/>
- <menu:menuitem menu:id=".uno:Save"/>
- <menu:menuitem menu:id=".uno:SaveAs"/>
- <menu:menuitem menu:id=".uno:SaveAll"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Reload"/>
- <menu:menuitem menu:id=".uno:VersionDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ExportTo"/>
- <menu:menu menu:id=".uno:SendToMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SendMail"/>
- <menu:menuitem menu:id=".uno:SendMailDocAsPDF"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SetDocumentProperties"/>
- <menu:menuitem menu:id=".uno:Signature"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Print"/>
- <menu:menuitem menu:id=".uno:PrinterSetup"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Quit"/>
+ <menu:menuitem menu:id=".uno:SendMail"/>
+ <menu:menuitem menu:id=".uno:SendMailDocAsPDF"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:EditMenu">
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SetDocumentProperties"/>
+ <menu:menuitem menu:id=".uno:Signature"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Print"/>
+ <menu:menuitem menu:id=".uno:PrinterSetup"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Quit"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:EditMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:Undo"/>
+ <menu:menuitem menu:id=".uno:Redo"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Cut"/>
+ <menu:menuitem menu:id=".uno:Copy"/>
+ <menu:menuitem menu:id=".uno:Paste"/>
+ <menu:menuitem menu:id=".uno:Select"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:NextMark"/>
+ <menu:menuitem menu:id=".uno:PrevMark"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:NextError"/>
+ <menu:menuitem menu:id=".uno:PrevError"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ViewMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:Draw"/>
+ <menu:menuitem menu:id=".uno:RedrawAutomatic"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AvailableToolbars"/>
+ <menu:menuitem menu:id=".uno:StatusBarVisible"/>
+ <menu:menuitem menu:id=".uno:ShowImeStatusWindow"/>
+ <menu:menuitem menu:id=".uno:ToolBox"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:TaskPane"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FullScreen"/>
+ <menu:menuitem menu:id=".uno:ZoomIn"/>
+ <menu:menuitem menu:id=".uno:ZoomOut"/>
+ <menu:menuitem menu:id=".uno:Adjust"/>
+ <menu:menuitem menu:id=".uno:Zoom"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:FormatMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:ChangeFont"/>
+ <menu:menuitem menu:id=".uno:ChangeFontSize"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ChangeDistance"/>
+ <menu:menuitem menu:id=".uno:ChangeAlignment"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Textmode"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ToolsMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SymbolCatalogue"/>
+ <menu:menuitem menu:id=".uno:InsertFormula"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:MacrosMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:Undo"/>
- <menu:menuitem menu:id=".uno:Redo"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Cut"/>
- <menu:menuitem menu:id=".uno:Copy"/>
- <menu:menuitem menu:id=".uno:Paste"/>
- <menu:menuitem menu:id=".uno:Select"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:NextMark"/>
- <menu:menuitem menu:id=".uno:PrevMark"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:NextError"/>
- <menu:menuitem menu:id=".uno:PrevError"/>
+ <menu:menuitem menu:id=".uno:MacroRecorder"/>
+ <menu:menuitem menu:id=".uno:RunMacro"/>
+ <menu:menu menu:id=".uno:ScriptOrganizer"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MacroOrganizer?TabId:short=1"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ViewMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:Draw"/>
- <menu:menuitem menu:id=".uno:RedrawAutomatic"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AvailableToolbars"/>
- <menu:menuitem menu:id=".uno:StatusBarVisible"/>
- <menu:menuitem menu:id=".uno:ShowImeStatusWindow"/>
- <menu:menuitem menu:id=".uno:ToolBox"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:FullScreen"/>
- <menu:menuitem menu:id=".uno:ZoomIn"/>
- <menu:menuitem menu:id=".uno:ZoomOut"/>
- <menu:menuitem menu:id=".uno:Adjust"/>
- <menu:menuitem menu:id=".uno:Zoom"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:FormatMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:ChangeFont"/>
- <menu:menuitem menu:id=".uno:ChangeFontSize"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ChangeDistance"/>
- <menu:menuitem menu:id=".uno:ChangeAlignment"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Textmode"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ToolsMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SymbolCatalogue"/>
- <menu:menuitem menu:id=".uno:InsertFormula"/>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:MacrosMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:MacroRecorder"/>
- <menu:menuitem menu:id=".uno:RunMacro"/>
- <menu:menu menu:id=".uno:ScriptOrganizer"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MacroOrganizer?TabId:short=1"/>
- </menu:menupopup>
- </menu:menu>
+ </menu:menu>
- <menu:menuitem menu:id="service:com.sun.star.deployment.ui.PackageManagerDialog"/>
- <menu:menuitem menu:id=".uno:ConfigureDialog"/>
- <menu:menuitem menu:id=".uno:OptionsTreeDialog"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:WindowList">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:NewWindow"/>
- <menu:menuitem menu:id=".uno:CloseWin"/>
- <menu:menuseparator/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:HelpMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:HelpIndex"/>
- <menu:menuitem menu:id=".uno:ExtendedHelp"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HelpSupport"/>
- <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:About"/>
- </menu:menupopup>
- </menu:menu>
+ <menu:menuitem menu:id="service:com.sun.star.deployment.ui.PackageManagerDialog"/>
+ <menu:menuitem menu:id=".uno:ConfigureDialog"/>
+ <menu:menuitem menu:id=".uno:OptionsTreeDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:WindowList">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:NewWindow"/>
+ <menu:menuitem menu:id=".uno:CloseWin"/>
+ <menu:menuseparator/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:HelpMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:HelpIndex"/>
+ <menu:menuitem menu:id=".uno:ExtendedHelp"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:HelpSupport"/>
+ <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:About"/>
+ </menu:menupopup>
+ </menu:menu>
</menu:menubar>
diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx
new file mode 100644
index 0000000000..93b35694c8
--- /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/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index 85b73c05cf..651d07cf0a 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,13 +39,14 @@
#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 SwFmtFld;
class SwField;
class SfxBroadcaster;
class SfxHint;
@@ -53,9 +54,16 @@ class SwEditWin;
class Color;
class SvxSearchItem;
class SvxLanguageItem;
-class SwPostIt;
-class SwMarginWin;
-class SwMarginItem;
+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
@@ -64,23 +72,20 @@ class SwMarginItem;
#define COL_NOTES_SIDEPANE_ARROW_ENABLED RGB_COLORDATA(0,0,0)
#define COL_NOTES_SIDEPANE_ARROW_DISABLED RGB_COLORDATA(172,168,153)
-typedef std::list<SwMarginItem*> SwMarginItem_list;
-typedef std::list<SwMarginItem*>::iterator SwMarginItem_iterator;
+typedef std::list<SwSidebarItem*> SwSidebarItem_list;
+typedef std::list<SwSidebarItem*>::iterator SwSidebarItem_iterator;
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using ::rtl::OUString;
struct SwPostItPageItem
{
bool bScrollbar;
- bool bMarginSide;
+ sw::sidebarwindows::SidebarPosition eSidebarPosition;
long lOffset;
SwRect mPageRect;
- SwMarginItem_list* mList;
+ SwSidebarItem_list* mList;
SwPostItPageItem(): bScrollbar(false),lOffset(0)
{
- mList = new SwMarginItem_list;
+ mList = new SwSidebarItem_list;
}
~SwPostItPageItem()
{
@@ -102,26 +107,28 @@ struct FieldShadowState
class SwNoteProps: public utl::ConfigItem
{
- private:
- bool bIsShowAnkor;
+ private:
+ bool bIsShowAnchor;
public:
- SwNoteProps() : ConfigItem(::rtl::OUString::createFromAscii("Office.Writer/Notes")), bIsShowAnkor(false)
+ SwNoteProps()
+ : ConfigItem(::rtl::OUString::createFromAscii("Office.Writer/Notes"))
+ , bIsShowAnchor(false)
{
- const Sequence<OUString>& rNames = GetPropertyNames();
- Sequence<Any> aValues = GetProperties(rNames);
- const Any* pValues = aValues.getConstArray();
+ 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]>>=bIsShowAnkor;
+ pValues[0]>>=bIsShowAnchor;
}
- bool IsShowAnkor()
+ bool IsShowAnchor()
{
- return bIsShowAnkor;
+ return bIsShowAnchor;
}
- Sequence<OUString>& GetPropertyNames()
+ ::com::sun::star::uno::Sequence< ::rtl::OUString >& GetPropertyNames()
{
- static Sequence<OUString> aNames;
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > aNames;
if(!aNames.getLength())
{
static const char* aPropNames[] =
@@ -130,9 +137,9 @@ class SwNoteProps: public utl::ConfigItem
};
const int nCount = sizeof(aPropNames)/sizeof(const char*);
aNames.realloc(nCount);
- OUString* pNames = aNames.getArray();
+ ::rtl::OUString* pNames = aNames.getArray();
for(int i = 0; i < nCount; i++)
- pNames[i] = OUString::createFromAscii(aPropNames[i]);
+ pNames[i] = ::rtl::OUString::createFromAscii(aPropNames[i]);
}
return aNames;
}
@@ -147,11 +154,11 @@ class SwPostItMgr: public SfxListener
SwView* mpView;
SwWrtShell* mpWrtShell;
SwEditWin* mpEditWin;
- std::list< SwMarginItem*> mvPostItFlds;
+ std::list< SwSidebarItem*> mvPostItFlds;
std::vector<SwPostItPageItem*> mPages;
ULONG mnEventId;
bool mbWaitingForCalcRects;
- SwMarginWin* mpActivePostIt;
+ sw::sidebarwindows::SwSidebarWin* mpActivePostIt;
bool mbLayout;
long mbLayoutHeight;
long mbLayouting;
@@ -159,52 +166,62 @@ class SwPostItMgr: public SfxListener
bool mbDeleteNote;
FieldShadowState mShadowState;
OutlinerParaObject* mpAnswer;
- bool mpIsShowAnkor;
+ bool mbIsShowAnchor;
- typedef std::list<SwMarginWin*>::iterator SwMarginWin_iterator;
+ // 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 RemoveMarginWin();
+ void RemoveSidebarWin();
void PreparePageContainer();
void Scroll(const long lScroll,const unsigned long aPage );
- void AutoScroll(const SwMarginWin* pPostIt,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<SwMarginWin*> &aVisiblePostItList,const Rectangle aBorder,long lNeededHeight);
+ bool LayoutByPage( std::list<sw::sidebarwindows::SwSidebarWin*> &aVisiblePostItList,
+ const Rectangle aBorder,
+ long lNeededHeight);
void CheckForRemovedPostIts();
bool ArrowEnabled(USHORT aDirection,unsigned long aPage) const;
bool BorderOverPageBorder(unsigned long aPage) const;
bool HasScrollbars() const;
void Focus(SfxBroadcaster& rBC);
-
+
sal_Int32 GetInitialAnchorDistance() const;
sal_Int32 GetScrollSize() const;
sal_Int32 GetSpaceBetween() const;
void SetReadOnlyState();
DECL_LINK( CalcHdl, void*);
- protected:
+
+ 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< SwMarginItem* >::const_iterator const_iterator;
+ typedef std::list< SwSidebarItem* >::const_iterator const_iterator;
const_iterator begin() const { return mvPostItFlds.begin(); }
const_iterator end() const { return mvPostItFlds.end(); }
- void InsertItem( SfxBroadcaster* pItem, bool bCheckExistance, bool bFocus);
- void RemoveItem( SfxBroadcaster* pBroadcast );
void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
void LayoutPostIts();
bool CalcRects();
- void MakeVisible(const SwMarginWin* pPostIt,long aPage = -1);
+ void MakeVisible( const sw::sidebarwindows::SwSidebarWin* pPostIt,
+ long aPage = -1);
bool ShowScrollbar(const unsigned long aPage) const;
bool HasNotes() const ;
bool ShowNotes() const;
- bool IsShowAnkor() { return mpIsShowAnkor;}
+ bool IsShowAnchor() { return mbIsShowAnchor;}
unsigned long GetSidebarWidth(bool bPx = false) const;
unsigned long GetSidebarBorderWidth(bool bPx = false) const;
unsigned long GetNoteWidth();
@@ -212,14 +229,14 @@ class SwPostItMgr: public SfxListener
void PrepareView(bool bIgnoreCount = false);
void CorrectPositions();
-
- void Sort(const short aType);
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();
@@ -232,28 +249,34 @@ class SwPostItMgr: public SfxListener
bool IsHit(const Point &aPointPixel);
Color GetArrowColor(USHORT aDirection,unsigned long aPage) const;
- SwMarginWin* GetNextPostIt(USHORT aDirection, SwMarginWin* aPostIt);
+ sw::annotation::SwAnnotationWin* GetAnnotationWin(const SwPostItField* pFld) const;
+
+ sw::sidebarwindows::SwSidebarWin* GetNextPostIt( USHORT aDirection,
+ sw::sidebarwindows::SwSidebarWin* aPostIt);
long GetNextBorder();
- SwMarginWin* GetActivePostIt() { return mpActivePostIt; }
- void SetActivePostIt( SwMarginWin* p);
+
+ 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;
- SwMarginWin* GetPostIt(const SfxBroadcaster* pBroadcaster) const;
- SwMarginWin* GetPostIt(SfxBroadcaster* pBroadcaster) const;
- SwPostIt* GetPostIt(const SwPostItField* pFld) const;
- SwPostIt* GetPostIt(SwPostItField* pFld) const;
-
void SetShadowState(const SwPostItField* pFld,bool bCursor = true);
void SetSpellChecking();
Color GetColorDark(sal_uInt16 aAuthorIndex);
Color GetColorLight(sal_uInt16 aAuthorIndex);
- Color GetColorAnkor(sal_uInt16 aAuthorIndex);
+ Color GetColorAnchor(sal_uInt16 aAuthorIndex);
+
- bool ShowPreview(const SwField* pFld,SwFmtFld*& pFmtFld) const;
-
void RegisterAnswer(OutlinerParaObject* pAnswer) { mpAnswer = pAnswer;}
OutlinerParaObject* IsAnswer() {return mpAnswer;}
void CheckMetaText();
@@ -263,7 +286,18 @@ class SwPostItMgr: public SfxListener
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 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/SidebarWin.hxx b/sw/inc/SidebarWin.hxx
new file mode 100644
index 0000000000..c1005dc63d
--- /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(USHORT 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(USHORT nSlot);
+ void InitControls();
+ void HidePostIt();
+ void DoResize();
+ void ResizeIfNeccessary(long aOldHeight, long aNewHeight);
+ void SetScrollbar();
+
+ void SetVirtualPosSize( const Point& aPoint, const Size& aSize);
+ const Point VirtualPos() { return mPosSize.TopLeft(); }
+ const Size VirtualSize() { return mPosSize.GetSize(); }
+
+ void ShowAnchorOnly(const Point &aPoint);
+ void ShowNote();
+ void HideNote();
+
+ void ResetAttributes();
+
+ void SetSidebarPosition(sw::sidebarwindows::SidebarPosition eSidebarPosition);
+ void SetReadonly(BOOL bSet);
+ 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 const 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;
+
+ 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/warnpassword.hxx b/sw/inc/SidebarWindowsTypes.hxx
index 2b541a14d6..8b86f87edf 100644
--- a/sw/inc/warnpassword.hxx
+++ b/sw/inc/SidebarWindowsTypes.hxx
@@ -1,11 +1,15 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * 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
@@ -25,23 +29,25 @@
*
************************************************************************/
-#ifndef SW_WARNPASSWORD_HXX
-#define SW_WARNPASSWORD_HXX
+#ifndef _SIDEBARWINDOWSTYPES_HXX
+#define _SIDEBARWINDOWSTYPES_HXX
+namespace sw { namespace sidebarwindows {
+enum ViewState
+{
+ VS_NORMAL,
+ VS_VIEW,
+ VS_EDIT
+};
-class SfxMedium;
-/** Static API helper functions. */
-class SwWarnPassword
+enum SidebarPosition
{
-public:
- /** Opens a query warning dialog.
- @descr Pop up Query on export with a choice of yes/no if a
- an encrypted password is imported.
- @return true if yes and false if no. default to true.
- */
- static bool WarningOnPassword( SfxMedium& rMedium );
+ 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/SwNumberTree.hxx b/sw/inc/SwNumberTree.hxx
index 68950ce9e0..ac2ae3f607 100644
--- a/sw/inc/SwNumberTree.hxx
+++ b/sw/inc/SwNumberTree.hxx
@@ -165,13 +165,6 @@ public:
}
/**
- Returns the first child of this node.
-
- @return the child
- */
- SwNumberTreeNode* GetFirstChild() const;
-
- /**
Returns number of this node.
@param bValidate validate the number?
diff --git a/sw/inc/access.hrc b/sw/inc/access.hrc
index f1215375fb..b6c6bb3008 100644
--- a/sw/inc/access.hrc
+++ b/sw/inc/access.hrc
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -30,28 +30,29 @@
#include "rcid.hrc"
-// --> OD 2004-09-27 #117970# - remove STR_ACCESS_PARAGRAPH_NAME, STR_ACCESS_HEADING_NAME
-// STR_ACCESS_PARAGRAPH_DESC and STR_ACCESS_HEADING_DESC
-#define STR_ACCESS_DOC_NAME (RC_ACCESS_BEGIN + 1)
-#define STR_ACCESS_DOC_DESC (RC_ACCESS_BEGIN + 2)
-#define STR_ACCESS_HEADING_WITH_NUM_DESC (RC_ACCESS_BEGIN + 3)
-#define STR_ACCESS_HEADER_NAME (RC_ACCESS_BEGIN + 4)
-#define STR_ACCESS_HEADER_DESC (RC_ACCESS_BEGIN + 5)
-#define STR_ACCESS_FOOTER_NAME (RC_ACCESS_BEGIN + 6)
-#define STR_ACCESS_FOOTER_DESC (RC_ACCESS_BEGIN + 7)
+#define STR_ACCESS_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_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)
-#define ACCESS_ACT_END STR_ACCESS_PAGE_DESC
+#define ACCESS_ACT_END STR_ACCESS_ANNOTATION_BUTTON_DESC
#if ACCESS_ACT_END > RC_ACCESS_END
#error Resource-Id Ueberlauf in #file, #line
diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx
index 5137cdbe34..38cc40fd80 100644
--- a/sw/inc/accmap.hxx
+++ b/sw/inc/accmap.hxx
@@ -33,14 +33,15 @@
#include <vos/mutex.hxx>
#include <svx/IAccessibleViewForwarder.hxx>
#include <svx/IAccessibleParent.hxx>
-#include "viewsh.hxx"
#include <tools/debug.hxx>
#include <tools/fract.hxx>
#include <vector>
+class ViewShell;
class Rectangle;
class SwFrm;
+class SwTxtFrm;
class SwPageFrm;
class SwAccessibleContext;
class SwAccessibleContextMap_Impl;
@@ -48,85 +49,17 @@ class SwAccessibleEventList_Impl;
class SwAccessibleEventMap_Impl;
class SwShapeList_Impl;
class SdrObject;
-namespace accessibility { class AccessibleShape; }
+namespace accessibility {
+ class AccessibleShape;
+}
class SwAccessibleShapeMap_Impl;
struct SwAccessibleEvent_Impl;
-// --> OD 2005-12-13 #i27301#
class SwAccessibleSelectedParas_Impl;
-// <--
class SwRect;
class MapMode;
class SwAccPreviewData;
-// OD 14.01.2003 #103492#
-#ifndef _PREVWPAGE_HXX
-#include <prevwpage.hxx>
-#endif
-
-// helper class that stores preview data
-class SwAccPreviewData
-{
- typedef std::vector<Rectangle> Rectangles;
- Rectangles maPreviewRects;
- Rectangles maLogicRects;
-
- SwRect maVisArea;
- Fraction maScale;
-
- const SwPageFrm *mpSelPage;
-
- /** adjust logic page retangle to its visible part
-
- OD 17.01.2003 #103492#
-
- @author OD
-
- @param _iorLogicPgSwRect
- input/output parameter - reference to the logic page rectangle, which
- has to be adjusted.
-
- @param _rPrevwPgSwRect
- input parameter - constant reference to the corresponding preview page
- rectangle; needed to determine the visible part of the logic page rectangle.
-
- @param _rPrevwWinSize
- input paramter - constant reference to the preview window size in TWIP;
- needed to determine the visible part of the logic page rectangle
- */
- void AdjustLogicPgRectToVisibleArea( SwRect& _iorLogicPgSwRect,
- const SwRect& _rPrevwPgSwRect,
- const Size& _rPrevwWinSize );
-
-public:
- SwAccPreviewData();
- ~SwAccPreviewData();
-
- // OD 14.01.2003 #103492# - complete re-factoring of method due to new
- // page/print preview functionality.
- void Update( const std::vector<PrevwPage*>& _rPrevwPages,
- const Fraction& _rScale,
- const SwPageFrm* _pSelectedPageFrm,
- const Size& _rPrevwWinSize );
-
- // OD 14.01.2003 #103492# - complete re-factoring of method due to new
- // page/print preview functionality.
- void InvalidateSelection( const SwPageFrm* _pSelectedPageFrm );
-
- const SwRect& GetVisArea() const;
-
- MapMode GetMapModeForPreview( ) const;
-
- /** Adjust the MapMode so that the preview page appears at the
- * proper position. rPoint identifies the page for which the
- * MapMode should be adjusted. If bFromPreview is true, rPoint is
- * a preview coordinate; else it's a document coordinate. */
- // OD 17.01.2003 #103492# - delete unused 3rd parameter.
- void AdjustMapMode( MapMode& rMapMode,
- const Point& rPoint ) const;
-
- inline const SwPageFrm *GetSelPage() const { return mpSelPage; }
-
- void DisposePage(const SwPageFrm *pPageFrm );
-};
+struct PrevwPage;
+class Window;
// real states for events
#define ACC_STATE_EDITABLE 0x01
@@ -154,7 +87,7 @@ typedef sal_uInt16 tAccessibleStates;
class SwAccessibleMap : public accessibility::IAccessibleViewForwarder,
public accessibility::IAccessibleParent
{
- ::vos::OMutex maMutex;
+ mutable ::vos::OMutex maMutex;
::vos::OMutex maEventMutex;
SwAccessibleContextMap_Impl *mpFrmMap;
SwAccessibleShapeMap_Impl *mpShapeMap;
@@ -246,14 +179,7 @@ public:
return mpVSh;
}
- inline const SwRect& GetVisArea() const
- {
- DBG_ASSERT( !GetShell()->IsPreView() || (mpPreview != NULL),
- "preview without preview data?" );
- return GetShell()->IsPreView()
- ? mpPreview->GetVisArea()
- : GetShell()->VisArea();
- }
+ const SwRect& GetVisArea() const;
/** get size of a dedicated preview page
@@ -274,10 +200,14 @@ public:
void RemoveContext( const SdrObject *pObj );
// Dispose frame and its children if bRecursive is set
- void Dispose( const SwFrm *pFrm, const SdrObject *pObj,
- sal_Bool bRecursive=sal_False );
-
- void InvalidatePosOrSize( const SwFrm *pFrm, const SdrObject *pObj,
+ 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 );
@@ -333,6 +263,9 @@ public:
*/
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.
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index cf5bcd55ba..894d622cad 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -717,7 +717,6 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
--------------------------------------------------------------------*/
#define FN_LINE_NUMBERING_DLG (FN_EXTRA + 2 ) /* Zeilennumerierung */
-#define FN_THESAURUS_DLG (FN_EXTRA + 3 ) /* Thesaurus */
#define FN_HYPHENATE_OPT_DLG (FN_EXTRA + 5 ) /* Silbentrennung */
#define FN_ADD_UNKNOWN (FN_EXTRA + 6 ) /* Woerter lernen */
#define FN_DICTIONARY_DLG (FN_EXTRA + 8 ) /* Woerterbuecher */
@@ -907,6 +906,7 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#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)
/*--------------------------------------------------------------------
Bereich: Hilfe
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index d8683707b7..951f673646 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -27,6 +27,8 @@
#ifndef _CRSRSH_HXX
#define _CRSRSH_HXX
+#include <com/sun/star/i18n/WordType.hpp>
+
#include <tools/string.hxx>
#include <tools/link.hxx>
#include <tools/rtti.hxx>
@@ -746,11 +748,12 @@ public:
BOOL GoStartSentence();
BOOL GoEndSentence();
BOOL SelectWord( const Point* pPt = 0 );
+ BOOL ExpandToSentenceBorders();
// Position vom akt. Cursor erfragen
- BOOL IsStartWord()const;
- BOOL IsEndWord() const;
- BOOL IsInWord() const;
+ BOOL IsStartWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES )const;
+ BOOL IsEndWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ BOOL IsInWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
BOOL IsStartSentence() const;
BOOL IsEndSentence() const;
BOOL IsSttPara() const;
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 6e1f099cbd..ab413e18fd 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -164,6 +164,7 @@ class SwRubyList;
class SwRubyListEntry;
class SwSectionFmt;
class SwSectionFmts;
+class SwSectionData;
class SwSelBoxes;
class SwSpzFrmFmts;
class SwTOXBase;
@@ -715,6 +716,7 @@ private:
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:
@@ -1803,8 +1805,9 @@ public:
inline const Link& GetOle2Link() const {return aOle2Link;}
// insert section (the ODF kind of section, not the nodesarray kind)
- SwSection* InsertSwSection( const SwPaM& rRange, const SwSection& rNew,
- const SfxItemSet* pAttr = 0, bool bUpdate = true);
+ 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;
@@ -1812,7 +1815,8 @@ public:
const SwSectionFmts& GetSections() const { return *pSectionFmtTbl; }
SwSectionFmt *MakeSectionFmt( SwSectionFmt *pDerivedFrom );
void DelSectionFmt( SwSectionFmt *pFmt, sal_Bool bDelNodes = sal_False );
- void ChgSection( sal_uInt16 nSect, const SwSection&, const SfxItemSet* = 0, sal_Bool bPreventLinkUpdate = FALSE);
+ void UpdateSection(sal_uInt16 const nSect, SwSectionData &,
+ SfxItemSet const*const = 0, bool const bPreventLinkUpdate = false);
String GetUniqueSectionName( const String* pChkStr = 0 ) const;
/* @@@MAINTAINABILITY-HORROR@@@
@@ -2127,7 +2131,7 @@ public:
::sfx2::IXmlIdRegistry& GetXmlIdRegistry();
::sw::MetaFieldManager & GetMetaFieldManager();
- SwDoc* CreateCopy() const;
+ SfxObjectShell* CreateCopy(bool bCallInitNew) const;
};
diff --git a/sw/inc/dochdl.hrc b/sw/inc/dochdl.hrc
index b423351723..8e5980e244 100644..100755
--- a/sw/inc/dochdl.hrc
+++ b/sw/inc/dochdl.hrc
@@ -43,10 +43,8 @@
#define STR_PRIVATEOLE (RC_DOCHDL_BEGIN + 10)
#define STR_DDEFORMAT (RC_DOCHDL_BEGIN + 11)
-#define BMP_SW_TEAM_MUGSHOT (RC_DOCHDL_BEGIN + 12)
-#define STR_SW_TEAM_NAMES (RC_DOCHDL_BEGIN + 13)
-#define DOCHDL_ACT_END STR_SW_TEAM_NAMES
+#define DOCHDL_ACT_END STR_DDEFORMAT
#if DOCHDL_ACT_END > RC_DOCHDL_END
#error Resource-Id Ueberlauf in #file, #line
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index d64358d333..b5c4a23922 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -89,6 +89,7 @@ class SwTable;
class SwTextBlocks; // fuer GlossaryRW
class SwFmtFtn;
class SwSection;
+class SwSectionData;
class SwSectionFmt;
class SwTOXMarks;
class SwTOXBase;
@@ -200,6 +201,7 @@ public:
// change text to Upper/Lower/Hiragana/Katagana/...
void TransliterateText( sal_uInt32 nType );
+ void TransliterateText( const String& rModuleName );
// count words in current selection
void CountWords( SwDocStat& rStat ) const;
@@ -743,9 +745,14 @@ public:
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 bIsGrammarCheck);
+ 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?
BOOL HasConvIter() const;
// Is hyphenation active somewhere else?
@@ -809,9 +816,8 @@ public:
// gebe Liste aller Fussnoten und deren Anfangstexte
USHORT GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes = false );
- // SS fuer Bereiche
- const SwSection* InsertSection( const SwSection& rNew,
- const SfxItemSet* = 0 );
+ SwSection const* InsertSection(
+ SwSectionData & rNewData, SfxItemSet const*const = 0 );
BOOL IsInsRegionAvailable() const;
const SwSection* GetCurrSection() const;
// liefert wie GetCurrSection() den aktuellen Bereich, allerdings geht diese Funktion
@@ -825,7 +831,8 @@ public:
USHORT GetSectionFmtPos( const SwSectionFmt& ) const;
const SwSectionFmt& GetSectionFmt(USHORT nFmt) const;
void DelSectionFmt( USHORT nFmt );
- void ChgSection( USHORT nSect, const SwSection&, const SfxItemSet* = 0 );
+ void UpdateSection(sal_uInt16 const nSect, SwSectionData &,
+ SfxItemSet const*const = 0);
BOOL IsAnySectionInDoc( BOOL bChkReadOnly = FALSE,
BOOL bChkHidden = FALSE,
BOOL BChkTOX = FALSE ) const;
@@ -871,7 +878,7 @@ public:
BOOL IsGlblDocSaveLinks() const;
USHORT GetGlobalDocContent( SwGlblDocContents& rArr ) const;
BOOL InsertGlobalDocContent( const SwGlblDocContent& rPos,
- const SwSection& rNew );
+ SwSectionData & rNew );
BOOL InsertGlobalDocContent( const SwGlblDocContent& rPos,
const SwTOXBase& rTOX );
BOOL InsertGlobalDocContent( const SwGlblDocContent& rPos );
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index b272292f82..90785a008c 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -63,6 +63,11 @@ class SwFrmFmt;
struct SwSortOptions;
class SdrMarkList;
+namespace svx
+{
+ class ISdrObjectFilter;
+}
+
// return values for GetFrmType() und GetSelFrmType().
//! values can be combined via logival or
@@ -464,6 +469,7 @@ public:
BOOL GetObjAttr( SfxItemSet &rSet ) const;
BOOL SetObjAttr( const SfxItemSet &rSet );
+ const SdrObject* GetBestObject( BOOL bNext, USHORT eType = GOTOOBJ_DRAW_ANY, BOOL bFlat = TRUE, const ::svx::ISdrObjectFilter* pFilter = NULL );
BOOL GotoObj( BOOL bNext, USHORT /*GOTOOBJ_...*/ eType = GOTOOBJ_DRAW_ANY);
//Setzen vom DragMode (z.B. Rotate), tut nix bei Rahmenselektion.
@@ -476,7 +482,7 @@ public:
void EndTextEdit(); //Loescht ggf. das Objekt.
//Ankertyp des selektierten Objektes, -1 bei Uneindeutigkeit oder
- //Rahmenselektion; FLY_PAGE bzw. FLY_AT_CNTNT aus frmatr.hxx sonst.
+ //Rahmenselektion; FLY_AT_PAGE bzw. FLY_AT_PARA aus frmatr.hxx sonst.
short GetAnchorId() const;
//Erzeugen von DrawObjekten, beim Begin wird der Objekttyp mitgegeben.
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index e7bea38aae..500a4f1b80 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -305,12 +305,17 @@ inline void SwFieldType::UpdateFlds() const
class SW_DLLPUBLIC SwField
{
+private:
+ mutable String m_Cache; /// #i85766# cached expansion (for clipboard)
USHORT nLang; // Immer ueber SetLanguage aendern!
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;}
@@ -325,12 +330,16 @@ public:
// neuen Typ setzen (wird fuer das Kopieren zwischen Dokumenten benutzt)
virtual SwFieldType* ChgTyp( SwFieldType* );
- // Expandierung fuer die Anzeige
- virtual String Expand() const = 0;
+ /** expand the field.
+ @param bInClipboard field is in clipboard document?
+ @return the generated text (suitable for display)
+ */
+ String ExpandField(bool const bInClipboard) const;
// liefert den Namen oder den Inhalt
virtual String GetCntnt(BOOL bName = FALSE) const;
- virtual SwField* Copy() const = 0;
+
+ SwField * CopyField() const;
// ResId
USHORT Which() const
diff --git a/sw/inc/htmltbl.hxx b/sw/inc/htmltbl.hxx
index 6b5544a9ae..4c3918a7e1 100644
--- a/sw/inc/htmltbl.hxx
+++ b/sw/inc/htmltbl.hxx
@@ -267,6 +267,7 @@ class SwHTMLTableLayout
DECL_STATIC_LINK( SwHTMLTableLayout, DelayedResize_Impl, void* );
+ static USHORT GetBrowseWidthByVisArea( const SwDoc& rDoc );
public:
SwHTMLTableLayout( const SwTable *pSwTbl,
@@ -348,7 +349,6 @@ public:
// oder eine ViewShell vorhanden ist. Sonst wird 0 zurueckgegeben.
// (Wird vom HTML-Filter benoetigt, da der nicht an das Layout kommt.)
static USHORT GetBrowseWidth( const SwDoc& rDoc );
- static USHORT GetBrowseWidthByVisArea( const SwDoc& rDoc );
// Ermitteln der verfuegbaren Breite uber den Tabellen-Frame
USHORT GetBrowseWidthByTabFrm( const SwTabFrm& rTabFrm ) const;
diff --git a/sw/inc/index.hxx b/sw/inc/index.hxx
index bf09e85b76..a4e60b30b1 100644
--- a/sw/inc/index.hxx
+++ b/sw/inc/index.hxx
@@ -63,7 +63,7 @@ class SW_DLLPUBLIC SwIndex
void Remove(); // Ausketten
public:
- SwIndex( SwIndexReg * pReg, xub_StrLen nIdx = 0 );
+ explicit SwIndex(SwIndexReg *const pReg, xub_StrLen const nIdx = 0);
SwIndex( const SwIndex & );
SwIndex( const SwIndex &, short nDiff );
~SwIndex() { Remove(); }
diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx
index a9e361cf73..82517d6942 100644
--- a/sw/inc/ndarr.hxx
+++ b/sw/inc/ndarr.hxx
@@ -25,19 +25,19 @@
*
************************************************************************/
-#ifndef _NDARR_HXX
-#define _NDARR_HXX
+#ifndef SW_NDARR_HXX
+#define SW_NDARR_HXX
+
+#include <vector>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
+
#include <svl/svarray.hxx>
+#include <svtools/embedhlp.hxx>
-#ifndef _BPARR_HXX
#include <bparr.hxx>
-#endif
#include <ndtyp.hxx>
-#include <svtools/embedhlp.hxx>
-#include <vector>
class Graphic;
class GraphicObject;
@@ -55,8 +55,9 @@ class SwNodeRange;
class SwOLENode;
class SwOutlineNodes;
class SwPaM;
-class SwSection;
+class SwSectionData;
class SwSectionFmt;
+class SwTOXBase;
class SwSectionNode;
class SwStartNode;
class SwTableBoxFmt;
@@ -316,12 +317,13 @@ public:
USHORT nMode = 0, SwHistory* pHistory = 0 );
// fuege eine neue SwSection ein
- SwSectionNode* InsertSection( const SwNodeIndex& rNdIdx,
+ SwSectionNode* InsertTextSection(SwNodeIndex const& rNdIdx,
SwSectionFmt& rSectionFmt,
- const SwSection&,
- const SwNodeIndex* pEnde,
- BOOL bInsAtStart = TRUE,
- BOOL bCreateFrms = TRUE );
+ 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; }
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index ad783f1235..c63efbe3dc 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _NDTXT_HXX
-#define _NDTXT_HXX
+#ifndef SW_NDTXT_HXX
+#define SW_NDTXT_HXX
#include <cppuhelper/weakref.hxx>
@@ -133,6 +133,8 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
// 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;
@@ -199,6 +201,8 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
inline void TryDeleteSwpHints();
+ SW_DLLPRIVATE void impl_FmtToTxtAttr(const SfxItemSet& i_rAttrSet);
+
public:
bool IsWordCountDirty() const;
bool IsWrongDirty() const;
@@ -363,14 +367,30 @@ public:
BOOL DontExpandFmt( const SwIndex& rIdx, bool bFlag = true,
BOOL bFmtToTxtAttributes = TRUE );
- // gebe das vorgegebene Attribut, welches an der TextPosition (rIdx)
- // gesetzt ist zurueck. Gibt es keines, returne 0-Pointer
- // gesetzt heisst: Start <= rIdx < End
- // FIXME: this function does not seem to be well-defined for those
- // hints of which several may cover a single position, like TOXMark,
- // or CharFmt
- SwTxtAttr *GetTxtAttr( const SwIndex& rIdx, USHORT nWhichHt,
- BOOL bExpand = FALSE ) const;
+ 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.
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index 629145fa68..47f58ce3ca 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -25,18 +25,23 @@
*
************************************************************************/
-#ifndef _NODE_HXX
-#define _NODE_HXX
+#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>
-#include <boost/shared_ptr.hpp>
-#include <vector>
+
// ---------------------
// forward Deklarationen
// ---------------------
@@ -55,6 +60,7 @@ class SwOLENode;
class SwRect;
class SwSection;
class SwSectionFmt;
+class SwTOXBase;
class SwSectionNode;
class SwStartNode;
class SwTabFrm;
@@ -547,22 +553,24 @@ private:
//---------
// SwSectionNode
//---------
-class SwSectionNode : public SwStartNode
+class SwSectionNode
+ : public SwStartNode
+ , private ::boost::noncopyable
{
friend class SwNodes;
- SwSection* pSection;
+
+private:
+ ::std::auto_ptr<SwSection> const m_pSection;
+
protected:
virtual ~SwSectionNode();
public:
- SwSectionNode( const SwNodeIndex&, SwSectionFmt& rFmt );
+ SwSectionNode(SwNodeIndex const&,
+ SwSectionFmt & rFmt, SwTOXBase const*const pTOXBase);
- const SwSection& GetSection() const { return *pSection; }
- SwSection& GetSection() { return *pSection; }
-
- // setze ein neues SectionObject. Erstmal nur gedacht fuer die
- // neuen VerzeichnisSections. Der geht ueber in den Besitz des Nodes!
- void SetNewSection( SwSection* pNewSection );
+ const SwSection& GetSection() const { return *m_pSection; }
+ SwSection& GetSection() { return *m_pSection; }
SwFrm *MakeFrm();
@@ -591,10 +599,6 @@ public:
// _nicht_ in einem versteckten (Unter-)Bereich liegt
BOOL IsCntntHidden() const;
-private:
- // privater Constructor, weil nie kopiert werden darf !!
- SwSectionNode( const SwSection& rNode );
- SwSectionNode & operator= ( const SwSection& rNode );
};
diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
index 8495ddd9f3..5f27eabcc4 100644
--- a/sw/inc/pch/precompiled_sw.hxx
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -728,7 +728,7 @@
#include "editeng/eeitem.hxx"
#include "filter/msfilter/escherex.hxx"
#include "svx/extrusionbar.hxx"
-#include "svx/extrusioncontrols.hxx"
+#include "svx/extrusioncolorcontrol.hxx"
#include "svx/fillctrl.hxx"
#include "svx/flagsdef.hxx"
#include "editeng/flstitem.hxx"
diff --git a/sw/inc/postit.hxx b/sw/inc/postit.hxx
deleted file mode 100644
index e5484741d9..0000000000
--- a/sw/inc/postit.hxx
+++ /dev/null
@@ -1,413 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _POSTIT_HXX
-#define _POSTIT_HXX
-
-#include <postithelper.hxx>
-
-#include <vcl/window.hxx>
-#include <swrect.hxx>
-#include <svx/sdr/overlay/overlayobject.hxx>
-
-#include <tools/datetime.hxx>
-#include <tools/date.hxx>
-
-#include <vcl/lineinfo.hxx>
-#include <basegfx/polygon/b2dpolygon.hxx>
-#include <editeng/editstat.hxx>
-
-class SwPostItMgr;
-class SwPostItField;
-class SwFmtFld;
-class OutlinerView;
-class Outliner;
-class ScrollBar;
-class SwEditWin;
-class SwView;
-class SwPostIt;
-class Edit;
-class MultiLineEdit;
-class PopupMenu;
-class SvxLanguageItem;
-class SwRedline;
-class OutlinerParaObject;
-
-#define ANKORLINE_WIDTH 1
-
-enum AnkorState {AS_ALL, AS_START, AS_END,AS_TRI};
-
-class SwPostItAnkor: public sdr::overlay::OverlayObjectWithBasePosition
-{
- protected:
- /* 6------------7
- 1 /
- /4\ ---------------5
- 2 - 3
- */
-
- basegfx::B2DPoint maSecondPosition;
- basegfx::B2DPoint maThirdPosition;
- basegfx::B2DPoint maFourthPosition;
- basegfx::B2DPoint maFifthPosition;
- basegfx::B2DPoint maSixthPosition;
- basegfx::B2DPoint maSeventhPosition;
-
- // helpers to fill and reset geometry
- void implEnsureGeometry();
- void implResetGeometry();
-
- // geometry creation for OverlayObject
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
-
- private:
- // object's geometry
- basegfx::B2DPolygon maTriangle;
- basegfx::B2DPolygon maLine;
- basegfx::B2DPolygon maLineTop;
- unsigned long mHeight;
- AnkorState mAnkorState;
-
- // bitfield
- unsigned mbShadowedEffect : 1;
- unsigned mbLineSolid : 1;
-
- public:
- SwPostItAnkor(const basegfx::B2DPoint& rBasePos,
- const basegfx::B2DPoint& rSecondPos,
- const basegfx::B2DPoint& rThirdPos,
- const basegfx::B2DPoint& rFourthPos,
- const basegfx::B2DPoint& rFifthPos,
- const basegfx::B2DPoint& rSixthPos,
- const basegfx::B2DPoint& rSeventhPos,
- Color aBaseColor,
- bool bShadowedEffect,
- bool bLineSolid);
- virtual ~SwPostItAnkor();
-
- const basegfx::B2DPoint& GetSecondPosition() const { return maSecondPosition; }
- const basegfx::B2DPoint& GetThirdPosition() const { return maThirdPosition; }
- const basegfx::B2DPoint& GetFourthPosition() const { return maFourthPosition; }
- const basegfx::B2DPoint& GetFifthPosition() const { return maFifthPosition; }
- const basegfx::B2DPoint& GetSixthPosition() const { return maSixthPosition; }
- const basegfx::B2DPoint& GetSeventhPosition() const { return maSeventhPosition; }
-
- void SetAllPosition(const basegfx::B2DPoint& rPoint1, const basegfx::B2DPoint& rPoint2, const basegfx::B2DPoint& rPoint3,
- const basegfx::B2DPoint& rPoint4, const basegfx::B2DPoint& rPoint5, const basegfx::B2DPoint& rPoint6, const basegfx::B2DPoint& rPoint7);
- void SetTriPosition(const basegfx::B2DPoint& rPoint1,const basegfx::B2DPoint& rPoint2,const basegfx::B2DPoint& rPoint3,
- const basegfx::B2DPoint& rPoint4,const basegfx::B2DPoint& rPoint5);
- void SetSixthPosition(const basegfx::B2DPoint& rNew);
- void SetSeventhPosition(const basegfx::B2DPoint& rNew);
-
- bool getLineSolid() const { return mbLineSolid; }
- void setLineSolid(bool bNew);
-
- void SetHeight(const unsigned long aHeight) {mHeight = aHeight;};
-
- bool getShadowedEffect() const { return mbShadowedEffect; }
-
- void SetAnkorState(AnkorState aState);
- AnkorState GetAnkorState() const {return mAnkorState;}
-};
-
-enum ShadowState {SS_NORMAL, SS_VIEW, SS_EDIT};
-
-class SwPostItShadow: public sdr::overlay::OverlayObjectWithBasePosition
-{
- protected:
- // geometry creation for OverlayObject
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
-
- private:
- basegfx::B2DPoint maSecondPosition;
- ShadowState mShadowState;
-
- public:
- SwPostItShadow(const basegfx::B2DPoint& rBasePos, const basegfx::B2DPoint& rSecondPosition, Color aBaseColor,ShadowState aState);
- virtual ~SwPostItShadow();
-
- void SetShadowState(ShadowState aState);
- ShadowState GetShadowState() {return mShadowState;}
-
- const basegfx::B2DPoint& GetSecondPosition() const { return maSecondPosition; }
- void SetSecondPosition(const basegfx::B2DPoint& rNew);
- void SetPosition(const basegfx::B2DPoint& rPoint1,const basegfx::B2DPoint& rPoint2);
-};
-
-class PostItTxt : public Window
-{
- private:
- OutlinerView* mpOutlinerView;
- SwMarginWin* mpMarginWin;
-
- bool mMouseOver;
- BOOL mbShowPopup;
-
- protected:
- virtual void Paint( const Rectangle& rRect);
- virtual void KeyInput( const KeyEvent& rKeyEvt );
- virtual void MouseMove( const MouseEvent& rMEvt );
- virtual void MouseButtonDown( const MouseEvent& rMEvt );
- virtual void MouseButtonUp( const MouseEvent& rMEvt );
- virtual void Command( const CommandEvent& rCEvt );
- virtual void DataChanged( const DataChangedEvent& aData);
- virtual void LoseFocus();
- virtual void RequestHelp(const HelpEvent &rEvt);
- virtual XubString GetSurroundingText() const;
- virtual Selection GetSurroundingTextSelection() const;
-
- DECL_LINK( Select, Menu* );
-
- public:
- PostItTxt(Window* pParent, WinBits nBits);
- ~PostItTxt();
-
- virtual void GetFocus();
- void SetTextView( OutlinerView* aEditView ) { mpOutlinerView = aEditView; }
-
- DECL_LINK( WindowEventListener, VclSimpleEvent* );
- DECL_LINK( OnlineSpellCallback, SpellCallbackInfo*);
-};
-
-typedef sal_Int64 SwPostItBits;
-
-#define PB_Preview ((SwPostItBits)0x00000001)
-
-
-class SwMarginWin : public Window
-{
- private:
- ULONG mnEventId;
- SwView* mpView;
- sdr::overlay::OverlayManager* pOverlayManager;
- OutlinerView* mpOutlinerView;
- Outliner* mpOutliner;
- PostItTxt* mpPostItTxt;
- MultiLineEdit* mpMeta;
- ScrollBar* mpVScrollbar;
- SwPostItAnkor* mpAnkor;
- SwPostItShadow* mpShadow;
- SwPostItMgr* mpMgr;
- bool mbMeta;
- Color mColorAnkor;
- Color mColorDark;
- Color mColorLight;
- basegfx::B2DPolygon aPopupTriangle;
- bool mbMarginSide;
- Rectangle mPosSize;
- SwRect mAnkorRect;
- long mPageBorder;
- SwPostItBits nFlags;
- bool mbMouseOverButton;
-
- protected:
- bool mbReadonly;
- PopupMenu* mpButtonPopup;
- bool mbIsFollow;
- Rectangle mRectMetaButton;
- virtual void DataChanged( const DataChangedEvent& aEvent);
- virtual void LoseFocus();
- virtual void MouseButtonDown( const MouseEvent& rMEvt );
- virtual void MouseMove( const MouseEvent& rMEvt );
- virtual void Paint( const Rectangle& rRect);
- virtual void GetFocus();
-
- void SetSizePixel( const Size& rNewSize );
- SfxItemSet DefaultItem();
-
- DECL_LINK(ModifyHdl, void*);
- DECL_LINK(ScrollHdl, ScrollBar*);
- DECL_LINK(DeleteHdl, void*);
-
- public:
- TYPEINFO();
- SwMarginWin( Window* pParent, WinBits nBits, SwPostItMgr* aMgr,SwPostItBits aBits);
- virtual ~SwMarginWin();
-
- void SetSize( const Size& rNewSize );
- void SetPosSizePixelRect( long nX, long nY,long nWidth, long nHeight,const SwRect &aRect,const long PageBorder);
- void SetPosAndSize();
- void TranslateTopPosition(const long aAmount);
- virtual void CheckMetaText();
-
- PostItTxt* PostItText() { return mpPostItTxt;}
- ScrollBar* Scrollbar() { return mpVScrollbar;}
- SwPostItAnkor* Ankor() { return mpAnkor;}
- SwPostItShadow* Shadow() { return mpShadow;}
- OutlinerView* View() { return mpOutlinerView;}
- SwView* DocView() { return mpView;}
- Outliner* Engine() { return mpOutliner;}
- SwPostItMgr* Mgr() { return mpMgr; }
-
- SwRect GetAnkorRect() { return mAnkorRect; }
- SwEditWin* EditWin();
-
- long GetPostItTextHeight();
-
- void SwitchToPostIt(USHORT aDirection);
- //void SwitchToPostIt(bool aDirection);
- virtual void SwitchToFieldPos();
- virtual sal_uInt32 MoveCaret() { return 0;};
-
- virtual void UpdateData() = 0;
- virtual void SetPostItText() = 0;
- virtual void Delete();
- virtual void GotoPos() = 0;
- virtual void SetPopup() = 0;
-
- virtual String GetAuthor();
- virtual Date GetDate();
- virtual Time GetTime();
-
- void ExecuteCommand(USHORT nSlot);
- void InitControls();
- void HidePostIt();
- void DoResize();
- void ResizeIfNeccessary(long aOldHeight, long aNewHeight);
- void SetScrollbar();
-
- void SetVirtualPosSize( const Point& aPoint, const Size& aSize);
- const Point VirtualPos() { return mPosSize.TopLeft(); }
- const Size VirtualSize() { return mPosSize.GetSize(); }
-
- void ShowAnkorOnly(const Point &aPoint);
- void ShowNote();
- void HideNote();
-
- void ResetAttributes();
-
- void SetMarginSide(bool aMarginSide);
- void SetReadonly(BOOL bSet);
- BOOL IsReadOnly() { return mbReadonly;}
- bool IsPreview() { return nFlags & PB_Preview;}
-
- void SetLanguage(const SvxLanguageItem aNewItem);
- virtual SvxLanguageItem GetLanguage(void);
-
- void SetColor(Color aColorDark,Color aColorLight, Color aColorAnkor);
- Color ColorDark() { return mColorDark; }
- Color ColorLight() { return mColorLight; }
- void Rescale();
-
- void SetViewState(ShadowState bState);
-
- bool IsFollow() { return mbIsFollow; }
- void SetFollow( bool bIsFollow) { mbIsFollow = bIsFollow;};
- virtual bool CalcFollow();
-
- SwMarginWin* GetTopReplyNote();
- bool IsAnyStackParentVisible();
-
- sal_Int32 GetMetaHeight();
- sal_Int32 GetMinimumSizeWithMeta();
- sal_Int32 GetMinimumSizeWithoutMeta();
- sal_Int32 GetMetaButtonAreaWidth();
- sal_Int32 GetScrollbarWidth();
-
- void SetSpellChecking();
-
- void ToggleInsMode();
-
- virtual void ActivatePostIt();
- virtual void DeactivatePostIt();
-
- virtual SwPostItHelper::SwLayoutStatus GetStatus() { return SwPostItHelper::NONE; }
-
- virtual bool IsProtected() {return mbReadonly;};
-};
-
-// implementation for change tracking comments, fully functional, but not yet used
-/*
-class SwRedComment : public SwMarginWin
-{
- private:
- SwRedline* pRedline;
-
- protected:
- virtual void MouseButtonDown( const MouseEvent& rMEvt );
- public:
- TYPEINFO();
- SwRedComment( Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits,SwRedline* pRed);
- virtual ~SwRedComment() {};
-
- virtual void UpdateData();
- virtual void SetPostItText();
- virtual void Delete();
- virtual void GotoPos();
- virtual void SetPopup();
- virtual void ActivatePostIt();
- virtual void DeactivatePostIt();
-
- virtual String GetAuthor();
- virtual Date GetDate();
- virtual Time GetTime();
-
- virtual bool IsProtected();
-};
-*/
-class SwPostIt : public SwMarginWin
-{
- private:
- SwFmtFld* mpFmtFld;
- SwPostItField* mpFld;
- SwPostItHelper::SwLayoutStatus mStatus;
- Color mChangeColor;
-
- protected:
- virtual void MouseButtonDown( const MouseEvent& rMEvt );
-
- public:
- TYPEINFO();
- SwPostIt( Window* pParent, WinBits nBits,SwFmtFld* aField,SwPostItMgr* aMgr,SwPostItBits aBits);
- virtual ~SwPostIt() {};
-
- virtual void UpdateData();
- virtual void SetPostItText();
- virtual void Delete();
- virtual void GotoPos();
- virtual void SetPopup();
-
- virtual String GetAuthor();
- virtual Date GetDate();
- virtual Time GetTime();
-
- virtual sal_uInt32 MoveCaret();
-
- void SetChangeTracking(SwPostItHelper::SwLayoutStatus& aStatus,Color aColor);
- virtual SwPostItHelper::SwLayoutStatus GetStatus() { return mStatus; }
- Color GetChangeColor() { return mChangeColor; }
-
- sal_uInt32 CountFollowing();
- virtual bool CalcFollow();
- void InitAnswer(OutlinerParaObject* pText);
-
- virtual SvxLanguageItem GetLanguage(void);
-
- virtual bool IsProtected();
-};
-
-#endif
diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx
index 7ef25ede3c..31df018985 100644
--- a/sw/inc/postithelper.hxx
+++ b/sw/inc/postithelper.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -32,14 +32,18 @@
#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 SwMarginWin;
class SwPostItMgr;
+class SwEditWin;
+namespace sw { namespace sidebarwindows {
+ class SwSidebarWin;
+} }
struct SwPosition;
@@ -47,12 +51,23 @@ typedef sal_Int64 SwPostItBits;
struct SwLayoutInfo
{
+ const SwFrm* mpAnchorFrm;
SwRect mPosition;
SwRect mPageFrame;
SwRect mPagePrtArea;
unsigned long mnPageNumber;
- bool mbMarginSide;
+ sw::sidebarwindows::SidebarPosition meSidebarPosition;
USHORT mRedlineAuthor;
+
+ SwLayoutInfo()
+ : mpAnchorFrm(0)
+ , mPosition()
+ , mPageFrame()
+ , mPagePrtArea()
+ , mnPageNumber(1)
+ , meSidebarPosition(sw::sidebarwindows::SIDEBAR_NONE)
+ , mRedlineAuthor(0)
+ {}
};
namespace SwPostItHelper
@@ -63,77 +78,82 @@ namespace SwPostItHelper
};
SwLayoutStatus getLayoutInfos( std::vector< SwLayoutInfo >&, SwPosition& );
- SwLayoutStatus getLayoutInfos( std::vector< SwLayoutInfo >&, SwTxtFld* );
long getLayoutHeight( const SwRootFrm* pRoot );
void setSidebarChanged( SwRootFrm* pRoot, bool bBrowseMode );
unsigned long getPageInfo( SwRect& rPageFrm, const SwRootFrm* , const Point& );
}
-class SwMarginItem
+class SwSidebarItem
{
public:
- SwMarginWin* pPostIt;
+ sw::sidebarwindows::SwSidebarWin* pPostIt;
bool bShow;
bool bFocus;
- bool bMarginSide;
- SwRect mPos;
- SwRect mFramePos;
- SwRect mPagePos;
- unsigned long mnPageNumber;
+
SwPostItHelper::SwLayoutStatus mLayoutStatus;
- USHORT mRedlineAuthor;
- SwMarginItem(bool aShow, bool aFocus)
- : pPostIt(0),
- bShow(aShow),
- bFocus(aFocus),
- bMarginSide(false),
- mnPageNumber(1),
- mLayoutStatus( SwPostItHelper::INVISIBLE ),
- mRedlineAuthor(0)
+ SwLayoutInfo maLayoutInfo;
+
+ SwSidebarItem( const bool aShow,
+ const bool aFocus)
+ : pPostIt(0)
+ , bShow(aShow)
+ , bFocus(aFocus)
+ , mLayoutStatus( SwPostItHelper::INVISIBLE )
+ , maLayoutInfo()
{}
- virtual ~SwMarginItem(){}
- virtual SwPosition GetPosition() = 0;
+ virtual ~SwSidebarItem(){}
+ virtual SwPosition GetAnchorPosition() const = 0;
virtual bool UseElement() = 0;
- virtual SwFmtFld* GetFmtFld() = 0;
+ virtual SwFmtFld* GetFmtFld() const = 0;
virtual SfxBroadcaster* GetBroadCaster() const = 0;
- virtual SwMarginWin* GetMarginWindow(Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits) = 0;
+ virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin,
+ WinBits nBits,
+ SwPostItMgr& aMgr,
+ SwPostItBits aBits) = 0;
};
/*
-class SwRedCommentItem: public SwMarginItem
+class SwRedCommentItem: public SwSidebarItem
{
private:
SwRedline* pRedline;
public:
- SwRedCommentItem( SwRedline* pRed, bool aShow, bool aFocus)
- : SwMarginItem(aShow,aFocus),
+ SwRedCommentItem( SwRedline* pRed, bool aShow, bool aFocus)
+ : SwSidebarItem(aShow,aFocus),
pRedline(pRed) {}
virtual ~SwRedCommentItem() {}
- virtual SwPosition GetPosition();
+ virtual SwPosition GetAnchorPosition() const;
virtual bool UseElement();
- virtual SwFmtFld* GetFmtFld() {return 0; }
+ virtual SwFmtFld* GetFmtFld() const {return 0; }
virtual SfxBroadcaster* GetBroadCaster() const { return dynamic_cast<SfxBroadcaster *> (pRedline); }
- virtual SwMarginWin* GetMarginWindow(Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits);
+ virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin,
+ WinBits nBits,
+ SwPostItMgr& aMgr,
+ SwPostItBits aBits);
};
*/
-class SwPostItItem: public SwMarginItem
+class SwAnnotationItem: public SwSidebarItem
{
private:
SwFmtFld* pFmtFld;
public:
- SwPostItItem( SwFmtFld* p, bool aShow, bool aFocus)
- : SwMarginItem(aShow,aFocus) ,
- pFmtFld(p)
- {
- }
- virtual ~SwPostItItem() {}
- virtual SwPosition GetPosition();
+ 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() {return pFmtFld;}
+ virtual SwFmtFld* GetFmtFld() const {return pFmtFld;}
virtual SfxBroadcaster* GetBroadCaster() const { return dynamic_cast<SfxBroadcaster *> (pFmtFld); }
- virtual SwMarginWin* GetMarginWindow(Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits);
+ virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin,
+ WinBits nBits,
+ SwPostItMgr& aMgr,
+ SwPostItBits aBits);
};
#endif // _POSTITHELPER_HXX
diff --git a/sw/inc/rcid.hrc b/sw/inc/rcid.hrc
index c5f7d7d6d0..e5cd3e1ace 100644
--- a/sw/inc/rcid.hrc
+++ b/sw/inc/rcid.hrc
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -78,6 +78,7 @@
#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
@@ -87,8 +88,6 @@
#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)
@@ -97,6 +96,10 @@
#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)
diff --git a/sw/inc/rolbck.hxx b/sw/inc/rolbck.hxx
index 05fa3f20bf..dacc5621d5 100644
--- a/sw/inc/rolbck.hxx
+++ b/sw/inc/rolbck.hxx
@@ -75,13 +75,6 @@ class SwCharFmt;
#include <memory>
-#ifdef DBG_UTIL
-class Writer;
-#define OUT_HSTR_HINT( name ) \
- friend Writer& OutUndo_Hstr_ ## name( Writer&, const SwHistoryHint& );
-#else
-#define OUT_HSTR_HINT( name )
-#endif
enum HISTORY_HINT {
HSTRY_SETFMTHNT,
@@ -126,7 +119,6 @@ public:
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
virtual String GetDescription() const;
- OUT_HSTR_HINT(SetFmtHnt)
};
class SwHistoryResetFmt : public SwHistoryHint
@@ -140,7 +132,6 @@ public:
// <--
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
- OUT_HSTR_HINT(ResetFmtHnt)
};
class SwHistorySetTxt : public SwHistoryHint
@@ -155,12 +146,11 @@ public:
virtual ~SwHistorySetTxt();
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
- OUT_HSTR_HINT(SetTxtHnt)
};
class SwHistorySetTxtFld : public SwHistoryHint
{
- //!! beware of the order for the declation of thje auto_ptrs.
+ //!! beware of the order for the declation of the auto_ptrs.
//!! If they get destroyed in the wrong order sw may crash (namely mail-merge as well)
::std::auto_ptr<SwFieldType> m_pFldType;
const ::std::auto_ptr<SwFmtFld> m_pFld;
@@ -176,7 +166,6 @@ public:
virtual String GetDescription() const;
- OUT_HSTR_HINT(SetTxtFldHnt)
};
class SwHistorySetRefMark : public SwHistoryHint
@@ -190,7 +179,6 @@ public:
SwHistorySetRefMark( SwTxtRefMark* pTxtHt, ULONG nNode );
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
- OUT_HSTR_HINT(SetRefMarkHnt)
};
class SwHistorySetTOXMark : public SwHistoryHint
@@ -207,7 +195,6 @@ public:
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
int IsEqual( const SwTOXMark& rCmp ) const;
- OUT_HSTR_HINT(SetToxMarkHnt)
};
class SwHistoryResetTxt : public SwHistoryHint
@@ -226,7 +213,6 @@ public:
ULONG GetNode() const { return m_nNodeIndex; }
xub_StrLen GetCntnt() const { return m_nStart; }
- OUT_HSTR_HINT(ResetTxtHnt)
};
class SwHistorySetFootnote : public SwHistoryHint
@@ -245,7 +231,6 @@ public:
virtual String GetDescription() const;
- OUT_HSTR_HINT(SetFtnHnt)
};
class SwHistoryChangeFmtColl : public SwHistoryHint
@@ -258,7 +243,6 @@ public:
SwHistoryChangeFmtColl( SwFmtColl* pColl, ULONG nNode, BYTE nNodeWhich );
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
- OUT_HSTR_HINT(ChangeFmtColl)
};
class SwHistoryTxtFlyCnt : public SwHistoryHint
@@ -271,7 +255,6 @@ public:
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
SwUndoDelLayFmt* GetUDelLFmt() { return m_pUndo.get(); }
- OUT_HSTR_HINT(FlyCnt)
};
class SwHistoryBookmark : public SwHistoryHint
@@ -284,7 +267,6 @@ class SwHistoryBookmark : public SwHistoryHint
bool IsEqualBookmark(const ::sw::mark::IMark& rBkmk);
const ::rtl::OUString& GetName() const;
- OUT_HSTR_HINT(Bookmark)
private:
const ::rtl::OUString m_aName;
@@ -312,7 +294,6 @@ public:
const SvUShortsSort& rSetArr );
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
- OUT_HSTR_HINT(SetAttrSet)
};
@@ -333,7 +314,6 @@ public:
ULONG GetNode() const { return m_nNodeIndex; }
xub_StrLen GetCntnt() const { return m_nStart; }
- OUT_HSTR_HINT(ResetAttrSet)
};
class SwHistoryChangeFlyAnchor : public SwHistoryHint
@@ -368,7 +348,6 @@ public:
SwHistoryChangeCharFmt( const SfxItemSet& rSet, const String & sFmt);
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
- OUT_HSTR_HINT(SetAttrSet)
};
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx
index 6d0622228b..f44f904f05 100644
--- a/sw/inc/section.hxx
+++ b/sw/inc/section.hxx
@@ -28,14 +28,16 @@
#ifndef _SECTION_HXX
#define _SECTION_HXX
+#include <boost/utility.hpp>
#include <com/sun/star/uno/Sequence.h>
-#include <sfx2/lnkbase.hxx>
+
#include <tools/rtti.hxx>
-#ifndef _TOOLS_REF_HXX
#include <tools/ref.hxx>
-#endif
#include <svl/svarray.hxx>
+#include <sfx2/lnkbase.hxx>
+#include <sfx2/Metadatable.hxx>
+
#include <frmfmt.hxx>
@@ -77,61 +79,119 @@ enum LinkCreateType
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; }
-class SW_DLLPUBLIC SwSection : public SwClient
+ ::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
+ , private ::boost::noncopyable
{
// damit beim Anlegen/Loeschen von Frames das Flag richtig gepflegt wird!
friend class SwSectionNode;
// the "read CTOR" of SwSectionFrm have to change the Hiddenflag
friend class SwSectionFrm;
- String sSectionNm;
- String sCondition; // erstmal, vielleicht auch mal ein Feld ??
- String sLinkFileName,
- sLinkFilePassWd; // JP 27.02.2001: must later changed to Sequence
- ::com::sun::star::uno::Sequence <sal_Int8> aPasswd;
-
- SwServerObjectRef refObj; // falls DataServer -> Pointer gesetzt
- ::sfx2::SvBaseLinkRef refLink;
-
- SectionType eType;
-
- BOOL bProtectFlag : 1; // Flags fuer schnelle Abfragen, wird ueber
- // Attribut im Format gesetzt
- BOOL bHiddenFlag : 1; // Flag: Absaetze versteckt ?
- // --> FME 2004-06-22 #114856# edit in readonly sections
- BOOL bEditInReadonlyFlag : 1;
- // <--
- BOOL bHidden : 1; // alle Absaetze nicht sichtbar ?
- BOOL bCondHiddenFlag : 1; // Hiddenflag fuer die Bedingung ?
- BOOL bConnectFlag : 1; // Flag: "Verbindung zum Server" vorhanden?
-
+private:
+ SwSectionData m_Data;
- SW_DLLPRIVATE void _SetHiddenFlag( BOOL bHidden, BOOL bCondition );
- SW_DLLPRIVATE void _SetProtectFlag( BOOL bFlag ) { bProtectFlag = bFlag; }
- /* SW_DLLPUBLIC */ BOOL _IsProtect() const;
+ SwServerObjectRef m_RefObj; // set if DataServer
+ ::sfx2::SvBaseLinkRef m_RefLink;
- // --> FME 2004-06-22 #114856# edit in readonly sections
- void _SetEditInReadonlyFlag( BOOL bFlag ) { bEditInReadonlyFlag = bFlag; }
- BOOL _IsEditInReadonly() const;
- // <--
+ SW_DLLPRIVATE void ImplSetHiddenFlag(
+ bool const bHidden, bool const bCondition);
public:
TYPEINFO(); // rtti
- SwSection( SectionType eType, const String& rName,
- SwSectionFmt* pFmt = 0 );
- ~SwSection();
+ SwSection(SectionType const eType, String const& rName,
+ SwSectionFmt & rFormat);
+ virtual ~SwSection();
- // kopiere nur die Daten der Section!
- // Ableitung bleibt (beim Left) erhalten.
- SwSection& operator=( const SwSection& );
- BOOL operator==( const SwSection& rCmp ) const;
+ bool DataEquals(SwSectionData const& rCmp) const;
- const String& GetName() const { return sSectionNm; }
- void SetName( const String& rName ) { sSectionNm = rName; }
- SectionType GetType() const { return eType; }
- void SetType( SectionType eNew ) { eType = eNew; }
+ 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*)pRegisteredIn; }
SwSectionFmt* GetFmt() const { return (SwSectionFmt*)pRegisteredIn; }
@@ -140,78 +200,76 @@ public:
// setze die Hidden/Protected -> gesamten Baum updaten !
// (Attribute/Flags werden gesetzt/erfragt)
- BOOL IsHidden() const { return bHidden; }
- BOOL IsProtect() const { return GetFmt() ? _IsProtect()
- : IsProtectFlag(); }
-
+ 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 { return GetFmt() ? _IsEditInReadonly() : IsEditInReadonlyFlag(); }
- void SetEditInReadonly( BOOL bFlag = TRUE );
+ bool IsEditInReadonly() const;
+ void SetEditInReadonly(bool const bFlag = true);
// <--
- void SetHidden( BOOL bFlag = TRUE );
- void SetProtect( BOOL bFlag = TRUE );
-
// erfrage die internen Flags (Zustand inklusive Parents nicht, was
// aktuell an der Section gesetzt ist!!)
- BOOL IsHiddenFlag() const { return bHiddenFlag; }
- BOOL IsProtectFlag() const { return bProtectFlag; }
+ 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 bEditInReadonlyFlag; }
+ bool IsEditInReadonlyFlag() const { return m_Data.IsEditInReadonlyFlag(); }
// <--
- void SetCondHidden( BOOL bFlag = TRUE );
- BOOL IsCondHidden() const { return bCondHiddenFlag; }
+ void SetCondHidden(bool const bFlag = true);
+ bool IsCondHidden() const { return m_Data.IsCondHidden(); }
// erfrage (auch ueber die Parents), ob diese Section versteckt sein soll.
BOOL CalcHiddenFlag() const;
inline SwSection* GetParent() const;
- // setze/erfrage die Bedingung
- const String& GetCondition() const { return sCondition; }
- void SetCondition( const String& rNew ) { sCondition = rNew; }
+ String const& GetCondition() const { return m_Data.GetCondition(); }
+ void SetCondition(String const& rNew) { m_Data.SetCondition(rNew); }
- // setze/erfrage den gelinkten FileNamen
const String& GetLinkFileName() const;
- void SetLinkFileName( const String& rNew, const String* pPassWd = 0 );
- // Passwort des gelinkten Files (nur waehrend der Laufzeit gueltig!)
- const String& GetLinkFilePassWd() const { return sLinkFilePassWd; }
- void SetLinkFilePassWd( const String& rS ) { sLinkFilePassWd = rS; }
+ 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
- const ::com::sun::star::uno::Sequence <sal_Int8>&
- GetPasswd() const { return aPasswd; }
- void SetPasswd( const ::com::sun::star::uno::Sequence <sal_Int8>& rNew )
- { aPasswd = rNew; }
+ ::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 &refObj; }
- SwServerObject* GetObject() { return &refObj; }
- BOOL IsServer() const { return refObj.Is(); }
+ const SwServerObject* GetObject() const { return & m_RefObj; }
+ SwServerObject* GetObject() { return & m_RefObj; }
+ bool IsServer() const { return m_RefObj.Is(); }
// Methoden fuer gelinkte Bereiche
- USHORT GetUpdateType() const { return refLink->GetUpdateMode(); }
- void SetUpdateType( USHORT nType ) { refLink->SetUpdateMode( nType ); }
+ USHORT GetUpdateType() const { return m_RefLink->GetUpdateMode(); }
+ void SetUpdateType(USHORT const nType )
+ { m_RefLink->SetUpdateMode(nType); }
- BOOL IsConnected() const { return refLink.Is(); }
- void UpdateNow() { refLink->Update(); }
- void Disconnect() { refLink->Disconnect(); }
+ bool IsConnected() const { return m_RefLink.Is(); }
+ void UpdateNow() { m_RefLink->Update(); }
+ void Disconnect() { m_RefLink->Disconnect(); }
- const ::sfx2::SvBaseLink& GetBaseLink() const { return *refLink; }
- ::sfx2::SvBaseLink& GetBaseLink() { return *refLink; }
+ 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 DDE_LINK_SECTION == eType || FILE_LINK_SECTION == eType; }
+ bool IsLinkType() const { return m_Data.IsLinkType(); }
// Flags fuer UI - Verbindung geklappt?
- BOOL IsConnectFlag() const { return bConnectFlag; }
- void SetConnectFlag( BOOL bFlag = TRUE ) { bConnectFlag = bFlag; }
+ 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;
@@ -219,16 +277,15 @@ public:
// --> OD 2007-02-14 #b6521322#
void BreakLink();
// <--
-private:
- // privater Constructor, weil nie kopiert werden darf !!
- SwSection( const SwSection& );
- // @@@ but copy assignment "SwSection & operator= ( const SwSection& )" is public? @@@
+
};
enum SectionSort { SORTSECT_NOT, SORTSECT_NAME, SORTSECT_POS };
-class SW_DLLPUBLIC SwSectionFmt : public SwFrmFmt
+class SW_DLLPUBLIC SwSectionFmt
+ : public SwFrmFmt
+ , public ::sfx2::Metadatable
{
friend class SwDoc;
@@ -239,7 +296,6 @@ class SW_DLLPUBLIC SwSectionFmt : public SwFrmFmt
::com::sun::star::uno::WeakReference<
::com::sun::star::text::XTextSection> m_wXTextSection;
- /* SW_DLLPUBLIC */ SwSection* _GetSection() const;
SW_DLLPRIVATE void UpdateParent(); // Parent wurde veraendert
protected:
@@ -259,7 +315,7 @@ public:
// erfrage vom Format Informationen
virtual BOOL GetInfo( SfxPoolItem& ) const;
- SwSection* GetSection() const { return (SwSection*)_GetSection(); }
+ SwSection* GetSection() const;
inline SwSectionFmt* GetParent() const;
inline SwSection* GetParentSection() const;
@@ -274,9 +330,10 @@ public:
// befindet.
BOOL IsInNodesArr() const;
- SwSectionNode* GetSectionNode( BOOL bAlways = FALSE );
- const SwSectionNode* GetSectionNode( BOOL bAlways = FALSE ) const
- { return ((SwSectionFmt*)this)->GetSectionNode( bAlways ); }
+ 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;
@@ -288,6 +345,14 @@ public:
::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 ---------------------------------
@@ -314,7 +379,9 @@ inline SwSection* SwSectionFmt::GetParentSection() const
SwSectionFmt* pParent = GetParent();
SwSection* pRet = 0;
if( pParent )
- pRet = pParent->_GetSection();
+ {
+ pRet = pParent->GetSection();
+ }
return pRet;
}
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index a31daa325a..643cd847c5 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -24,8 +24,11 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _SHELLIO_HXX
-#define _SHELLIO_HXX
+#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>
@@ -431,7 +434,9 @@ extern BOOL SetHTMLTemplate( SwDoc &rDoc ); //Fuer Vorlagen aus HTML.vor laden s
class IDocumentSettingAccess;
class IDocumentStylePoolAccess;
-class SW_DLLPUBLIC Writer : public SvRefBase
+class SW_DLLPUBLIC Writer
+ : public SvRefBase
+ , private ::boost::noncopyable
{
SwAsciiOptions aAscOpts;
String sBaseURL;
@@ -439,10 +444,10 @@ class SW_DLLPUBLIC Writer : public SvRefBase
void _AddFontItem( SfxItemPool& rPool, const SvxFontItem& rFont );
void _AddFontItems( SfxItemPool& rPool, USHORT nWhichId );
+ ::std::auto_ptr<Writer_Impl> m_pImpl;
+
protected:
- Writer_Impl* pImpl;
- SvStream* pStrm;
SwPaM* pOrigPam; // der letze zu bearbeitende Pam
const String* pOrigFileName;
@@ -534,12 +539,8 @@ public:
inline SvStream& OutLong( long nVal ) { return OutLong( Strm(), nVal ); }
inline SvStream& OutULong( ULONG nVal ) { return OutULong( Strm(), nVal ); }
- void SetStrm( SvStream& rStrm ) { pStrm = &rStrm; }
-#ifndef DBG_UTIL
- SvStream& Strm() { return *pStrm; }
-#else
+ void SetStream(SvStream *const pStream);
SvStream& Strm();
-#endif
void SetOrganizerMode( BOOL bSet ) { bOrganizerMode = bSet; }
};
@@ -659,7 +660,7 @@ namespace SwReaderWriter
{
/// Return reader based on ReaderWriterEnum
Reader* GetReader( ReaderWriterEnum eReader );
-
+
/// Return reader based on the name
Reader* GetReader( const String& rFltName );
diff --git a/sw/inc/sw_primitivetypes2d.hxx b/sw/inc/sw_primitivetypes2d.hxx
index 3d1ef30711..12e245791f 100644
--- a/sw/inc/sw_primitivetypes2d.hxx
+++ b/sw/inc/sw_primitivetypes2d.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -34,9 +34,9 @@
//////////////////////////////////////////////////////////////////////////////
-#define PRIMITIVE2D_ID_SWVIRTFLYDRAWOBJPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SW| 0)
-#define PRIMITIVE2D_ID_SWPOSTITANKORPRIMITIVE (PRIMITIVE2D_ID_RANGE_SW| 1)
-#define PRIMITIVE2D_ID_SWPOSTITSHADOWPRIMITIVE (PRIMITIVE2D_ID_RANGE_SW| 2)
+#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)
//////////////////////////////////////////////////////////////////////////////
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 0cd441e5d2..1c2198981a 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -73,7 +73,7 @@ class SwForm;
struct CurTOXType;
class SwTOXDescription;
class SwTOXBase;
-class SwSection;
+class SwSectionData;
struct SwDBData;
class SwField;
class Printer;
@@ -194,7 +194,7 @@ public:
class AbstractInsertSectionTabDialog : public VclAbstractDialog //add for SwInsertSectionTabDialog
{
public:
- virtual void SetSection(const SwSection& rSect) = 0;
+ virtual void SetSectionData(SwSectionData const& rSect) = 0;
};
class AbstractSwWordCountDialog : public VclAbstractDialog
diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx
index a21d6cbf59..b9920b70b4 100644
--- a/sw/inc/swcrsr.hxx
+++ b/sw/inc/swcrsr.hxx
@@ -26,7 +26,9 @@
************************************************************************/
#ifndef _SWCRSR_HXX
#define _SWCRSR_HXX
+
#include <com/sun/star/i18n/WordType.hpp>
+
#include <pam.hxx>
#include <tblsel.hxx>
#include <cshtyp.hxx>
@@ -129,10 +131,10 @@ public:
const SfxItemSet* rReplSet = 0 );
// UI versions
- BOOL IsStartWord() const;
- BOOL IsEndWord() const;
+ BOOL IsStartWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ BOOL IsEndWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ BOOL IsInWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
BOOL IsStartEndSentence( bool bEnd ) const;
- BOOL IsInWord() const;
BOOL GoStartWord();
BOOL GoEndWord();
BOOL GoNextWord();
@@ -162,6 +164,7 @@ public:
BOOL GoEndSentence(){return GoSentence(END_SENT);}
BOOL GoPrevSentence(){return GoSentence(PREV_SENT);}
BOOL GoStartSentence(){return GoSentence(START_SENT);}
+ BOOL ExpandToSentenceBorders();
virtual BOOL LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
BOOL bAllowVisual, BOOL bSkipHidden, BOOL bInsertCrsr );
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index 86f8e31d99..04812ae7d9 100644
--- a/sw/inc/swtable.hxx
+++ b/sw/inc/swtable.hxx
@@ -39,6 +39,8 @@
#include <node.hxx> // fuer StartNode->GetMyIndex
#else
class SwStartNode;
+#include <memory>
+#include <boost/noncopyable.hpp>
#endif
class Color;
@@ -468,4 +470,21 @@ public:
{ return const_cast<SwTableBox*>(this)->FindEndOfRowSpan( rTable, nMaxStep ); }
};
+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
index e94ba5c5e8..ee78d93e53 100644
--- a/sw/inc/swtblfmt.hxx
+++ b/sw/inc/swtblfmt.hxx
@@ -31,7 +31,7 @@
class SwDoc;
-class SwTableFmt : public SwFrmFmt
+class SW_DLLPUBLIC SwTableFmt : public SwFrmFmt
{
friend class SwDoc;
diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx
index f9918e2c90..6ba1e25966 100644
--- a/sw/inc/txtfld.hxx
+++ b/sw/inc/txtfld.hxx
@@ -41,7 +41,8 @@ class SwTxtFld : public SwTxtAttr
SwTxtNode * m_pTxtNode;
public:
- SwTxtFld( SwFmtFld& rAttr, xub_StrLen nStart );
+ SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStart,
+ bool const bInClipboard);
virtual ~SwTxtFld();
void CopyFld( SwTxtFld *pDest ) const;
diff --git a/sw/inc/txtftn.hxx b/sw/inc/txtftn.hxx
index e7fee60630..31051450e9 100644
--- a/sw/inc/txtftn.hxx
+++ b/sw/inc/txtftn.hxx
@@ -49,7 +49,7 @@ public:
inline SwNodeIndex *GetStartNode() const { return m_pStartNode; }
void SetStartNode( const SwNodeIndex *pNode, BOOL bDelNodes = TRUE );
void SetNumber( const USHORT nNumber, const String* = 0 );
- void CopyFtn( SwTxtFtn *pDest ) const;
+ void CopyFtn(SwTxtFtn & rDest, SwTxtNode & rDestNode) const;
// get and set TxtNode pointer
inline const SwTxtNode& GetTxtNode() const;
diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
index c3b04e2e1b..0fe4953bba 100644
--- a/sw/inc/undobj.hxx
+++ b/sw/inc/undobj.hxx
@@ -24,8 +24,18 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _UNDOBJ_HXX
-#define _UNDOBJ_HXX
+#ifndef SW_UNDOBJ_HXX
+#define SW_UNDOBJ_HXX
+
+// --> OD 2006-11-01 #130889#
+#include <vector>
+// <--
+#include <memory>
+
+#include <boost/shared_ptr.hpp>
+
+#include <com/sun/star/uno/Sequence.h>
+
#include <tools/mempool.hxx>
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_USHORTS
@@ -36,23 +46,16 @@
#include <svl/svstdarr.hxx>
#endif
#include <svl/itemset.hxx>
-#include <com/sun/star/uno/Sequence.h>
+
+#include <svx/svdundo.hxx> // #111827#
+
#include <numrule.hxx>
#include <itabenum.hxx>
#include <format.hxx>
#include <SwRewriter.hxx>
-#include <svx/svdundo.hxx> // #111827#
-
#include <swundo.hxx>
-
#include <IMark.hxx>
#include <IDocumentContentOperations.hxx>
-// --> OD 2006-11-01 #130889#
-#include <vector>
-// <--
-
-#include <boost/shared_ptr.hpp>
-#include <memory>
class SwUndoIter;
@@ -71,8 +74,9 @@ class SwTableBox;
struct SwSortOptions;
class SwFrmFmt;
class SwHistoryBookmark;
-class SwSection;
+class SwSectionData;
class SwSectionFmt;
+class SwTOXBase;
class SvxTabStopItem;
class SwDDEFieldType;
class Graphic;
@@ -112,15 +116,6 @@ namespace utl {
class TransliterationWrapper;
}
-#ifdef DBG_UTIL
-class Writer;
-class SwUndo;
-#define OUT_UNDOBJ( name ) \
- friend Writer& OutUndo_ ## name( Writer&, const SwUndo& );
-#else
-#define OUT_UNDOBJ( name )
-#endif
-
const String UNDO_ARG1("$1", RTL_TEXTENCODING_ASCII_US);
const String UNDO_ARG2("$2", RTL_TEXTENCODING_ASCII_US);
@@ -244,7 +239,6 @@ protected:
public:
SwUndoSaveCntnt();
~SwUndoSaveCntnt();
- OUT_UNDOBJ( SaveCntnt )
};
@@ -271,7 +265,6 @@ public:
const SwHistory* GetHistory() const { return pHistory; }
SwHistory* GetHistory() { return pHistory; }
- OUT_UNDOBJ( SaveSection )
};
@@ -320,7 +313,6 @@ public:
// Setzen vom End-Undo-Offset geschieht im Doc::EndUndo
USHORT GetEndOffset() const { return nEndOffset; }
void SetEndOffset( USHORT n ) { nEndOffset = n; }
- OUT_UNDOBJ( Start )
};
class SwUndoEnd: public SwUndo
@@ -352,7 +344,6 @@ public:
// Setzen vom Start-Undo-Offset geschieht im Doc::EndUndo
void SetSttOffset(USHORT _nSttOffSet) { nSttOffset = _nSttOffSet; }
USHORT GetSttOffset() const { return nSttOffset; }
- OUT_UNDOBJ( End )
};
class SwUndoInsert: public SwUndo, private SwUndoSaveCntnt
@@ -401,8 +392,6 @@ public:
*/
virtual SwRewriter GetRewriter() const;
- BOOL CanGrouping( const SwPosition&, sal_Unicode cIns );
- OUT_UNDOBJ( Insert )
DECL_FIXEDMEMPOOL_NEWDEL(SwUndoInsert)
};
@@ -472,8 +461,6 @@ public:
xub_StrLen ContentStart() const { return nSttCntnt; }
BOOL IsDelFullPara() const { return bDelFullPara; }
- OUT_UNDOBJ( Delete )
-
DECL_FIXEDMEMPOOL_NEWDEL(SwUndoDelete)
};
@@ -509,7 +496,6 @@ public:
virtual SwRewriter GetRewriter() const;
BOOL CanGrouping( SwDoc*, SwPosition&, sal_Unicode cIns );
- OUT_UNDOBJ( Overwrite )
};
@@ -528,7 +514,6 @@ public:
virtual void Redo( SwUndoIter& );
virtual void Repeat( SwUndoIter& );
void SetTblFlag() { bTblFlag = TRUE; }
- OUT_UNDOBJ( SplitNode )
};
@@ -563,11 +548,9 @@ public:
ULONG GetEndNode() const { return nEndNode; }
ULONG GetDestSttNode() const { return nDestSttNode; }
xub_StrLen GetDestSttCntnt() const { return nDestSttCntnt; }
- void AddTblMrgFlyHstry( SwHistory& rHstr );
void SetMoveRedlines( bool b ) { bMoveRedlines = b; }
- OUT_UNDOBJ( Move )
};
@@ -593,7 +576,6 @@ public:
SwHistory& GetHistory() { return *m_pHistory; }
- OUT_UNDOBJ( InsAttr )
};
class SwUndoResetAttr : public SwUndo, private SwUndRng
@@ -613,7 +595,6 @@ public:
SwHistory& GetHistory() { return *m_pHistory; }
- OUT_UNDOBJ( ResetAttr )
};
class SwUndoFmtAttr : public SwUndo
@@ -659,8 +640,6 @@ public:
virtual void Repeat( SwUndoIter& );
virtual SwRewriter GetRewriter() const;
- OUT_UNDOBJ( InsFmtAttr )
-
void PutAttr( const SfxPoolItem& rItem );
SwFmt* GetFmt( SwDoc& rDoc ); // checks if it is still in the Doc!
};
@@ -757,7 +736,7 @@ public:
virtual SwRewriter GetRewriter() const;
SwHistory* GetHistory() { return pHistory; }
- OUT_UNDOBJ( SetFmtColl )
+
};
@@ -775,7 +754,6 @@ public:
SwHistory& GetHistory() { return *m_pHistory; }
- OUT_UNDOBJ( MoveLeftMargin )
};
// Basis-Klasse fuer Insert von Dokument, Glossaries und Kopieren
@@ -801,21 +779,18 @@ public:
// setze den Destination-Bereich nach dem Einlesen.
void SetInsertRange( const SwPaM&, BOOL bScanFlys = TRUE,
BOOL bSttWasTxtNd = TRUE );
- OUT_UNDOBJ( Inserts )
};
class SwUndoInsDoc : public SwUndoInserts
{
public:
SwUndoInsDoc( const SwPaM& );
- OUT_UNDOBJ( InsDoc )
};
class SwUndoCpyDoc : public SwUndoInserts
{
public:
SwUndoCpyDoc( const SwPaM& );
- OUT_UNDOBJ( Copy )
};
class SwUndoInsTbl : public SwUndo
@@ -842,7 +817,6 @@ public:
virtual SwRewriter GetRewriter() const;
- OUT_UNDOBJ( InsTable )
};
class SwUndoTxtToTbl : public SwUndo, public SwUndRng
@@ -867,7 +841,6 @@ public:
SwHistory& GetHistory(); // wird ggfs. angelegt
void AddFillBox( const SwTableBox& rBox );
- OUT_UNDOBJ( TextToTable )
};
class SwUndoTblToTxt : public SwUndo
@@ -893,7 +866,6 @@ public:
void SetRange( const SwNodeRange& );
void AddBoxPos( SwDoc& rDoc, ULONG nNdIdx, ULONG nEndIdx,
xub_StrLen nCntntIdx = STRING_MAXLEN);
- OUT_UNDOBJ( TableToText )
};
class SwUndoAttrTbl : public SwUndo
@@ -906,7 +878,6 @@ public:
virtual ~SwUndoAttrTbl();
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
- OUT_UNDOBJ( SetTableAttr )
};
class SwUndoTblAutoFmt : public SwUndo
@@ -924,7 +895,6 @@ public:
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
void SaveBoxCntnt( const SwTableBox& rBox );
- OUT_UNDOBJ( TableAutoFmt )
};
class SwUndoTblNdsChg : public SwUndo
@@ -974,7 +944,6 @@ public:
nRelDiff = (USHORT)nRelDif;
}
- OUT_UNDOBJ( TblNodesChg )
};
class SwUndoTblMerge : public SwUndo, private SwUndRng
@@ -1000,7 +969,6 @@ public:
void SaveCollection( const SwTableBox& rBox );
- OUT_UNDOBJ( TblMerge )
};
@@ -1028,7 +996,6 @@ public:
void SetNumFmt( ULONG nNewNumFmtIdx, const double& rNewNumber )
{ nFmtIdx = nNewNumFmtIdx; fNum = rNewNumber; }
void SetBox( const SwTableBox& rBox );
- OUT_UNDOBJ( TblNumFmt )
};
class _UndoTblCpyTbl_Entries;
@@ -1053,7 +1020,6 @@ public:
BOOL IsEmpty() const;
BOOL InsertRow( SwTable& rTbl, const SwSelBoxes& rBoxes, USHORT nCnt );
- OUT_UNDOBJ( TblCpyTbl )
};
class SwUndoCpyTbl : public SwUndo
@@ -1067,7 +1033,6 @@ public:
virtual void Redo( SwUndoIter& );
void SetTableSttIdx( ULONG nIdx ) { nTblNode = nIdx; }
- OUT_UNDOBJ( CpyTbl )
};
class SwUndoSplitTbl : public SwUndo
@@ -1140,22 +1105,12 @@ public:
};
-class SwUndoDelBookmark : public SwUndoBookmark
-{
-public:
- SwUndoDelBookmark( const ::sw::mark::IMark& );
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- OUT_UNDOBJ( DelBookmark )
-};
-
class SwUndoInsBookmark : public SwUndoBookmark
{
public:
SwUndoInsBookmark( const ::sw::mark::IMark& );
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
- OUT_UNDOBJ( InsBookmark )
};
@@ -1214,7 +1169,6 @@ public:
void Insert( const String& rOrgPos, const String& rNewPos );
void Insert( ULONG nOrgPos, ULONG nNewPos );
- OUT_UNDOBJ( Sort )
};
@@ -1244,7 +1198,6 @@ public:
virtual void Undo( SwUndoIter& ) = 0;
virtual void Redo( SwUndoIter& ) = 0;
- OUT_UNDOBJ( FlyBase )
};
class SwUndoInsLayFmt : public SwUndoFlyBase
@@ -1261,7 +1214,6 @@ public:
String GetComment() const;
- OUT_UNDOBJ( InsLayFmt )
};
class SwUndoDelLayFmt : public SwUndoFlyBase
@@ -1278,7 +1230,6 @@ public:
virtual SwRewriter GetRewriter() const;
- OUT_UNDOBJ( DelLayFmt )
};
@@ -1355,7 +1306,6 @@ public:
BOOL IsFull() const
{ return ((USHRT_MAX / sizeof( void* )) - 50 ) < aArr.Count(); }
- OUT_UNDOBJ( Replace )
};
@@ -1372,7 +1322,6 @@ public:
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
virtual void Repeat( SwUndoIter& );
- OUT_UNDOBJ( SwUndoTblHeadline )
};
@@ -1380,57 +1329,36 @@ public:
class SwUndoInsSection : public SwUndo, private SwUndRng
{
- SwHistory* pHistory;
- SwSection* pSection;
- SwRedlineData* pRedlData;
- SfxItemSet* pAttr;
- ULONG nSectNodePos;
- BOOL bSplitAtStt : 1;
- BOOL bSplitAtEnd : 1;
- BOOL bUpdateFtn : 1;
+private:
+ const ::std::auto_ptr<SwSectionData> m_pSectionData;
+ const ::std::auto_ptr<SwTOXBase> m_pTOXBase; /// set iff section is TOX
+ const ::std::auto_ptr<SfxItemSet> m_pAttrSet;
+ ::std::auto_ptr<SwHistory> m_pHistory;
+ ::std::auto_ptr<SwRedlineData> m_pRedlData;
+ ULONG m_nSectionNodePos;
+ bool m_bSplitAtStart : 1;
+ bool m_bSplitAtEnd : 1;
+ bool m_bUpdateFtn : 1;
void Join( SwDoc& rDoc, ULONG nNode );
public:
- SwUndoInsSection( const SwPaM&, const SwSection&,
- const SfxItemSet* pSet );
+ SwUndoInsSection(SwPaM const&, SwSectionData const&,
+ SfxItemSet const*const pSet, SwTOXBase const*const pTOXBase);
virtual ~SwUndoInsSection();
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
virtual void Repeat( SwUndoIter& );
- OUT_UNDOBJ( SwUndoInsSection )
- void SetSectNdPos( ULONG nPos ) { nSectNodePos = nPos; }
- void SaveSplitNode( SwTxtNode* pTxtNd, BOOL bAtStt );
- void SetUpdtFtnFlag( BOOL bFlag ) { bUpdateFtn = bFlag; }
+ void SetSectNdPos(ULONG const nPos) { m_nSectionNodePos = nPos; }
+ void SaveSplitNode(SwTxtNode *const pTxtNd, bool const bAtStart);
+ void SetUpdtFtnFlag(bool const bFlag) { m_bUpdateFtn = bFlag; }
};
-class SwUndoDelSection : public SwUndo
-{
- ULONG nSttNd, nEndNd;
- SwSection* pSection;
- SfxItemSet* pAttr;
-public:
- SwUndoDelSection( const SwSectionFmt& );
- virtual ~SwUndoDelSection();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- OUT_UNDOBJ( SwUndoDelSection )
-};
+SW_DLLPRIVATE SwUndo * MakeUndoDelSection(SwSectionFmt const&);
+
+SW_DLLPRIVATE SwUndo * MakeUndoUpdateSection(SwSectionFmt const&, bool const);
-class SwUndoChgSection : public SwUndo
-{
- ULONG nSttNd;
- SwSection* pSection;
- SfxItemSet* pAttr;
- BOOL bOnlyAttrChgd;
-public:
- SwUndoChgSection( const SwSectionFmt&, BOOL bOnlyAttrChgd );
- virtual ~SwUndoChgSection();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- OUT_UNDOBJ( SwUndoChgSection )
-};
//------------ Undo von verschieben/stufen von Gliederung ----------------
@@ -1442,7 +1370,6 @@ public:
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
virtual void Repeat( SwUndoIter& );
- OUT_UNDOBJ( SwUndoOutlineLeftRight )
};
//--------------------------------------------------------------------
@@ -1458,7 +1385,6 @@ public:
virtual ~SwUndoDefaultAttr();
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
- OUT_UNDOBJ( DefaultAttr )
};
//--------------------------------------------------------------------
@@ -1490,7 +1416,6 @@ public:
void SetLRSpaceEndPos();
- OUT_UNDOBJ( InsNum )
};
class SwUndoDelNum : public SwUndo, private SwUndRng
@@ -1509,7 +1434,6 @@ public:
void AddNode( const SwTxtNode& rNd, BOOL bResetLRSpace );
SwHistory* GetHistory() { return pHistory; }
- OUT_UNDOBJ( DelNum )
};
class SwUndoMoveNum : public SwUndo, private SwUndRng
@@ -1522,7 +1446,6 @@ public:
virtual void Redo( SwUndoIter& );
virtual void Repeat( SwUndoIter& );
void SetStartNode( ULONG nValue ) { nNewStt = nValue; }
- OUT_UNDOBJ( MoveNum )
};
class SwUndoNumUpDown : public SwUndo, private SwUndRng
@@ -1533,7 +1456,6 @@ public:
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
virtual void Repeat( SwUndoIter& );
- OUT_UNDOBJ( NumUpDown )
};
class SwUndoNumOrNoNum : public SwUndo
@@ -1547,7 +1469,6 @@ public:
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
virtual void Repeat( SwUndoIter& );
- OUT_UNDOBJ( NumOrNoNum )
};
class SwUndoNumRuleStart : public SwUndo
@@ -1562,7 +1483,6 @@ public:
virtual void Undo( SwUndoIter& );
virtual void Redo( SwUndoIter& );
virtual void Repeat( SwUndoIter& );
- OUT_UNDOBJ( NumRuleStart )
};
//--------------------------------------------------------------------
diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx
index 5af5df2e51..d163a11055 100644
--- a/sw/inc/unocrsrhelper.hxx
+++ b/sw/inc/unocrsrhelper.hxx
@@ -55,6 +55,9 @@ namespace com{ namespace sun{ namespace star{
namespace beans{
struct PropertyValue;
}
+ namespace text {
+ class XTextContent;
+ }
}}}
/* -----------------03.12.98 12:16-------------------
@@ -84,6 +87,10 @@ namespace SwUnoCursorHelper
bool FillValue( USHORT nWhichId, USHORT 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
diff --git a/sw/inc/unoflatpara.hxx b/sw/inc/unoflatpara.hxx
index 70cbf8b334..65877e6679 100644
--- a/sw/inc/unoflatpara.hxx
+++ b/sw/inc/unoflatpara.hxx
@@ -29,6 +29,7 @@
#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>
@@ -51,9 +52,10 @@ class SwDoc;
******************************************************************************/
class SwXFlatParagraph:
- public ::cppu::WeakImplHelper1
+ public ::cppu::WeakImplHelper2
<
- css::text::XFlatParagraph
+ css::text::XFlatParagraph,
+ css::lang::XUnoTunnel
>,
public SwXTextMarkup
{
@@ -85,6 +87,12 @@ public:
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
diff --git a/sw/inc/unoidx.hxx b/sw/inc/unoidx.hxx
index a4feb762f5..cf22cce14e 100644
--- a/sw/inc/unoidx.hxx
+++ b/sw/inc/unoidx.hxx
@@ -36,6 +36,8 @@
#include <cppuhelper/implbase4.hxx>
#include <cppuhelper/implbase5.hxx>
+#include <sfx2/Metadatable.hxx>
+
#include <unocoll.hxx>
#include <toxe.hxx>
@@ -48,8 +50,9 @@ class SwTOXType;
*
* --------------------------------------------------*/
-typedef ::cppu::WeakImplHelper5
-< ::com::sun::star::lang::XUnoTunnel
+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
@@ -81,6 +84,11 @@ public:
::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
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 85e1c9728b..374753ba22 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -805,9 +805,8 @@ enum SwPropNameIds
/* 0737 */ UNO_NAME_DESCRIPTION,
// <--
/* 0738 */ UNO_NAME_META, // #i91565#
-/* 0739 */ UNO_NAME_IS_TEMPLATE,
-/* 0740 */ UNO_NAME_VBA_DOCOBJ,
-/* 0741 */ SW_PROPNAME_END
+/* 0739 */ UNO_NAME_NESTED_TEXT_CONTENT, // #i109601#
+/* 0740 */ SW_PROPNAME_END
};
diff --git a/sw/inc/unosection.hxx b/sw/inc/unosection.hxx
index 849aafdf6b..cba4831a4f 100644
--- a/sw/inc/unosection.hxx
+++ b/sw/inc/unosection.hxx
@@ -39,6 +39,8 @@
#include <cppuhelper/implbase7.hxx>
+#include <sfx2/Metadatable.hxx>
+
#include <unobaseclass.hxx>
@@ -52,8 +54,9 @@ class SwSectionFmt;
struct SwTextSectionProperties_Impl;
-typedef ::cppu::WeakImplHelper7
-< ::com::sun::star::lang::XUnoTunnel
+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
@@ -84,6 +87,11 @@ public:
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
diff --git a/sw/inc/unotextmarkup.hxx b/sw/inc/unotextmarkup.hxx
index 33c497e79e..98bb3416d3 100644
--- a/sw/inc/unotextmarkup.hxx
+++ b/sw/inc/unotextmarkup.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,7 +42,6 @@ namespace com { namespace sun { namespace star { namespace container {
} } } }
class SwTxtNode;
-class SwWrongList;
class SfxPoolItem;
/** Implementation of the css::text::XTextMarkup interface
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index 823e81f1ae..1a43f3307a 100644..100755
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -41,7 +41,7 @@ class ViewShell;
class SwDocShell;
namespace svtools{ class ColorConfig;}
-#define VIEWOPT_1_IDLE 0x00000001L
+//#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
@@ -164,6 +164,7 @@ protected:
BOOL bBookview : 1; // view mode for page preview
BOOL mbViewLayoutBookMode : 1; // book view mode for edit view
sal_Bool bShowPlaceHolderFields : 1; //only used in printing!
+ mutable bool bIdle;
// Maszstab
USHORT nZoom; // Angaben in Prozent
@@ -202,9 +203,14 @@ public:
----------------------------------------------------------------------------*/
inline BOOL IsIdle() const
- { return nCoreOptions & VIEWOPT_1_IDLE ? TRUE : FALSE; }
- inline void SetIdle( BOOL b )
- { (b != 0) ? (nCoreOptions |= VIEWOPT_1_IDLE ) : ( nCoreOptions &= ~VIEWOPT_1_IDLE); }
+ { 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( BOOL b ) const
+ { bIdle = b; }
inline BOOL IsTab(BOOL bHard = FALSE) const
{ return !bReadonly && (nCoreOptions & VIEWOPT_1_TAB) &&
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 4ed3eab196..c89351b614 100755..100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -77,19 +77,15 @@ struct ShellResource;
class SwRegionRects;
class SwFrm;
class SvtAccessibilityOptions;
-// OD 12.12.2002 #103492#
class SwPagePreviewLayout;
-// --> OD 2005-12-01 #i27138#
class SwTxtFrm;
-// <--
class BitmapEx;
struct SwAccessibilityOptions;
class Region;
class SwPostItMgr;
-
-// #i74769#
class SdrPaintWindow;
+class SwAccessibleMap;
namespace vcl
{
@@ -264,7 +260,7 @@ public:
sal_Bool SmoothScroll( long lXDiff, long lYDiff, const Rectangle* );//Browser
void EnableSmooth( sal_Bool b ) { bEnableSmooth = b; }
- const SwRect &VisArea() const { return aVisArea; }
+ const SwRect& VisArea() const { return aVisArea; }
//Es wird, wenn notwendig, soweit gescrollt, dass das
//uebergebene Rect im sichtbaren Ausschnitt liegt.
void MakeVisible( const SwRect & );
@@ -399,9 +395,6 @@ public:
// compatible behaviour of tabs
void SetTabCompat( bool bNew );
- //#i24363# tab stops relative to indent
- void SetTabsRelativeToIndent( bool bNew );
-
// font metric attribute "External Leading" should be considered
void SetAddExtLeading( bool bNew );
@@ -557,9 +550,11 @@ public:
*/
void InvalidateAccessibleParaTextSelection();
- /** invalidate attributes for paragraphs
+ /** 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
@@ -568,6 +563,8 @@ public:
*/
void InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm );
+ SwAccessibleMap* GetAccessibleMap();
+
ViewShell( ViewShell&, Window *pWin = 0, OutputDevice *pOut = 0,
long nFlags = 0 );
ViewShell( SwDoc& rDoc, Window *pWin,
diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx
index 90165b6025..4b80c8ca42 100644
--- a/sw/inc/viscrs.hxx
+++ b/sw/inc/viscrs.hxx
@@ -92,8 +92,6 @@ class SwSelPaintRects : public SwRects
// die Shell
const SwCrsrShell* pCShell;
- void Paint( const SwRect& rRect );
-
virtual void Paint( const Rectangle& rRect );
virtual void FillRects() = 0;
diff --git a/sw/prj/d.lst b/sw/prj/d.lst
index 958771dad2..d7e75a0956 100644
--- a/sw/prj/d.lst
+++ b/sw/prj/d.lst
@@ -20,36 +20,6 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sweb\toolbar
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\toolbar
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swform\toolbar
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\toolbar
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swriter\accelerator
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swxform\accelerator
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sweb\accelerator
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\accelerator
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swform\accelerator
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\accelerator
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swriter\accelerator\en-US
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swriter\accelerator\de
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swriter\accelerator\es
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swriter\accelerator\fr
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swxform\accelerator\en-US
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swxform\accelerator\de
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swxform\accelerator\es
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swxform\accelerator\fr
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sweb\accelerator\en-US
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sweb\accelerator\de
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sweb\accelerator\es
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sweb\accelerator\fr
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\accelerator\en-US
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\accelerator\de
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\accelerator\es
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\accelerator\fr
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swform\accelerator\en-US
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swform\accelerator\de
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swform\accelerator\es
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swform\accelerator\fr
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\accelerator\en-US
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\accelerator\de
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\accelerator\es
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\accelerator\fr
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swriter\statusbar
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swxform\statusbar
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sweb\statusbar
@@ -79,30 +49,6 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\statusbar
..\uiconfig\sglobal\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\toolbar\*.xml
..\uiconfig\swform\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swform\toolbar\*.xml
..\uiconfig\swreport\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swreport\toolbar\*.xml
-..\uiconfig\swriter\accelerator\en-US\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swriter\accelerator\en-US\*.xml
-..\uiconfig\swriter\accelerator\de\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swriter\accelerator\de\*.xml
-..\uiconfig\swriter\accelerator\es\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swriter\accelerator\es\*.xml
-..\uiconfig\swriter\accelerator\fr\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swriter\accelerator\fr\*.xml
-..\uiconfig\swxform\accelerator\en-US\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swxform\accelerator\en-US\*.xml
-..\uiconfig\swxform\accelerator\de\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swxform\accelerator\de\*.xml
-..\uiconfig\swxform\accelerator\es\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swxform\accelerator\es\*.xml
-..\uiconfig\swxform\accelerator\fr\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swxform\accelerator\fr\*.xml
-..\uiconfig\sweb\accelerator\en-US\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sweb\accelerator\en-US\*.xml
-..\uiconfig\sweb\accelerator\de\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sweb\accelerator\de\*.xml
-..\uiconfig\sweb\accelerator\es\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sweb\accelerator\es\*.xml
-..\uiconfig\sweb\accelerator\fr\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sweb\accelerator\fr\*.xml
-..\uiconfig\sglobal\accelerator\en-US\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\accelerator\en-US\*.xml
-..\uiconfig\sglobal\accelerator\de\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\accelerator\de\*.xml
-..\uiconfig\sglobal\accelerator\es\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\accelerator\es\*.xml
-..\uiconfig\sglobal\accelerator\fr\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\accelerator\fr\*.xml
-..\uiconfig\swform\accelerator\en-US\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swform\accelerator\en-US\*.xml
-..\uiconfig\swform\accelerator\de\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swform\accelerator\de\*.xml
-..\uiconfig\swform\accelerator\es\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swform\accelerator\es\*.xml
-..\uiconfig\swform\accelerator\fr\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swform\accelerator\fr\*.xml
-..\uiconfig\swreport\accelerator\en-US\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swreport\accelerator\en-US\*.xml
-..\uiconfig\swreport\accelerator\de\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swreport\accelerator\de\*.xml
-..\uiconfig\swreport\accelerator\es\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swreport\accelerator\es\*.xml
-..\uiconfig\swreport\accelerator\fr\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swreport\accelerator\fr\*.xml
..\uiconfig\swriter\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swriter\statusbar\*.xml
..\uiconfig\swxform\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swxform\statusbar\*.xml
..\uiconfig\sweb\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sweb\statusbar\*.xml
diff --git a/sw/qa/complex/writer/TextPortionEnumerationTest.java b/sw/qa/complex/writer/TextPortionEnumerationTest.java
index d96de76a82..b526b30e4e 100755
--- a/sw/qa/complex/writer/TextPortionEnumerationTest.java
+++ b/sw/qa/complex/writer/TextPortionEnumerationTest.java
@@ -34,12 +34,16 @@ 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;
@@ -56,10 +60,16 @@ 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 java.util.Map;
import java.util.HashMap;
@@ -976,7 +986,7 @@ abstract class Inserter
xPropSet.setPropertyValue("RubyText", rubytext);
}
- void insertMeta(XTextCursor xCursor, StringPair xmlid)
+ XTextContent insertMeta(XTextCursor xCursor, StringPair xmlid)
throws Exception
{
XTextContent xContent = makeMeta();
@@ -984,6 +994,7 @@ abstract class Inserter
XMetadatable xMetadatable = (XMetadatable)
UnoRuntime.queryInterface(XMetadatable.class, xContent);
xMetadatable.setMetadataReference(xmlid);
+ return xContent;
}
XTextContent makeMeta() throws Exception
@@ -995,14 +1006,15 @@ abstract class Inserter
return xContent;
}
- void insertMetaField(XTextCursor xCursor, StringPair xmlid)
+ XTextField insertMetaField(XTextCursor xCursor, StringPair xmlid)
throws Exception
{
- XTextContent xContent = makeMetaField();
+ XTextField xContent = makeMetaField();
xContent.attach(xCursor);
XMetadatable xMetadatable = (XMetadatable)
UnoRuntime.queryInterface(XMetadatable.class, xContent);
xMetadatable.setMetadataReference(xmlid);
+ return xContent;
}
XTextField makeMetaField() throws Exception
@@ -1165,15 +1177,16 @@ class RangeInserter extends Inserter
}
*/
- void insertRange(Range range) throws Exception
+ XTextContent insertRange(Range range) throws Exception
{
m_xCursor.gotoStartOfParagraph(false);
m_xCursor.goRight(range.getStart(), false);
m_xCursor.goRight(range.getExtent(), true);
- insertNode(m_xCursor, range.getNode());
+ return insertNode(m_xCursor, range.getNode());
}
- void insertNode(XParagraphCursor xCursor, TreeNode node) throws Exception
+ XTextContent insertNode(XParagraphCursor xCursor, TreeNode node)
+ throws Exception
{
String type = node.getType();
if (type.equals("Bookmark")) {
@@ -1196,10 +1209,10 @@ class RangeInserter extends Inserter
insertRuby(xCursor, ruby.getRubyText());
} else if (type.equals("InContentMetadata")) {
MetaNode meta = (MetaNode) node;
- insertMeta(xCursor, meta.getXmlId());
+ return insertMeta(xCursor, meta.getXmlId());
} else if (type.equals("MetadataField")) {
MetaFieldNode meta = (MetaFieldNode) node;
- insertMetaField(xCursor, meta.getXmlId());
+ return insertMetaField(xCursor, meta.getXmlId());
} else if (type.equals("Text")) {
TextNode text = (TextNode) node;
insertText(xCursor, text.getContent());
@@ -1220,6 +1233,7 @@ class RangeInserter extends Inserter
} else {
throw new RuntimeException("unexpected type: " + type);
}
+ return null;
}
}
@@ -1306,6 +1320,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
"testRange5",
"testRange6",
"testRange7",
+ "testMetaXChild",
"testMetaXText",
"testMetaXTextCursor",
"testMetaXTextAttachToxMark",
@@ -1316,6 +1331,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
"testMetaFieldXTextField",
"testMetaFieldXPropertySet",
"testLoadStore",
+ "testLoadStoreXmlid",
};
}
@@ -1640,12 +1656,28 @@ public class TextPortionEnumerationTest extends ComplexTestCase
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") );
@@ -1665,12 +1697,28 @@ public class TextPortionEnumerationTest extends ComplexTestCase
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") );
@@ -2898,6 +2946,136 @@ public class TextPortionEnumerationTest extends ComplexTestCase
/* TODO: test partial selection, test UNDO/REDO */
+ // #i109601# NestedTextContent and XChild
+ 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]) {
+ assure("unexpected NestedTextContent at: " + i, null == xNTC);
+ } else {
+ XMetadatable xMetadatable = (XMetadatable)
+ UnoRuntime.queryInterface(XMetadatable.class, xNTC);
+ StringPair xmlid = xMetadatable.getMetadataReference();
+ assure("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);
+ assure("setParent(): allowed?", false);
+ } catch (NoSupportException e) { /* expected */ }
+ assure("getParent(): not null", xChild1.getParent() == null);
+ assure("getParent(): not null", xChild2.getParent() == null);
+ assure("getParent(): not null", xChild6.getParent() == null);
+ {
+ Object xParent3 = xChild3.getParent();
+ assure("getParent(): null", null != xParent3);
+ XMetadatable xMetadatable = (XMetadatable)
+ UnoRuntime.queryInterface(XMetadatable.class, xParent3);
+ StringPair xmlid = xMetadatable.getMetadataReference();
+ assure("getParent(): wrong", MetaNode.eq(xmlid, id2));
+ }{
+ Object xParent4 = xChild4.getParent();
+ assure("getParent(): null", null != xParent4);
+ XMetadatable xMetadatable = (XMetadatable)
+ UnoRuntime.queryInterface(XMetadatable.class, xParent4);
+ StringPair xmlid = xMetadatable.getMetadataReference();
+ assure("getParent(): wrong", MetaNode.eq(xmlid, id3));
+ }{
+ Object xParent5 = xChild5.getParent();
+ assure("getParent(): null", null != xParent5);
+ XMetadatable xMetadatable = (XMetadatable)
+ UnoRuntime.queryInterface(XMetadatable.class, xParent5);
+ StringPair xmlid = xMetadatable.getMetadataReference();
+ assure("getParent(): wrong", MetaNode.eq(xmlid, id3));
+ }
+ }
+
/** test SwXMeta XText interface */
public void testMetaXText() throws Exception
{
@@ -3685,7 +3863,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
public void testLoadStore() throws Exception
{
- XComponent xComp = null;
+ XTextDocument xComp = null;
String filename = "TESTMETA.odt";
String file;
try {
@@ -3693,10 +3871,12 @@ public class TextPortionEnumerationTest extends ComplexTestCase
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);
@@ -3715,7 +3895,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
log.println("...done");
}
- public XComponent doLoad(String file) throws Exception
+ public XTextDocument doLoad(String file) throws Exception
{
XComponent xComp = null;
@@ -3729,14 +3909,20 @@ public class TextPortionEnumerationTest extends ComplexTestCase
xComp = util.DesktopTools.loadDoc(m_xMSF, file, loadProps);
// xComp = util.DesktopTools.getCLoader(m_xMSF).loadComponentFromURL(file, "_blank", 0, loadProps);
-
XTextDocument xTextDoc = (XTextDocument)
UnoRuntime.queryInterface(XTextDocument.class, xComp);
- XText xText = xTextDoc.getText();
+ assure("cannot load: " + file, xTextDoc != null);
log.println("...done");
+ return xTextDoc;
+ }
+
+ public void checkLoadMeta(XTextDocument xTextDoc) throws Exception
+ {
+ XText xText = xTextDoc.getText();
+
log.println("Checking meta(-field)s in loaded test document...");
TreeNode root = new TreeNode()
@@ -3783,8 +3969,199 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(xTextDoc, root, false);
log.println("...done");
+ }
- return xComp;
+ public void testLoadStoreXmlid() throws Exception
+ {
+ XTextDocument xComp = null;
+ String filename = "TESTXMLID.odt";
+ String file;
+ try {
+ file = util.utils.getFullTestURL(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();
+
+ log.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"));
+ assure("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);
+ assure("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"));
+ assure("mark3",
+ eq(xMark3.getMetadataReference(),
+ new StringPair("content.xml", "id91")));
+
+ log.println("...done");
+
+ log.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"));
+ assure("idsection1", eq(xSection1.getMetadataReference(),
+ new StringPair("content.xml", "idSection1")));
+
+ XMetadatable xSection2 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xSections.getByName("Section 2"));
+ assure("idSection2", eq(xSection2.getMetadataReference(),
+ new StringPair("content.xml", "idSection2")));
+
+ XMetadatable xSection3 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class,
+ xSections.getByName("Table of Contents1_Head"));
+ assure("idTOCTitle", eq(xSection3.getMetadataReference(),
+ new StringPair("content.xml", "idTOCTitle")));
+
+ XMetadatable xSection4 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class,
+ xSections.getByName("Alphabetical Index1_Head"));
+ assure("idAITitle", eq(xSection4.getMetadataReference(),
+ new StringPair("content.xml", "idAITitle")));
+
+ XMetadatable xSection5 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class,
+ xSections.getByName("Illustration Index1_Head"));
+ assure("idIITitle", eq(xSection5.getMetadataReference(),
+ new StringPair("content.xml", "idIITitle")));
+
+ XMetadatable xSection6 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class,
+ xSections.getByName("Index of Tables1_Head"));
+ assure("idIOTTitle", eq(xSection6.getMetadataReference(),
+ new StringPair("content.xml", "idIOTTitle")));
+
+ XMetadatable xSection7 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class,
+ xSections.getByName("User-Defined1_Head"));
+ assure("idUDTitle", eq(xSection7.getMetadataReference(),
+ new StringPair("content.xml", "idUDTitle")));
+
+ XMetadatable xSection8 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class,
+ xSections.getByName("Table of Objects1_Head"));
+ assure("idTOOTitle", eq(xSection8.getMetadataReference(),
+ new StringPair("content.xml", "idTOOTitle")));
+
+ XMetadatable xSection9 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xSections.getByName("Bibliography1_Head"));
+ assure("idBibTitle", eq(xSection9.getMetadataReference(),
+ new StringPair("content.xml", "idBibTitle")));
+
+ log.println("...done");
+
+ log.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"));
+ assure("idTOC", eq(xIndex1.getMetadataReference(),
+ new StringPair("content.xml", "idTOC")));
+ XMetadatable xIndex1s = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xSections.getByName("Table of Contents1"));
+ assure("idTOC", eq(xIndex1s.getMetadataReference(),
+ new StringPair("content.xml", "idTOC")));
+
+ XMetadatable xIndex2 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xIndexes.getByName("Alphabetical Index1"));
+ assure("idAI", eq(xIndex2.getMetadataReference(),
+ new StringPair("content.xml", "idAI")));
+ XMetadatable xIndex2s = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xSections.getByName("Alphabetical Index1"));
+ assure("idAI", eq(xIndex2s.getMetadataReference(),
+ new StringPair("content.xml", "idAI")));
+
+ XMetadatable xIndex3 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xIndexes.getByName("Illustration Index1"));
+ assure("idII", eq(xIndex3.getMetadataReference(),
+ new StringPair("content.xml", "idII")));
+ XMetadatable xIndex3s = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xSections.getByName("Illustration Index1"));
+ assure("idII", eq(xIndex3s.getMetadataReference(),
+ new StringPair("content.xml", "idII")));
+
+ XMetadatable xIndex4 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xIndexes.getByName("Index of Tables1"));
+ assure("idIOT", eq(xIndex4.getMetadataReference(),
+ new StringPair("content.xml", "idIOT")));
+ XMetadatable xIndex4s = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xSections.getByName("Index of Tables1"));
+ assure("idIOT", eq(xIndex4s.getMetadataReference(),
+ new StringPair("content.xml", "idIOT")));
+
+ XMetadatable xIndex5 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xIndexes.getByName("User-Defined1"));
+ assure("idUD", eq(xIndex5.getMetadataReference(),
+ new StringPair("content.xml", "idUD")));
+ XMetadatable xIndex5s = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xSections.getByName("User-Defined1"));
+ assure("idUD", eq(xIndex5s.getMetadataReference(),
+ new StringPair("content.xml", "idUD")));
+
+ XMetadatable xIndex6 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xIndexes.getByName("Table of Objects1"));
+ assure("idTOO", eq(xIndex6.getMetadataReference(),
+ new StringPair("content.xml", "idTOO")));
+ XMetadatable xIndex6s = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xSections.getByName("Table of Objects1"));
+ assure("idTOO", eq(xIndex6s.getMetadataReference(),
+ new StringPair("content.xml", "idTOO")));
+
+ XMetadatable xIndex7 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xIndexes.getByName("Bibliography1"));
+ assure("idBib", eq(xIndex7.getMetadataReference(),
+ new StringPair("content.xml", "idBib")));
+ XMetadatable xIndex7s = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xSections.getByName("Bibliography1"));
+ assure("idBib", eq(xIndex7s.getMetadataReference(),
+ new StringPair("content.xml", "idBib")));
+
+ log.println("...done");
}
static void close(XComponent i_comp)
@@ -3863,6 +4240,12 @@ public class TextPortionEnumerationTest extends ComplexTestCase
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));
+ }
+
public void assure(String str, boolean cond) { super.assure(str, cond); }
}
diff --git a/sw/qa/complex/writer/testdocuments/TESTXMLID.odt b/sw/qa/complex/writer/testdocuments/TESTXMLID.odt
new file mode 100644
index 0000000000..063d392a48
--- /dev/null
+++ b/sw/qa/complex/writer/testdocuments/TESTXMLID.odt
Binary files differ
diff --git a/sw/qa/unoapi/knownissues.xcl b/sw/qa/unoapi/knownissues.xcl
index 0c0ae3e506..4f8e3953df 100644
--- a/sw/qa/unoapi/knownissues.xcl
+++ b/sw/qa/unoapi/knownissues.xcl
@@ -154,3 +154,19 @@ 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
diff --git a/sw/qa/unoapi/sw.sce b/sw/qa/unoapi/sw.sce
index 6d8c2b30d5..e57a6643cd 100644
--- a/sw/qa/unoapi/sw.sce
+++ b/sw/qa/unoapi/sw.sce
@@ -2,41 +2,41 @@
-o sw.ConditionalParagraphStyle
-o sw.PageStyle
-o sw.ParagraphStyle
--o sw.SwAccessibleDocumentPageView
+#i111197 -o sw.SwAccessibleDocumentPageView
#i86751 -o sw.SwAccessibleDocumentView
--o sw.SwAccessibleEndnoteView
+#i111185 -o sw.SwAccessibleEndnoteView
-o sw.SwAccessibleFooterView
--o sw.SwAccessibleFootnoteView
+#i111185 -o sw.SwAccessibleFootnoteView
-o sw.SwAccessibleHeaderView
#i89022 -o sw.SwAccessiblePageView
-o sw.SwAccessibleParagraphView
-o sw.SwAccessibleTableCellView
#i85634 -o sw.SwAccessibleTableView
--o sw.SwAccessibleTextEmbeddedObject
--o sw.SwAccessibleTextFrameView
+#i111178 -o sw.SwAccessibleTextEmbeddedObject
+#i111178 -o sw.SwAccessibleTextFrameView
-o sw.SwAccessibleTextGraphicObject
-o sw.SwXAutoTextContainer
-o sw.SwXAutoTextEntry
-o sw.SwXAutoTextGroup
--o sw.SwXBodyText
+#i111185 -o sw.SwXBodyText
-o sw.SwXBookmark
-o sw.SwXBookmarks
-o sw.SwXCell
-o sw.SwXCellRange
-o sw.SwXChapterNumbering
--o sw.SwXDocumentIndex
--o sw.SwXDocumentIndexMark
+#i111185 -o sw.SwXDocumentIndex
+#i111185 -o sw.SwXDocumentIndexMark
-o sw.SwXDocumentIndexes
-o sw.SwXDrawPage
--o sw.SwXEndnoteProperties
+#i111185 -o sw.SwXEndnoteProperties
-o sw.SwXFieldEnumeration
-o sw.SwXFieldMaster
--o sw.SwXFootnote
--o sw.SwXFootnoteProperties
--o sw.SwXFootnoteText
--o sw.SwXFootnotes
+#i111185 -o sw.SwXFootnote
+#i111185 -o sw.SwXFootnoteProperties
+#i111185 -o sw.SwXFootnoteText
+#i111185 -o sw.SwXFootnotes
-o sw.SwXFrames
--o sw.SwXHeadFootText
+#i111185 -o sw.SwXHeadFootText
-o sw.SwXLineNumberingProperties
#i85640 -o sw.SwXMailMerge
-o sw.SwXModule
@@ -48,23 +48,23 @@
-o sw.SwXPropertySetInfo
-o sw.SwXReferenceMark
-o sw.SwXReferenceMarks
--o sw.SwXShape
+#i111190 -o sw.SwXShape
-o sw.SwXStyleFamilies
-o sw.SwXStyleFamily
--o sw.SwXTableCellText
+#i111185 -o sw.SwXTableCellText
-o sw.SwXTableColumns
-o sw.SwXTableRows
-o sw.SwXTextColumns
-o sw.SwXTextCursor
#i89021 -o sw.SwXTextDefaults
--o sw.SwXTextDocument
+#i111185 -o sw.SwXTextDocument
-o sw.SwXTextEmbeddedObject
-o sw.SwXTextEmbeddedObjects
-o sw.SwXTextField
-o sw.SwXTextFieldMasters
-o sw.SwXTextFieldTypes
-o sw.SwXTextFrame
--o sw.SwXTextFrameText
+#i111185 -o sw.SwXTextFrameText
-o sw.SwXTextGraphicObject
-o sw.SwXTextGraphicObjects
#i103696 -o sw.SwXTextPortion
@@ -83,7 +83,7 @@
-o sw.SwXViewSettings
-o sw.XMLContentExporter
#i23394 -o sw.XMLContentImporter
--o sw.XMLExporter
+#i111194-o sw.XMLExporter
-o sw.XMLImporter
#i23394 -o sw.XMLMetaExporter
-o sw.XMLMetaImporter
diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi
index e8f2489860..a895cc5307 100644
--- a/sw/sdi/_textsh.sdi
+++ b/sw/sdi/_textsh.sdi
@@ -472,6 +472,11 @@ interface BaseText
//
// Goto - Methoden
//
+ SID_FM_TOGGLECONTROLFOCUS
+ [
+ ExecMethod = ExecMoveMisc ;
+ StateMethod = NoState ;
+ ]
FN_CNTNT_TO_NEXT_FRAME // status(final|play)
[
ExecMethod = ExecMoveMisc ;
@@ -1480,6 +1485,24 @@ interface BaseText
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;
@@ -1580,6 +1603,12 @@ interface BaseText
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
index bd2995290b..b6f9a0e312 100644
--- a/sw/sdi/_viewsh.sdi
+++ b/sw/sdi/_viewsh.sdi
@@ -398,7 +398,7 @@ interface BaseTextEditView
ExecMethod = Execute ;
StateMethod = GetState ;
]
- FN_THESAURUS_DLG // status(final|play)
+ SID_THESAURUS // status(final|play)
[
ExecMethod = ExecLingu ;
StateMethod = GetState ;
diff --git a/sw/sdi/annotsh.sdi b/sw/sdi/annotsh.sdi
index 4166fa681e..629a3713d8 100755
--- a/sw/sdi/annotsh.sdi
+++ b/sw/sdi/annotsh.sdi
@@ -31,7 +31,7 @@ interface Annotation : _Annotation
]
{
- FN_THESAURUS_DLG // api:
+ SID_THESAURUS // api:
[
ExecMethod = ExecLingu ;
StateMethod = GetLinguState ;
@@ -178,6 +178,27 @@ interface Annotation : _Annotation
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;
@@ -344,6 +365,13 @@ interface Annotation : _Annotation
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
diff --git a/sw/sdi/drwtxtsh.sdi b/sw/sdi/drwtxtsh.sdi
index fd8c577d2a..149344c606 100644
--- a/sw/sdi/drwtxtsh.sdi
+++ b/sw/sdi/drwtxtsh.sdi
@@ -424,7 +424,7 @@ interface TextDrawText
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
- FN_THESAURUS_DLG // api:
+ SID_THESAURUS // api:
[
ExecMethod = ExecDrawLingu ;
StateMethod = GetState ;
@@ -478,6 +478,24 @@ interface TextDrawText
[
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;
@@ -514,6 +532,7 @@ interface TextDrawText
StateMethod = GetState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
+
SID_LANGUAGE_STATUS
[
ExecMethod = Execute;
@@ -521,6 +540,13 @@ interface TextDrawText
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 ;
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index aede24688e..c27ac20b00 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -8319,31 +8319,6 @@ SfxVoidItem TextWrap FN_DRAW_WRAP_DLG
]
//--------------------------------------------------------------------------
-SfxVoidItem ThesaurusDialog FN_THESAURUS_DLG
-()
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = TRUE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Asynchron;
-
- /* config: */
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_OPTIONS;
-]
-
-//--------------------------------------------------------------------------
SfxVoidItem ToggleAnchorType FN_TOOL_ANKER
()
[
diff --git a/sw/sdi/swslots.src b/sw/sdi/swslots.src
deleted file mode 100644
index b67716ca8b..0000000000
--- a/sw/sdi/swslots.src
+++ /dev/null
@@ -1,1488 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#include "cmdid.h"
-#include "svx/svxids.hrc"
-#include "globals.hrc"
-SfxSlotInfo FN_ABSTRACT_NEWDOC
-{
- Slotname [ en-US ] = "Document From Abstract";
-};
-SfxSlotInfo FN_ABSTRACT_STARIMPRESS
-{
- Slotname [ en-US ] = "Presentation from Abstract";
-};
-SfxSlotInfo FN_ADD_UNKNOWN
-{
- Slotname [ en-US ] = "Add Unknown Words";
-};
-SfxSlotInfo FN_AUTO_CORRECT
-{
- Slotname [ en-US ] = "AutoCorrect";
-};
-SfxSlotInfo FN_AUTOFORMAT_APPLY
-{
- Slotname [ en-US ] = "Apply AutoFormat Options";
-};
-SfxSlotInfo FN_AUTOFORMAT_AUTO
-{
- Slotname [ en-US ] = "AutoFormat While Typing";
-};
-SfxSlotInfo FN_AUTOFORMAT_REDLINE_APPLY
-{
- Slotname [ en-US ] = "Apply AutoFormat Options and confirm Changes";
-};
-SfxSlotInfo FN_BACKSPACE
-{
- Slotname [ en-US ] = "Backspace";
-};
-SfxSlotInfo FN_CALC_TABLE
-{
- Slotname [ en-US ] = "Calculate Table";
-};
-SfxSlotInfo FN_CALCULATE
-{
- Slotname [ en-US ] = "Calculate Selection";
-};
-SfxSlotInfo FN_CHANGE_DBFIELD
-{
- Slotname [ en-US ] = "Change Database";
-};
-SfxSlotInfo FN_CHANGE_PAGENUM
-{
- Slotname [ en-US ] = "Page Number";
-};
-SfxSlotInfo FN_CHAR_LEFT
-{
- Slotname [ en-US ] = "To Character Left";
-};
-SfxSlotInfo FN_CHAR_LEFT_SEL
-{
- Slotname [ en-US ] = "Select Character Left";
-};
-SfxSlotInfo FN_CHAR_RIGHT
-{
- Slotname [ en-US ] = "Go Right";
-};
-SfxSlotInfo FN_CHAR_RIGHT_SEL
-{
- Slotname [ en-US ] = "Select Character Right";
-};
-SfxSlotInfo FN_CNTNT_TO_NEXT_FRAME
-{
- Slotname [ en-US ] = "To Next Frame";
-};
-SfxSlotInfo FN_CONVERT_TEXT_TABLE
-{
- Slotname [ en-US ] = "Convert Table/Text";
-};
-SfxSlotInfo FN_DEC_INDENT_OFFSET
-{
- Slotname [ en-US ] = "Decrement Indent Value";
-};
-SfxSlotInfo FN_DELETE_BACK_LINE
-{
- Slotname [ en-US ] = "Delete to Start of Line";
-};
-SfxSlotInfo FN_DELETE_BACK_PARA
-{
- Slotname [ en-US ] = "Delete to Start of Paragraph";
-};
-SfxSlotInfo FN_DELETE_BACK_SENT
-{
- Slotname [ en-US ] = "Delete to Start of Sentence";
-};
-SfxSlotInfo FN_DELETE_BACK_WORD
-{
- Slotname [ en-US ] = "Delete to Start of Word";
-};
-SfxSlotInfo FN_DELETE_LINE
-{
- Slotname [ en-US ] = "Delete to End of Line";
-};
-SfxSlotInfo FN_DELETE_PARA
-{
- Slotname [ en-US ] = "Delete to End of Paragraph";
-};
-SfxSlotInfo FN_DELETE_SENT
-{
- Slotname [ en-US ] = "Delete to End of Sentence";
-};
-SfxSlotInfo FN_DELETE_WHOLE_LINE
-{
- Slotname [ en-US ] = "Delete Row";
-};
-SfxSlotInfo FN_DELETE_WORD
-{
- Slotname [ en-US ] = "Delete to End of Word";
-};
-SfxSlotInfo FN_DRAW_WRAP_DLG
-{
- Slotname [ en-US ] = "Text Wrap";
-};
-SfxSlotInfo FN_DRAWTEXT_ATTR_DLG
-{
- Slotname [ en-US ] = "Text Attributes";
-};
-SfxSlotInfo FN_EDIT_FIELD
-{
- Slotname [ en-US ] = "Fields";
-};
-SfxSlotInfo FN_EDIT_FOOTNOTE
-{
- Slotname [ en-US ] = "Footnote";
-};
-SfxSlotInfo FN_EDIT_FORMULA
-{
- Slotname [ en-US ] = "Formula Bar";
-};
-SfxSlotInfo FN_EDIT_IDX_ENTRY_DLG
-{
- Slotname [ en-US ] = "Index Entry";
-};
-SfxSlotInfo FN_EDIT_LINK_DLG
-{
- Slotname [ en-US ] = "Links";
-};
-SfxSlotInfo FN_EDIT_REGION
-{
- Slotname [ en-US ] = "Sections";
-};
-SfxSlotInfo FN_END_DOC_DIRECT
-{
- Slotname [ en-US ] = "Directly to Document End";
-};
-SfxSlotInfo FN_END_OF_COLUMN
-{
- Slotname [ en-US ] = "To Column End";
-};
-SfxSlotInfo FN_END_OF_DOCUMENT
-{
- Slotname [ en-US ] = "To Document End";
-};
-SfxSlotInfo FN_END_OF_DOCUMENT_SEL
-{
- Slotname [ en-US ] = "Select to Document End";
-};
-SfxSlotInfo FN_END_OF_LINE
-{
- Slotname [ en-US ] = "To End of Line";
-};
-SfxSlotInfo FN_END_OF_LINE_SEL
-{
- Slotname [ en-US ] = "Select to End of Line";
-};
-SfxSlotInfo FN_END_OF_NEXT_COLUMN
-{
- Slotname [ en-US ] = "To End of Next Column";
-};
-SfxSlotInfo FN_END_OF_NEXT_PAGE
-{
- Slotname [ en-US ] = "To End of Next Page";
-};
-SfxSlotInfo FN_END_OF_NEXT_PAGE_SEL
-{
- Slotname [ en-US ] = "Select to End of Next Page";
-};
-SfxSlotInfo FN_END_OF_PAGE
-{
- Slotname [ en-US ] = "To Page End";
-};
-SfxSlotInfo FN_END_OF_PAGE_SEL
-{
- Slotname [ en-US ] = "Select to Page End";
-};
-SfxSlotInfo FN_END_OF_PARA
-{
- Slotname [ en-US ] = "To Paragraph End";
-};
-SfxSlotInfo FN_END_OF_PARA_SEL
-{
- Slotname [ en-US ] = "Select to Paragraph End";
-};
-SfxSlotInfo FN_END_OF_PREV_COLUMN
-{
- Slotname [ en-US ] = "To Previous Column";
-};
-SfxSlotInfo FN_END_OF_PREV_PAGE
-{
- Slotname [ en-US ] = "To End of Previous Page";
-};
-SfxSlotInfo FN_END_OF_PREV_PAGE_SEL
-{
- Slotname [ en-US ] = "Select to End of Previous Page";
-};
-SfxSlotInfo FN_END_TABLE
-{
- Slotname [ en-US ] = "To Table End";
-};
-SfxSlotInfo FN_ENVELOP
-{
- Slotname [ en-US ] = "Insert Envelope";
-};
-SfxSlotInfo FN_ESCAPE
-{
- Slotname [ en-US ] = "Cancel";
-};
-SfxSlotInfo FN_EXECUTE_MACROFIELD
-{
- Slotname [ en-US ] = "Run Macro Field";
-};
-SfxSlotInfo FN_EXPAND_GLOSSARY
-{
- Slotname [ en-US ] = "Run AutoText Entry";
-};
-SfxSlotInfo FN_FLIP_HORZ_GRAFIC
-{
- Slotname [ en-US ] = "Flip Vertically";
-};
-SfxSlotInfo FN_FLIP_VERT_GRAFIC
-{
- Slotname [ en-US ] = "Flip Horizontally";
-};
-SfxSlotInfo FN_FOOTNOTE_TO_ANCHOR
-{
- Slotname [ en-US ] = "To Footnote Anchor";
-};
-SfxSlotInfo FN_FORMAT_BACKGROUND_DLG
-{
- Slotname [ en-US ] = "Background";
-};
-SfxSlotInfo FN_FORMAT_BORDER_DLG
-{
- Slotname [ en-US ] = "Borders";
-};
-SfxSlotInfo FN_FORMAT_DROPCAPS
-{
- Slotname [ en-US ] = "Drop Caps";
-};
-SfxSlotInfo FN_FORMAT_FOOTNOTE_DLG
-{
- Slotname [ en-US ] = "Footnotes";
-};
-SfxSlotInfo FN_FORMAT_FRAME_DLG
-{
- Slotname [ en-US ] = "Frame Properties";
-};
-SfxSlotInfo FN_FORMAT_GRAFIC_DLG
-{
- Slotname [ en-US ] = "Edit Graphics";
-};
-SfxSlotInfo FN_FORMAT_PAGE_COLUMN_DLG
-{
- Slotname [ en-US ] = "Page Columns";
-};
-SfxSlotInfo FN_FORMAT_PAGE_DLG
-{
- Slotname [ en-US ] = "Page Settings";
-};
-SfxSlotInfo FN_FORMAT_RESET
-{
- Slotname [ en-US ] = "Reset Font Attributes";
-};
-SfxSlotInfo FN_FORMAT_TABLE_DLG
-{
- Slotname [ en-US ] = "Edit Table";
-};
-SfxSlotInfo FN_FRAME_ALIGN_HORZ_CENTER
-{
- Slotname [ en-US ] = "Center Horizontal";
-};
-SfxSlotInfo FN_FRAME_ALIGN_HORZ_LEFT
-{
- Slotname [ en-US ] = "Align Left";
-};
-SfxSlotInfo FN_FRAME_ALIGN_HORZ_RIGHT
-{
- Slotname [ en-US ] = "Align Right";
-};
-SfxSlotInfo FN_FRAME_ALIGN_VERT_BOTTOM
-{
- Slotname [ en-US ] = "Align Bottom";
-};
-SfxSlotInfo FN_FRAME_ALIGN_VERT_CENTER
-{
- Slotname [ en-US ] = "Align Vertical Center";
-};
-SfxSlotInfo FN_FRAME_ALIGN_VERT_CHAR_BOTTOM
-{
- Slotname [ en-US ] = "Align to Bottom of Character";
-};
-SfxSlotInfo FN_FRAME_ALIGN_VERT_CHAR_CENTER
-{
- Slotname [ en-US ] = "Align to Vertical Center of Character";
-};
-SfxSlotInfo FN_FRAME_ALIGN_VERT_CHAR_TOP
-{
- Slotname [ en-US ] = "Align to Top of Character";
-};
-SfxSlotInfo FN_FRAME_ALIGN_VERT_ROW_BOTTOM
-{
- Slotname [ en-US ] = "Align to Bottom of Line";
-};
-SfxSlotInfo FN_FRAME_ALIGN_VERT_ROW_CENTER
-{
- Slotname [ en-US ] = "Align to Vertical Center of Line";
-};
-SfxSlotInfo FN_FRAME_ALIGN_VERT_ROW_TOP
-{
- Slotname [ en-US ] = "Align to Top of Line";
-};
-SfxSlotInfo FN_FRAME_ALIGN_VERT_TOP
-{
- Slotname [ en-US ] = "Align Top";
-};
-SfxSlotInfo FN_FRAME_CHAIN
-{
- Slotname [ en-US ] = "Link Frames";
-};
-SfxSlotInfo FN_FRAME_DOWN
-{
- Slotname [ en-US ] = "Send Backward";
-};
-SfxSlotInfo FN_FRAME_MIRROR_ON_EVEN_PAGES
-{
- Slotname [ en-US ] = "Mirror Object on Even Pages";
-};
-SfxSlotInfo FN_FRAME_NOWRAP
-{
- Slotname [ en-US ] = "Wrap Off";
-};
-SfxSlotInfo FN_FRAME_TO_ANCHOR
-{
- Slotname [ en-US ] = "Set Cursor To Anchor";
-};
-SfxSlotInfo FN_FRAME_UNCHAIN
-{
- Slotname [ en-US ] = "Unlink Frames";
-};
-SfxSlotInfo FN_FRAME_UP
-{
- Slotname [ en-US ] = "Bring Forward";
-};
-SfxSlotInfo FN_FRAME_WRAP
-{
- Slotname [ en-US ] = "Wrap On";
-};
-SfxSlotInfo FN_FRAME_WRAP_CONTOUR
-{
- Slotname [ en-US ] = "Wrap Contour On";
-};
-SfxSlotInfo FN_FRAME_WRAP_IDEAL
-{
- Slotname [ en-US ] = "Wrap Optimal";
-};
-SfxSlotInfo FN_FRAME_WRAP_LEFT
-{
- Slotname [ en-US ] = "Wrap Left";
-};
-SfxSlotInfo FN_FRAME_WRAP_RIGHT
-{
- Slotname [ en-US ] = "Wrap Right";
-};
-SfxSlotInfo FN_FRAME_WRAPTHRU
-{
- Slotname [ en-US ] = "Wrap Through";
-};
-SfxSlotInfo FN_FRAME_WRAPTHRU_TRANSP
-{
- Slotname [ en-US ] = "Wrap Transparent";
-};
-SfxSlotInfo FN_GLOSSARY_DLG
-{
- Slotname [ en-US ] = "Edit AutoText";
-};
-SfxSlotInfo FN_GOTO_NEXT_INPUTFLD
-{
- Slotname [ en-US ] = "To Next Input Field";
-};
-SfxSlotInfo FN_GOTO_NEXT_MARK
-{
- Slotname [ en-US ] = "To Next Placeholder";
-};
-SfxSlotInfo FN_GOTO_NEXT_OBJ
-{
- Slotname [ en-US ] = "To Next Object";
-};
-SfxSlotInfo FN_GOTO_NEXT_REGION
-{
- Slotname [ en-US ] = "To Next Section";
-};
-SfxSlotInfo FN_GOTO_PREV_INPUTFLD
-{
- Slotname [ en-US ] = "To Previous Input Field";
-};
-SfxSlotInfo FN_GOTO_PREV_MARK
-{
- Slotname [ en-US ] = "To Previous Placeholder";
-};
-SfxSlotInfo FN_GOTO_PREV_OBJ
-{
- Slotname [ en-US ] = "To Previous Object";
-};
-SfxSlotInfo FN_GOTO_PREV_REGION
-{
- Slotname [ en-US ] = "To Previous Section";
-};
-SfxSlotInfo FN_GOTO_REFERENCE
-{
- Slotname [ en-US ] = "To Reference";
-};
-SfxSlotInfo FN_GRAPHIC_MIRROR_ON_EVEN_PAGES
-{
- Slotname [ en-US ] = "Flip Graphics on Even Pages";
-};
-SfxSlotInfo FN_GROW_FONT_SIZE
-{
- Slotname [ en-US ] = "Increase Font";
-};
-SfxSlotInfo FN_HSCROLLBAR
-{
- Slotname [ en-US ] = "Scroll Horizontal";
-};
-SfxSlotInfo FN_HYPHENATE_OPT_DLG
-{
- Slotname [ en-US ] = "Hyphenation";
-};
-SfxSlotInfo FN_IDX_MARK_TO_IDX
-{
- Slotname [ en-US ] = "Index Mark to Index";
-};
-SfxSlotInfo FN_INC_INDENT_OFFSET
-{
- Slotname [ en-US ] = "Increment Indent Value";
-};
-SfxSlotInfo FN_INSERT_BOOKMARK
-{
- Slotname [ en-US ] = "Insert Bookmark";
-};
-SfxSlotInfo FN_INSERT_BREAK
-{
- Slotname [ en-US ] = "Insert Paragraph";
-};
-SfxSlotInfo FN_INSERT_BREAK_DLG
-{
- Slotname [ en-US ] = "Insert Manual Break";
-};
-SfxSlotInfo FN_INSERT_CAPTION
-{
- Slotname [ en-US ] = "Insert Caption";
-};
-SfxSlotInfo FN_INSERT_COLUMN_BREAK
-{
- Slotname [ en-US ] = "Insert Column Break";
-};
-SfxSlotInfo FN_INSERT_CTRL
-{
- Slotname [ en-US ] = "Insert";
-};
-SfxSlotInfo FN_INSERT_ENDNOTE
-{
- Slotname [ en-US ] = "Insert Endnote Directly";
-};
-SfxSlotInfo FN_INSERT_FIELD
-{
- Slotname [ en-US ] = "Fields Dialog";
-};
-SfxSlotInfo FN_INSERT_FIELD_CTRL
-{
- Slotname [ en-US ] = "Insert Fields";
-};
-SfxSlotInfo FN_INSERT_FLD_AUTHOR
-{
- Slotname [ en-US ] = "Insert Author Field";
-};
-SfxSlotInfo FN_INSERT_FLD_DATE
-{
- Slotname [ en-US ] = "Insert Date";
-};
-SfxSlotInfo FN_INSERT_FLD_PGCOUNT
-{
- Slotname [ en-US ] = "Insert Page Count";
-};
-SfxSlotInfo FN_INSERT_FLD_PGNUMBER
-{
- Slotname [ en-US ] = "Insert Page Number";
-};
-SfxSlotInfo FN_INSERT_FLD_TIME
-{
- Slotname [ en-US ] = "Insert Time";
-};
-SfxSlotInfo FN_INSERT_FLD_TITLE
-{
- Slotname [ en-US ] = "Insert Document Title";
-};
-SfxSlotInfo FN_INSERT_FLD_TOPIC
-{
- Slotname [ en-US ] = "Insert Subject";
-};
-SfxSlotInfo FN_INSERT_FOOTNOTE
-{
- Slotname [ en-US ] = "Insert Footnote Directly";
-};
-SfxSlotInfo FN_INSERT_FOOTNOTE_DLG
-{
- Slotname [ en-US ] = "Insert Footnote";
-};
-SfxSlotInfo FN_INSERT_FRAME
-{
- Slotname [ en-US ] = "Insert Frame";
-};
-SfxSlotInfo FN_INSERT_FRAME_INTERACT_NOCOL
-{
- Slotname [ en-US ] = "Insert single-column frame manually";
-};
-SfxSlotInfo FN_INSERT_FRAME_INTERACT
-{
- Slotname [ en-US ] = "Insert Frame Manually";
-};
-SfxSlotInfo FN_INSERT_HARD_SPACE
-{
- Slotname [ en-US ] = "Insert Non-breaking Space";
-};
-SfxSlotInfo FN_INSERT_HARDHYPHEN
-{
- Slotname [ en-US ] = "Insert Non-breaking Hyphen";
-};
-SfxSlotInfo FN_INSERT_HRULER
-{
- Slotname [ en-US ] = "Insert Horizontal Ruler";
-};
-SfxSlotInfo FN_INSERT_HYPERLINK
-{
- Slotname [ en-US ] = "Insert Hyperlink";
-};
-SfxSlotInfo FN_INSERT_IDX_ENTRY_DLG
-{
- Slotname [ en-US ] = "Insert Index Marker";
-};
-SfxSlotInfo FN_INSERT_LINEBREAK
-{
- Slotname [ en-US ] = "Insert Manual Row Break";
-};
-SfxSlotInfo FN_INSERT_OBJ_CTRL
-{
- Slotname [ en-US ] = "Insert Object";
-};
-SfxSlotInfo FN_INSERT_OBJECT_DLG
-{
- Slotname [ en-US ] = "Insert Other Objects";
-};
-SfxSlotInfo FN_INSERT_PAGEBREAK
-{
- Slotname [ en-US ] = "Insert Manual Page Break";
-};
-SfxSlotInfo FN_INSERT_PAGEFOOTER
-{
- Slotname [ en-US ] = "Insert Footer";
-};
-SfxSlotInfo FN_INSERT_PAGEHEADER
-{
- Slotname [ en-US ] = "Insert Header";
-};
-SfxSlotInfo FN_INSERT_REF_FIELD
-{
- Slotname [ en-US ] = "Insert Field Reference";
-};
-SfxSlotInfo FN_INSERT_REGION
-{
- Slotname [ en-US ] = "Insert Section";
-};
-SfxSlotInfo FN_INSERT_SMA
-{
- Slotname [ en-US ] = "Insert %PRODUCTNAME Math object";
-};
-SfxSlotInfo FN_INSERT_SOFT_HYPHEN
-{
- Slotname [ en-US ] = "Insert Optional Hyphen";
-};
-SfxSlotInfo FN_INSERT_SYMBOL
-{
- Slotname [ en-US ] = "Insert Special Character ";
-};
-SfxSlotInfo FN_INSERT_TABLE
-{
- Slotname [ en-US ] = "Insert Table";
-};
-SfxSlotInfo FN_JAVAEDIT
-{
- Slotname [ en-US ] = "Insert Script";
-};
-SfxSlotInfo FN_LABEL
-{
- Slotname [ en-US ] = "Insert Labels";
-};
-SfxSlotInfo FN_BUSINESS_CARD
-{
- Slotname [ en-US ] = "Insert business cards";
-};
-SfxSlotInfo FN_LINE_DOWN
-{
- Slotname [ en-US ] = "To Line Below";
-};
-SfxSlotInfo FN_LINE_DOWN_SEL
-{
- Slotname [ en-US ] = "Select Down";
-};
-SfxSlotInfo FN_LINE_NUMBERING_DLG
-{
- Slotname [ en-US ] = "Set Line Numbering";
-};
-SfxSlotInfo FN_LINE_UP
-{
- Slotname [ en-US ] = "To Top Line";
-};
-SfxSlotInfo FN_LINE_UP_SEL
-{
- Slotname [ en-US ] = "Select to Top Line";
-};
-SfxSlotInfo FN_NAVIGATION_PI_GOTO_PAGE
-{
- Slotname [ en-US ] = "To Page";
-};
-SfxSlotInfo FN_NEW_GLOBAL_DOC
-{
- Slotname [ en-US ] = "Create Master Document";
-};
-SfxSlotInfo FN_NEW_HTML_DOC
-{
- Slotname [ en-US ] = "Create HTML Document";
-};
-SfxSlotInfo FN_NEXT_BOOKMARK
-{
- Slotname [ en-US ] = "To Next Bookmark";
-};
-SfxSlotInfo FN_NEXT_FOOTNOTE
-{
- Slotname [ en-US ] = "To Next Footnote";
-};
-SfxSlotInfo FN_NEXT_PARA
-{
- Slotname [ en-US ] = "To Next Paragraph";
-};
-SfxSlotInfo FN_NEXT_SENT
-{
- Slotname [ en-US ] = "To Next Sentence";
-};
-SfxSlotInfo FN_NEXT_SENT_SEL
-{
- Slotname [ en-US ] = "Select to Next Sentence";
-};
-SfxSlotInfo FN_NEXT_TABLE
-{
- Slotname [ en-US ] = "To Next Table";
-};
-SfxSlotInfo FN_NEXT_TBLFML
-{
- Slotname [ en-US ] = "Go to next table formula";
-};
-SfxSlotInfo FN_NEXT_TBLFML_ERR
-{
- Slotname [ en-US ] = "Go to next faulty table formula";
-};
-SfxSlotInfo FN_NEXT_TOXMARK
-{
- Slotname [ en-US ] = "Go to Next Index Mark";
-};
-SfxSlotInfo FN_NEXT_WORD
-{
- Slotname [ en-US ] = "To Word Right";
-};
-SfxSlotInfo FN_NEXT_WORD_SEL
-{
- Slotname [ en-US ] = "Select to Word Right";
-};
-SfxSlotInfo FN_NUM_BULLET_DOWN
-{
- Slotname [ en-US ] = "Down One Level";
-};
-SfxSlotInfo FN_NUM_BULLET_MOVEDOWN
-{
- Slotname [ en-US ] = "Move Down";
-};
-SfxSlotInfo FN_NUM_BULLET_MOVEUP
-{
- Slotname [ en-US ] = "Move Up";
-};
-SfxSlotInfo FN_NUM_BULLET_NEXT
-{
- Slotname [ en-US ] = "To Next Paragraph in Level";
-};
-SfxSlotInfo FN_NUM_BULLET_NONUM
-{
- Slotname [ en-US ] = "Insert Unnumbered Entry";
-};
-SfxSlotInfo FN_NUM_BULLET_OFF
-{
- Slotname [ en-US ] = "Numbering Off";
-};
-SfxSlotInfo FN_NUM_BULLET_OUTLINE_DOWN
-{
- Slotname [ en-US ] = "Move Down with Subpoints";
-};
-SfxSlotInfo FN_NUM_BULLET_OUTLINE_MOVEDOWN
-{
- Slotname [ en-US ] = "Move Down with Subpoints";
-};
-SfxSlotInfo FN_NUM_BULLET_OUTLINE_MOVEUP
-{
- Slotname [ en-US ] = "Move Up with Subpoints";
-};
-SfxSlotInfo FN_NUM_BULLET_OUTLINE_UP
-{
- Slotname [ en-US ] = "Move Up with Subpoints";
-};
-SfxSlotInfo FN_NUM_BULLET_PREV
-{
- Slotname [ en-US ] = "To Previous Paragraph in Level";
-};
-SfxSlotInfo FN_NUM_BULLET_UP
-{
- Slotname [ en-US ] = "Up One Level";
-};
-SfxSlotInfo FN_NUM_FORMAT_TABLE_DLG
-{
- Slotname [ en-US ] = "Edit Number Format";
-};
-SfxSlotInfo FN_NUM_OR_NONUM
-{
- Slotname [ en-US ] = "Numbering On/Off";
-};
-SfxSlotInfo FN_NUMBER_BULLETS
-{
- Slotname [ en-US ] = "Edit Numbering";
-};
-SfxSlotInfo FN_NUMBER_CURRENCY
-{
- Slotname [ en-US ] = "Number Format: Currency";
-};
-SfxSlotInfo FN_NUMBER_DATE
-{
- Slotname [ en-US ] = "Number Format : Date";
-};
-SfxSlotInfo FN_NUMBER_NEWSTART
-{
- Slotname [ en-US ] = "Restart Numbering";
-};
-SfxSlotInfo FN_NUMBER_PERCENT
-{
- Slotname [ en-US ] = "Number Format: Percent";
-};
-SfxSlotInfo FN_NUMBER_SCIENTIFIC
-{
- Slotname [ en-US ] = "Number Format: Exponential";
-};
-SfxSlotInfo FN_NUMBER_STANDARD
-{
- Slotname [ en-US ] = "Number Format: Standard";
-};
-SfxSlotInfo FN_NUMBER_TIME
-{
- Slotname [ en-US ] = "Number Format: Time";
-};
-SfxSlotInfo FN_NUMBER_TWODEC
-{
- Slotname [ en-US ] = "Number Format: Decimal";
-};
-SfxSlotInfo FN_NUMBERING_OUTLINE_DLG
-{
- Slotname [ en-US ] = "Outline Numbering";
-};
-SfxSlotInfo FN_OPTIMIZE_TABLE
-{
- Slotname [ en-US ] = "Optimize";
-};
-SfxSlotInfo FN_OUTLINE_TO_CLIPBOARD
-{
- Slotname [ en-US ] = "Outline to Clipboard";
-};
-SfxSlotInfo FN_OUTLINE_TO_IMPRESS
-{
- Slotname [ en-US ] = "Outline to Presentation";
-};
-SfxSlotInfo FN_PAGE_STYLE_SET_COLS
-{
- Slotname [ en-US ] = "Page Style: Columns";
-};
-SfxSlotInfo FN_PAGEDOWN
-{
- Slotname [ en-US ] = "Next Page";
-};
-SfxSlotInfo FN_PAGEDOWN_SEL
-{
- Slotname [ en-US ] = "Select to Next Page";
-};
-SfxSlotInfo FN_PAGEUP
-{
- Slotname [ en-US ] = "Previous Page";
-};
-SfxSlotInfo FN_PAGEUP_SEL
-{
- Slotname [ en-US ] = "Select to Previous Page";
-};
-SfxSlotInfo FN_PASTESPECIAL
-{
- Slotname [ en-US ] = "Paste Special";
-};
-SfxSlotInfo FN_PASTEUNFORMATTED
-{
- Slotname [ en-US ] = "Paste Unformatted Text";
-};
-SfxSlotInfo FN_POSTIT
-{
- Slotname [ en-US ] = "Insert Note";
-};
-SfxSlotInfo FN_PREV_BOOKMARK
-{
- Slotname [ en-US ] = "To Previous Bookmark";
-};
-SfxSlotInfo FN_PREV_FOOTNOTE
-{
- Slotname [ en-US ] = "To Previous Footnote";
-};
-SfxSlotInfo FN_PREV_PARA
-{
- Slotname [ en-US ] = "To Previous Paragraph";
-};
-SfxSlotInfo FN_PREV_SENT
-{
- Slotname [ en-US ] = "To Previous Sentence";
-};
-SfxSlotInfo FN_PREV_SENT_SEL
-{
- Slotname [ en-US ] = "Select to Previous Sentence";
-};
-SfxSlotInfo FN_PREV_TABLE
-{
- Slotname [ en-US ] = "To Previous Table";
-};
-SfxSlotInfo FN_PREV_TBLFML
-{
- Slotname [ en-US ] = "Go to previous table formula";
-};
-SfxSlotInfo FN_PREV_TBLFML_ERR
-{
- Slotname [ en-US ] = "Go to previous faulty table formula";
-};
-SfxSlotInfo FN_PREV_TOXMARK
-{
- Slotname [ en-US ] = "Go to Previous Index Mark";
-};
-SfxSlotInfo FN_PREV_WORD
-{
- Slotname [ en-US ] = "To Word Left";
-};
-SfxSlotInfo FN_PREV_WORD_SEL
-{
- Slotname [ en-US ] = "Select to Begin of Word";
-};
-SfxSlotInfo FN_PREVIEW_ZOOM
-{
- Slotname [ en-US ] = "Preview Zoom";
-};
-SfxSlotInfo FN_PRINT_LAYOUT
-{
- Slotname [ en-US ] = "Print Layout On/Off";
-};
-SfxSlotInfo FN_PRINT_PAGEPREVIEW
-{
- Slotname [ en-US ] = "Print document";
-};
-SfxSlotInfo FN_MAILMERGE_WIZARD
-{
- SlotName[ en-US ] = "Mail Merge Wizard";
-};
-SfxSlotInfo FN_QRY_MERGE
-{
- Slotname [ en-US ] = "Prepare Mail Merge";
-};
-SfxSlotInfo FN_REDLINE_ACCEPT
-{
- Slotname [ en-US ] = "Accept or Reject Changes";
-};
-SfxSlotInfo FN_REDLINE_COMMENT
-{
- Slotname [ en-US ] = "Insert Comment";
-};
-SfxSlotInfo FN_REDLINE_ON
-{
- Slotname [ en-US ] = "Switch on Review";
-};
-SfxSlotInfo FN_REDLINE_PROTECT
-{
- Slotname [ en-US ] = "Protect Record of Changes";
-};
-SfxSlotInfo FN_REDLINE_SHOW
-{
- Slotname [ en-US ] = "Highlight Changes";
-};
-SfxSlotInfo FN_REFRESH_VIEW
-{
- Slotname [ en-US ] = "Restore View";
-};
-SfxSlotInfo FN_REPAGINATE
-{
- Slotname [ en-US ] = "Repaginate";
-};
-SfxSlotInfo FN_REPEAT_SEARCH
-{
- Slotname [ en-US ] = "Repeat Search";
-};
-SfxSlotInfo FN_RULER
-{
- Slotname [ en-US ] = "Ruler On/Off";
-};
-SfxSlotInfo FN_SELECT_PARA
-{
- Slotname [ en-US ] = "Select Paragraph";
-};
-SfxSlotInfo FN_SELECT_WORD
-{
- Slotname [ en-US ] = "Select Word";
-};
-SfxSlotInfo FN_SET_ADD_MODE
-{
- Slotname [ en-US ] = "MultiSelection On";
-};
-SfxSlotInfo FN_SET_EXT_MODE
-{
- Slotname [ en-US ] = "Extended Selection On";
-};
-SfxSlotInfo FN_SET_PAGE_STYLE
-{
- Slotname [ en-US ] = "Apply Page Style";
-};
-SfxSlotInfo FN_SET_SUB_SCRIPT
-{
- Slotname [ en-US ] = "Subscript";
-};
-SfxSlotInfo FN_SET_SUPER_SCRIPT
-{
- Slotname [ en-US ] = "Superscript";
-};
-SfxSlotInfo FN_SHADOWCURSOR
-{
- Slotname [ en-US ] = "Direct Cursor On/Off";
-};
-SfxSlotInfo FN_SHIFT_BACKSPACE
-{
- Slotname [ en-US ] = "Backspace";
-};
-SfxSlotInfo FN_SHOW_MULTIPLE_PAGES
-{
- Slotname [ en-US ] = "Page Preview: Multiple Pages";
-};
-SfxSlotInfo FN_SHOW_TWO_PAGES
-{
- Slotname [ en-US ] = "Page Preview: Two Pages";
-};
-SfxSlotInfo FN_SHOW_BOOKVIEW
-{
- SlotName[ en-US ] = "Book Preview";
-};
-SfxSlotInfo FN_SHRINK_FONT_SIZE
-{
- Slotname [ en-US ] = "Reduce Font";
-};
-SfxSlotInfo FN_SORTING_DLG
-{
- Slotname [ en-US ] = "Sort";
-};
-SfxSlotInfo FN_START_DOC_DIRECT
-{
- Slotname [ en-US ] = "Directly to Document Begin";
-};
-SfxSlotInfo FN_START_OF_COLUMN
-{
- Slotname [ en-US ] = "To Column Begin";
-};
-SfxSlotInfo FN_START_OF_DOCUMENT
-{
- Slotname [ en-US ] = "To Document Begin";
-};
-SfxSlotInfo FN_START_OF_DOCUMENT_SEL
-{
- Slotname [ en-US ] = "Select to Document Begin";
-};
-SfxSlotInfo FN_START_OF_LINE
-{
- Slotname [ en-US ] = "To Line Begin";
-};
-SfxSlotInfo FN_START_OF_LINE_SEL
-{
- Slotname [ en-US ] = "Select to Begin of Line";
-};
-SfxSlotInfo FN_START_OF_NEXT_COLUMN
-{
- Slotname [ en-US ] = "To Begin of Next Column";
-};
-SfxSlotInfo FN_START_OF_NEXT_PAGE
-{
- Slotname [ en-US ] = "To Begin of Next Page";
-};
-SfxSlotInfo FN_START_OF_NEXT_PAGE_SEL
-{
- Slotname [ en-US ] = "Select to Begin of Next Page";
-};
-SfxSlotInfo FN_START_OF_PAGE
-{
- Slotname [ en-US ] = "To Page Begin";
-};
-SfxSlotInfo FN_START_OF_PAGE_SEL
-{
- Slotname [ en-US ] = "Select to Page Begin";
-};
-SfxSlotInfo FN_START_OF_PARA
-{
- Slotname [ en-US ] = "To Paragraph Begin";
-};
-SfxSlotInfo FN_START_OF_PARA_SEL
-{
- Slotname [ en-US ] = "Select to Paragraph Begin";
-};
-SfxSlotInfo FN_START_OF_PREV_COLUMN
-{
- Slotname [ en-US ] = "To Begin of Previous Column";
-};
-SfxSlotInfo FN_START_OF_PREV_PAGE
-{
- Slotname [ en-US ] = "To Begin of Previous Page";
-};
-SfxSlotInfo FN_START_OF_PREV_PAGE_SEL
-{
- Slotname [ en-US ] = "Select to Begin of Previous Page";
-};
-SfxSlotInfo FN_START_TABLE
-{
- Slotname [ en-US ] = "To Table Begin";
-};
-SfxSlotInfo FN_STAT_PAGE
-{
- Slotname [ en-US ] = "Page Number";
-};
-SfxSlotInfo FN_STAT_SELMODE
-{
- Slotname [ en-US ] = "Selection Mode";
-};
-SfxSlotInfo FN_STAT_TEMPLATE
-{
- Slotname [ en-US ] = "Page Style";
-};
-SfxSlotInfo FN_TABLE_ADJUST_CELLS
-{
- Slotname [ en-US ] = "Optimal Column Width";
-};
-SfxSlotInfo FN_TABLE_AUTOSUM
-{
- Slotname [ en-US ] = "Sum";
-};
-SfxSlotInfo FN_TABLE_BALANCE_CELLS
-{
- Slotname [ en-US ] = "Space Columns Equally";
-};
-SfxSlotInfo FN_TABLE_BALANCE_ROWS
-{
- Slotname [ en-US ] = "Space Rows Equally ";
-};
-SfxSlotInfo FN_TABLE_DELETE_COL
-{
- Slotname [ en-US ] = "Delete Column";
-};
-SfxSlotInfo FN_TABLE_DELETE_ROW
-{
- Slotname [ en-US ] = "Delete Row";
-};
-SfxSlotInfo FN_TABLE_INSERT_COL
-{
- Slotname [ en-US ] = "Insert Column";
-};
-SfxSlotInfo FN_TABLE_INSERT_ROW
-{
- Slotname [ en-US ] = "Insert Row";
-};
-SfxSlotInfo FN_TABLE_MERGE_CELLS
-{
- Slotname [ en-US ] = "Merge Cells";
-};
-SfxSlotInfo FN_TABLE_MERGE_TABLE
-{
- Slotname [ en-US ] = "Merge Table";
-};
-SfxSlotInfo FN_FORMAT_APPLY_HEAD1
-{
- Slotname [ en-US ] = "Apply Style Heading 1";
-};
-SfxSlotInfo FN_FORMAT_APPLY_HEAD2
-{
- Slotname [ en-US ] = "Apply Style Heading 2";
-};
-SfxSlotInfo FN_FORMAT_APPLY_HEAD3
-{
- Slotname [ en-US ] = "Apply Style Heading 3";
-};
-SfxSlotInfo FN_FORMAT_APPLY_DEFAULT
-{
- Slotname [ en-US ] = "Apply Style Default";
-};
-SfxSlotInfo FN_FORMAT_APPLY_TEXTBODY
-{
- Slotname [ en-US ] = "Apply Style Textbody";
-};
-SfxSlotInfo FN_TABLE_MODE_FIX
-{
- Slotname [ en-US ] = "Table: Fixed";
-};
-SfxSlotInfo FN_TABLE_MODE_FIX_PROP
-{
- Slotname [ en-US ] = "Table: Fixed, Proportional";
-};
-SfxSlotInfo FN_TABLE_MODE_VARIABLE
-{
- Slotname [ en-US ] = "Table: Variable";
-};
-SfxSlotInfo FN_TABLE_OPTIMAL_HEIGHT
-{
- Slotname [ en-US ] = "Optimal Row Height";
-};
-SfxSlotInfo FN_TABLE_SELECT_ALL
-{
- Slotname [ en-US ] = "Select Table";
-};
-SfxSlotInfo FN_TABLE_SELECT_COL
-{
- Slotname [ en-US ] = "Select Column";
-};
-SfxSlotInfo FN_TABLE_SELECT_ROW
-{
- Slotname [ en-US ] = "Select Rows";
-};
-SfxSlotInfo FN_TABLE_SET_READ_ONLY_CELLS
-{
- Slotname [ en-US ] = "Protect Cells";
-};
-SfxSlotInfo FN_TABLE_SET_ROW_HEIGHT
-{
- Slotname [ en-US ] = "Row Height";
-};
-SfxSlotInfo FN_TABLE_SPLIT_CELLS
-{
- Slotname [ en-US ] = "Split Cells";
-};
-SfxSlotInfo FN_TABLE_SPLIT_TABLE
-{
- Slotname [ en-US ] = "Split Table";
-};
-SfxSlotInfo FN_TABLE_UNSET_READ_ONLY
-{
- Slotname [ en-US ] = "Unprotect sheet";
-};
-SfxSlotInfo FN_TABLE_UNSET_READ_ONLY_CELLS
-{
- Slotname [ en-US ] = "Unprotect cells";
-};
-SfxSlotInfo FN_TABLE_VERT_BOTTOM
-{
- Slotname [ en-US ] = "Bottom";
-};
-SfxSlotInfo FN_TABLE_VERT_CENTER
-{
- Slotname [ en-US ] = "Center ( vertical )";
-};
-SfxSlotInfo FN_TABLE_VERT_NONE
-{
- Slotname [ en-US ] = "Top";
-};
-SfxSlotInfo FN_THESAURUS_DLG
-{
- Slotname [ en-US ] = "Thesaurus";
-};
-SfxSlotInfo FN_TO_FOOTER
-{
- Slotname [ en-US ] = "To Footer";
-};
-SfxSlotInfo FN_TO_HEADER
-{
- Slotname [ en-US ] = "To Header";
-};
-SfxSlotInfo FN_TOOL_ANKER
-{
- Slotname [ en-US ] = "Change Anchor";
-};
-SfxSlotInfo FN_TOOL_ANKER_AT_CHAR
-{
- Slotname [ en-US ] = "Anchor to Character";
-};
-SfxSlotInfo FN_TOOL_ANKER_CHAR
-{
- Slotname [ en-US ] = "Anchor as Character";
-};
-SfxSlotInfo FN_TOOL_ANKER_FRAME
-{
- Slotname [ en-US ] = "Anchor To Frame";
-};
-SfxSlotInfo FN_TOOL_ANKER_PAGE
-{
- Slotname [ en-US ] = "Anchor To Page";
-};
-SfxSlotInfo FN_TOOL_ANKER_PARAGRAPH
-{
- Slotname [ en-US ] = "Anchor To Paragraph";
-};
-SfxSlotInfo FN_TOOL_GROUP
-{
- Slotname [ en-US ] = "Group";
-};
-SfxSlotInfo FN_TOOL_HIERARCHIE
-{
- Slotname [ en-US ] = "Change Position";
-};
-SfxSlotInfo FN_TOOL_UNGROUP
-{
- Slotname [ en-US ] = "Ungroup";
-};
-SfxSlotInfo FN_UNDERLINE_DOUBLE
-{
- Slotname [ en-US ] = "Double Underline ";
-};
-SfxSlotInfo FN_UPDATE_ALL
-{
- Slotname [ en-US ] = "Update All";
-};
-SfxSlotInfo FN_UPDATE_ALL_LINKS
-{
- Slotname [ en-US ] = "Update All Links";
-};
-SfxSlotInfo FN_UPDATE_CUR_TOX
-{
- Slotname [ en-US ] = "Update Index";
-};
-SfxSlotInfo FN_EDIT_CURRENT_TOX
-{
- Slotname [ en-US ] = "Edit index";
-};
-SfxSlotInfo FN_UPDATE_FIELDS
-{
- Slotname [ en-US ] = "Update Fields";
-};
-SfxSlotInfo FN_UPDATE_INPUTFIELDS
-{
- Slotname [ en-US ] = "Update Input Fields";
-};
-SfxSlotInfo FN_UPDATE_TOX
-{
- Slotname [ en-US ] = "Update Indexes";
-};
-SfxSlotInfo FN_VIEW_BOUNDS
-{
- Slotname [ en-US ] = "Text Limits";
-};
-SfxSlotInfo FN_VIEW_FIELDNAME
-{
- Slotname [ en-US ] = "Field Names On/Off";
-};
-SfxSlotInfo FN_VIEW_FIELDS
-{
- Slotname [ en-US ] = "Fields";
-};
-SfxSlotInfo FN_VIEW_GRAPHIC
-{
- Slotname [ en-US ] = "Graphics On/Off";
-};
-
-SfxSlotInfo FN_VIEW_HIDDEN_PARA
-{
- Slotname [ en-US ] = "Hidden Paragraphs";
-};
-SfxSlotInfo FN_VIEW_MARKS
-{
- Slotname [ en-US ] = "Field Shadings";
-};
-SfxSlotInfo FN_VIEW_META_CHARS
-{
- Slotname [ en-US ] = "Nonprinting Characters On/Off";
-};
-SfxSlotInfo FN_VIEW_TABLEGRID
-{
- Slotname [ en-US ] = "Table Limits";
-};
-SfxSlotInfo FN_VLINEAL
-{
- Slotname [ en-US ] = "Vertical Ruler";
-};
-SfxSlotInfo FN_VSCROLLBAR
-{
- Slotname [ en-US ] = "Vertical Scroll Bar";
-};
-SfxSlotInfo FN_WRAP_ANCHOR_ONLY
-{
- Slotname [ en-US ] = "Wrap First Paragraph";
-};
-SfxSlotInfo SID_ATTR_CHAR_COLOR_BACKGROUND
-{
- Slotname [ en-US ] = "Highlighting";
-};
-SfxSlotInfo SID_ATTR_CHAR_COLOR_BACKGROUND_EXT
-{
- Slotname [ en-US ] = "Highlight Fill";
-};
-SfxSlotInfo SID_ATTR_CHAR_COLOR_EXT
-{
- Slotname [ en-US ] = "Font Color Fill";
-};
-SfxSlotInfo SID_ATTR_CHAR_COLOR2
-{
- Slotname [ en-US ] = "Font Color";
-};
-SfxSlotInfo SID_TEMPLATE_LOAD
-{
- Slotname [ en-US ] = "Load Styles";
-};
-SfxSlotInfo FN_FORMAT_COLUMN
-{
- Slotname [ en-US ] = "Columns";
-};
-SfxSlotInfo FN_INSERT_MULTI_TOX
-{
-
- Slotname [ en-US ] = "Insert Index";
-};
-SfxSlotInfo FN_INSERT_AUTH_ENTRY_DLG
-{
- Slotname [ en-US ] = "Insert Bibliography Entry";
-};
-
-SfxSlotInfo FN_EDIT_AUTH_ENTRY_DLG
-{
- Slotname [ en-US ] = "Edit Bibliography Entry";
-};
-
-SfxSlotInfo FN_REMOVE_CUR_TOX
-{
- Slotname [ en-US ] = "Delete index";
-};
-SfxSlotInfo FN_EDIT_HYPERLINK
-{
- Slotname [ en-US ] = "Edit hyperlink";
-};
-SfxSlotInfo FN_SET_MODOPT_TBLNUMFMT
-{
- Slotname [ en-US ] = "Number Recognition";
-};
-SfxSlotInfo FN_UPDATE_CHARTS
-{
- Slotname [ en-US ] = "Update Charts";
-};
-SfxSlotInfo FN_NAME_SHAPE
-{
- Slotname [ en-US ] = "Name...";
-};
-// #i68101#
-SfxSlotInfo FN_TITLE_DESCRIPTION_SHAPE
-{
- Slotname [ en-US ] = "Description...";
-};
-SfxSlotInfo FN_CLOSE_PAGEPREVIEW
-{
- Slotname [ en-US ] = "Close Preview";
-};
-
-SfxSlotInfo FN_TO_FOOTNOTE_AREA
-{
- Slotname [ en-US ] = "Edit Footnote/Endnote";
-};
-
-SfxSlotInfo FN_READONLY_SELECTION_MODE
-{
- Slotname [ en-US ] = "Select Text";
-};
-
-SfxSlotInfo FN_TABLE_ROW_SPLIT
-{
- Slotname [ en-US ] = "Break across page and columns";
-};
-SfxSlotInfo FN_WORDCOUNT_DIALOG
-{
- SlotName[ en-US ] = "Word Count";
-};
-SfxSlotInfo FN_TABLE_DELETE_TABLE
-{
- SlotName [ en-US ] = "Delete table";
-};
-SfxSlotInfo FN_TABLE_SELECT_CELL
-{
- SlotName [ en-US ] = "Select cell";
-};
-SfxSlotInfo FN_CONVERT_TEXT_TO_TABLE
-{
- SlotName [ en-US ] = "Convert Text to Table";
-};
-
-SfxSlotInfo FN_CONVERT_TABLE_TO_TEXT
-{
- SlotName [ en-US ] = "Convert Table to Text";
-};
-SfxSlotInfo FN_TABLE_SORT_DIALOG
-{
- SlotName [ en-US ] = "Sort";
-};
-SfxSlotInfo FN_TABLE_HEADLINE_REPEAT
-{
- SlotName [ en-US ] = "Heading Rows Repeat";
-};
-SfxSlotInfo FN_XFORMS_DESIGN_MODE
-{
- SlotName[ en-US ] = "Design Mode On/Off";
-};
-SfxSlotInfo FN_XFORMS_INIT
-{
- SlotName[ en-US ] = "XML Form Document";
-};
-SfxSlotInfo FN_NUM_CONTINUE
-{
- SlotName[ en-US ] = "Continue previous numbering";
-};
-
-SfxSlotInfo FN_INSERT_RLM
-{
- SlotName[ en-US ] = "Right-to-left mark";
-};
-SfxSlotInfo FN_INSERT_LRM
-{
- SlotName[ en-US ] = "Left-to-right mark";
-};
-SfxSlotInfo FN_INSERT_ZWSP
-{
- SlotName[ en-US ] = "No-width no break";
-};
-SfxSlotInfo FN_INSERT_ZWNBSP
-{
- SlotName[ en-US ] = "No-width optional break";
-};
-SfxSlotInfo FN_VIEW_NOTES
-{
- Slotname [ en-US ] = "Notes";
-};
-
diff --git a/sw/source/core/SwNumberTree/SwNodeNum.cxx b/sw/source/core/SwNumberTree/SwNodeNum.cxx
index abcc7936b2..400c29b2fb 100644
--- a/sw/source/core/SwNumberTree/SwNodeNum.cxx
+++ b/sw/source/core/SwNumberTree/SwNodeNum.cxx
@@ -38,7 +38,7 @@
#include <IDocumentListItems.hxx>
// <--
// --> OD 2010-01-13 #b6912256#
-#include <svl/svstdarr.hxx>
+//#include <svtools/svstdarr.hxx>
#include <doc.hxx>
// <--
diff --git a/sw/source/core/SwNumberTree/SwNumberTree.cxx b/sw/source/core/SwNumberTree/SwNumberTree.cxx
index 3a17177afb..87e6467c71 100644
--- a/sw/source/core/SwNumberTree/SwNumberTree.cxx
+++ b/sw/source/core/SwNumberTree/SwNumberTree.cxx
@@ -127,19 +127,6 @@ SwNumberTreeNode * SwNumberTreeNode::GetRoot() const
return pResult;
}
-SwNumberTreeNode * SwNumberTreeNode::GetFirstChild() const
-{
- SwNumberTreeNode * pResult = 0;
-
- tSwNumberTreeChildren::iterator aIt = mChildren.begin();
-
- if (aIt != mChildren.end() )
- pResult = *aIt;
-
- return pResult;
-}
-
-
void SwNumberTreeNode::ClearObsoletePhantoms()
{
tSwNumberTreeChildren::iterator aIt = mChildren.begin();
diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx
index 774bcbb142..f4cf864b72 100644
--- a/sw/source/core/access/acccell.cxx
+++ b/sw/source/core/access/acccell.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,6 +41,7 @@
#include <swtable.hxx>
#include "crsrsh.hxx"
#include "viscrs.hxx"
+#include <accfrmobj.hxx>
#include <accfrmobjslist.hxx>
#include "frmfmt.hxx"
#include "cellatr.hxx"
@@ -56,6 +57,7 @@
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";
@@ -83,8 +85,7 @@ sal_Bool SwAccessibleCell::IsSelected()
return bRet;
}
-void SwAccessibleCell::GetStates(
- ::utl::AccessibleStateSetHelper& rStateSet )
+void SwAccessibleCell::GetStates( ::utl::AccessibleStateSetHelper& rStateSet )
{
SwAccessibleContext::GetStates( rStateSet );
@@ -104,11 +105,10 @@ void SwAccessibleCell::GetStates(
}
}
-SwAccessibleCell::SwAccessibleCell(
- SwAccessibleMap *pInitMap,
- const SwCellFrm *pCellFrm ) :
- SwAccessibleContext( pInitMap, AccessibleRole::TABLE_CELL, pCellFrm ),
- bIsSelected( sal_False )
+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() );
@@ -145,11 +145,11 @@ sal_Bool SwAccessibleCell::_InvalidateChildrenCursorPos( const SwFrm *pFrm )
{
sal_Bool bChanged = sal_False;
- const SwFrmOrObjSList aVisList( GetVisArea(), pFrm );
- SwFrmOrObjSList::const_iterator aIter( aVisList.begin() );
+ const SwAccessibleChildSList aVisList( GetVisArea(), *pFrm, *GetMap() );
+ SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
while( aIter != aVisList.end() )
{
- const SwFrmOrObj& rLower = *aIter;
+ const SwAccessibleChild& rLower = *aIter;
const SwFrm *pLower = rLower.GetSwFrm();
if( pLower )
{
@@ -184,7 +184,7 @@ sal_Bool SwAccessibleCell::_InvalidateChildrenCursorPos( const SwFrm *pFrm )
void SwAccessibleCell::_InvalidateCursorPos()
{
- const SwFrm *pParent = GetParent( GetFrm(), IsInPagePreview() );
+ 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() )
@@ -253,21 +253,21 @@ uno::Sequence< OUString > SAL_CALL SwAccessibleCell::getSupportedServiceNames()
void SwAccessibleCell::Dispose( sal_Bool bRecursive )
{
- const SwFrm *pParent = GetParent( GetFrm(), IsInPagePreview() );
+ const SwFrm *pParent = GetParent( SwAccessibleChild(GetFrm()), IsInPagePreview() );
::vos::ORef< SwAccessibleContext > xAccImpl(
GetMap()->GetContextImpl( pParent, sal_False ) );
if( xAccImpl.isValid() )
- xAccImpl->DisposeChild( GetFrm(), bRecursive );
+ xAccImpl->DisposeChild( SwAccessibleChild(GetFrm()), bRecursive );
SwAccessibleContext::Dispose( bRecursive );
}
void SwAccessibleCell::InvalidatePosOrSize( const SwRect& rOldBox )
{
- const SwFrm *pParent = GetParent( GetFrm(), IsInPagePreview() );
+ const SwFrm *pParent = GetParent( SwAccessibleChild(GetFrm()), IsInPagePreview() );
::vos::ORef< SwAccessibleContext > xAccImpl(
GetMap()->GetContextImpl( pParent, sal_False ) );
if( xAccImpl.isValid() )
- xAccImpl->InvalidateChildPosOrSize( GetFrm(), rOldBox );
+ xAccImpl->InvalidateChildPosOrSize( SwAccessibleChild(GetFrm()), rOldBox );
SwAccessibleContext::InvalidatePosOrSize( rOldBox );
}
diff --git a/sw/source/core/access/acccell.hxx b/sw/source/core/access/acccell.hxx
index b556b076d5..816441dbbd 100644
--- a/sw/source/core/access/acccell.hxx
+++ b/sw/source/core/access/acccell.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -26,12 +26,12 @@
************************************************************************/
#ifndef _ACCCELL_HXX
#define _ACCCELL_HXX
-#ifndef _ACCCONTEXT_HXX
+
#include "acccontext.hxx"
-#endif
#include <com/sun/star/accessibility/XAccessibleValue.hpp>
class SwCellFrm;
+class SwFrmFmt;
class SwAccessibleCell : public SwAccessibleContext,
::com::sun::star::accessibility::XAccessibleValue
diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx
index 94db31770b..878ddecaf6 100644
--- a/sw/source/core/access/acccontext.cxx
+++ b/sw/source/core/access/acccontext.cxx
@@ -38,8 +38,8 @@
#endif // #if (OSL_DEBUG_LEVEL > 1) && defined TEST_MIB
#include <tools/debug.hxx>
#include <vcl/window.hxx>
-#include "errhdl.hxx"
-#include "swtypes.hxx"
+#include <errhdl.hxx>
+#include <swtypes.hxx>
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <com/sun/star/accessibility/XAccessibleStateSet.hpp>
@@ -51,18 +51,22 @@
#include <unotools/accessiblerelationsethelper.hxx>
#include <viewsh.hxx>
#include <crsrsh.hxx>
-#include "fesh.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>
-#ifndef _ACCCONTEXT_HXX
#include <acccontext.hxx>
-#endif
#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 ) \
@@ -91,10 +95,10 @@ using ::rtl::OUString;
void SwAccessibleContext::InitStates()
{
- bIsShowingState = IsShowing();
+ bIsShowingState = GetMap() ? IsShowing( *(GetMap()) ) : sal_False;
ViewShell *pVSh = GetMap()->GetShell();
- bIsEditableState = pVSh && IsEditable( pVSh );
+ bIsEditableState = pVSh && IsEditable( pVSh );
bIsOpaqueState = pVSh && IsOpaque( pVSh );
bIsDefuncState = sal_False;
}
@@ -165,21 +169,17 @@ enum Action { NONE, SCROLLED, SCROLLED_WITHIN,
SCROLLED_IN, SCROLLED_OUT };
void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm,
- const SwRect& rOldVisArea )
+ const SwRect& rOldVisArea )
{
const SwRect& rNewVisArea = GetVisArea();
- SwFrmOrObj aFrm( pFrm );
- sal_Bool bVisibleOnly = aFrm.IsVisibleChildrenOnly();
-
- uno::Reference < XAccessible > xAcc;
+ const bool bVisibleChildrenOnly = SwAccessibleChild( pFrm ).IsVisibleChildrenOnly();
- const SwFrmOrObjSList aList( pFrm );
- SwFrmOrObjSList::const_iterator aIter( aList.begin() );
+ const SwAccessibleChildSList aList( *pFrm, *(GetMap()) );
+ SwAccessibleChildSList::const_iterator aIter( aList.begin() );
while( aIter != aList.end() )
{
- const SwFrmOrObj& rLower = *aIter;
- const SwFrm *pLower = rLower.GetSwFrm();
- SwRect aBox( rLower.GetBox() );
+ const SwAccessibleChild& rLower = *aIter;
+ const SwRect aBox( rLower.GetBox( *(GetMap()) ) );
if( rLower.IsAccessible( GetShell()->IsPreView() ) )
{
Action eAction = NONE;
@@ -191,20 +191,31 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm,
}
else
{
- if( bVisibleOnly )
+ if ( bVisibleChildrenOnly &&
+ !rLower.AlwaysIncludeAsChild() )
+ {
eAction = SCROLLED_IN;
+ }
else
+ {
eAction = SCROLLED;
+ }
}
}
else if( aBox.IsOver( rOldVisArea ) )
{
- if( bVisibleOnly )
+ if ( bVisibleChildrenOnly &&
+ !rLower.AlwaysIncludeAsChild() )
+ {
eAction = SCROLLED_OUT;
+ }
else
+ {
eAction = SCROLLED;
+ }
}
- else if( !bVisibleOnly )
+ else if( !bVisibleChildrenOnly ||
+ rLower.AlwaysIncludeAsChild() )
{
// This wouldn't be required if the SwAccessibleFrame,
// wouldn't know about the vis area.
@@ -212,8 +223,11 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm,
}
if( NONE != eAction )
{
- if( pLower )
+ 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 );
@@ -242,10 +256,12 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm,
ChildrenScrolled( pLower, rOldVisArea );
}
}
- else
+ else if ( rLower.GetDrawObject() )
{
+ ASSERT( !rLower.AlwaysIncludeAsChild(),
+ "<SwAccessibleContext::ChildrenScrolled(..)> - always included child not considered!" );
::vos::ORef< ::accessibility::AccessibleShape > xAccImpl =
- GetMap()->GetContextImpl( rLower.GetSdrObject(),
+ GetMap()->GetContextImpl( rLower.GetDrawObject(),
this,
SCROLLED_OUT == eAction ||
SCROLLED_IN == eAction );
@@ -260,7 +276,7 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm,
GetMap() );
break;
case SCROLLED_IN:
- ScrolledInShape( rLower.GetSdrObject(),
+ ScrolledInShape( rLower.GetDrawObject(),
xAccImpl.getBodyPtr() );
break;
case SCROLLED_OUT:
@@ -268,7 +284,7 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm,
xAccImpl->ViewForwarderChanged(
::accessibility::IAccessibleViewForwarderListener::VISIBLE_AREA,
GetMap() );
- DisposeShape( rLower.GetSdrObject(),
+ DisposeShape( rLower.GetDrawObject(),
xAccImpl.getBodyPtr() );
}
break;
@@ -277,14 +293,21 @@ void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm,
}
}
}
+ 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( pLower && (!bVisibleOnly ||
- aBox.IsOver( rOldVisArea ) ||
- aBox.IsOver( rNewVisArea )) )
+ else if ( rLower.GetSwFrm() &&
+ ( !bVisibleChildrenOnly ||
+ aBox.IsOver( rOldVisArea ) ||
+ aBox.IsOver( rNewVisArea ) ) )
{
// There are no unaccessible SdrObjects that need to be notified
- ChildrenScrolled( pLower, rOldVisArea );
+ ChildrenScrolled( rLower.GetSwFrm(), rOldVisArea );
}
++aIter;
}
@@ -297,7 +320,7 @@ void SwAccessibleContext::Scrolled( const SwRect& rOldVisArea )
ChildrenScrolled( GetFrm(), rOldVisArea );
sal_Bool bIsOldShowingState;
- sal_Bool bIsNewShowingState = IsShowing();
+ sal_Bool bIsNewShowingState = IsShowing( *(GetMap()) );
{
vos::OGuard aGuard( aMutex );
bIsOldShowingState = bIsShowingState;
@@ -327,7 +350,7 @@ void SwAccessibleContext::ScrolledIn()
"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();
+ const SwFrm* pParent = GetParent();
::vos::ORef< SwAccessibleContext > xParentImpl(
GetMap()->GetContextImpl( pParent, sal_False ) );
uno::Reference < XAccessibleContext > xThis( this );
@@ -379,13 +402,13 @@ void SwAccessibleContext::ScrolledOut( const SwRect& rOldVisArea )
void SwAccessibleContext::InvalidateChildrenStates( const SwFrm* _pFrm,
tAccessibleStates _nStates )
{
- const SwFrmOrObjSList aVisList( GetVisArea(), _pFrm );
+ const SwAccessibleChildSList aVisList( GetVisArea(), *_pFrm, *(GetMap()) );
- SwFrmOrObjSList::const_iterator aIter( aVisList.begin() );
+ SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
while( aIter != aVisList.end() )
{
- const SwFrmOrObj& rLower = *aIter;
- const SwFrm *pLower = rLower.GetSwFrm();
+ const SwAccessibleChild& rLower = *aIter;
+ const SwFrm* pLower = rLower.GetSwFrm();
if( pLower )
{
::vos::ORef< SwAccessibleContext > xAccImpl;
@@ -396,10 +419,15 @@ void SwAccessibleContext::InvalidateChildrenStates( const SwFrm* _pFrm,
else
InvalidateChildrenStates( pLower, _nStates );
}
- else
+ else if ( rLower.GetDrawObject() )
{
// TODO: SdrObjects
}
+ else if ( rLower.GetWindow() )
+ {
+ // nothing to do ?
+ }
+
++aIter;
}
}
@@ -408,12 +436,12 @@ void SwAccessibleContext::InvalidateChildrenStates( const SwFrm* _pFrm,
void SwAccessibleContext::DisposeChildren( const SwFrm *pFrm,
sal_Bool bRecursive )
{
- const SwFrmOrObjSList aVisList( GetVisArea(), pFrm );
- SwFrmOrObjSList::const_iterator aIter( aVisList.begin() );
+ const SwAccessibleChildSList aVisList( GetVisArea(), *pFrm, *(GetMap()) );
+ SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
while( aIter != aVisList.end() )
{
- const SwFrmOrObj& rLower = *aIter;
- const SwFrm *pLower = rLower.GetSwFrm();
+ const SwAccessibleChild& rLower = *aIter;
+ const SwFrm* pLower = rLower.GetSwFrm();
if( pLower )
{
::vos::ORef< SwAccessibleContext > xAccImpl;
@@ -424,13 +452,17 @@ void SwAccessibleContext::DisposeChildren( const SwFrm *pFrm,
else if( bRecursive )
DisposeChildren( pLower, bRecursive );
}
- else
+ else if ( rLower.GetDrawObject() )
{
::vos::ORef< ::accessibility::AccessibleShape > xAccImpl(
- GetMap()->GetContextImpl( rLower.GetSdrObject(),
+ GetMap()->GetContextImpl( rLower.GetDrawObject(),
this, sal_False ) );
if( xAccImpl.isValid() )
- DisposeShape( rLower.GetSdrObject(), xAccImpl.getBodyPtr() );
+ DisposeShape( rLower.GetDrawObject(), xAccImpl.getBodyPtr() );
+ }
+ else if ( rLower.GetWindow() )
+ {
+ DisposeChild( rLower, sal_False );
}
++aIter;
}
@@ -528,16 +560,14 @@ sal_Bool SwAccessibleContext::IsEditableState()
SwAccessibleContext::SwAccessibleContext( SwAccessibleMap *pM,
sal_Int16 nR,
- const SwFrm *pF ) :
- SwAccessibleFrame( pM->GetVisArea().SVRect(), pF,
- pM->GetShell()->IsPreView() ),
- pMap( pM ),
- nClientId(0),
- nRole( nR ),
- bDisposing( sal_False ),
- // --> OD 2008-03-10 #i85634#
- bRegisteredAtAccessibleMap( true )
- // <--
+ 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" )
@@ -548,11 +578,7 @@ SwAccessibleContext::~SwAccessibleContext()
vos::OGuard aGuard(Application::GetSolarMutex());
DBG_MSG_CD( "destructed" )
- // --> OD 2008-03-10 #i85634#
-// if( GetFrm() && GetMap() )
-// GetMap()->RemoveContext( GetFrm() );
RemoveFrmFromAccessibleMap();
- // <--
}
uno::Reference< XAccessibleContext > SAL_CALL
@@ -570,7 +596,7 @@ sal_Int32 SAL_CALL SwAccessibleContext::getAccessibleChildCount( void )
CHECK_FOR_DEFUNC( XAccessibleContext )
- return bDisposing ? 0 : GetChildCount();
+ return bDisposing ? 0 : GetChildCount( *(GetMap()) );
}
uno::Reference< XAccessible> SAL_CALL
@@ -581,7 +607,7 @@ uno::Reference< XAccessible> SAL_CALL
CHECK_FOR_DEFUNC( XAccessibleContext )
- const SwFrmOrObj aChild( GetChild( nIndex ) );
+ const SwAccessibleChild aChild( GetChild( *(GetMap()), nIndex ) );
if( !aChild.IsValid() )
{
uno::Reference < XAccessibleContext > xThis( this );
@@ -602,14 +628,18 @@ uno::Reference< XAccessible> SAL_CALL
xChild = xChildImpl.getBodyPtr();
}
}
- else
+ else if ( aChild.GetDrawObject() )
{
::vos::ORef < ::accessibility::AccessibleShape > xChildImpl(
- GetMap()->GetContextImpl( aChild.GetSdrObject(),
+ GetMap()->GetContextImpl( aChild.GetDrawObject(),
this, !bDisposing ) );
if( xChildImpl.isValid() )
xChild = xChildImpl.getBodyPtr();
}
+ else if ( aChild.GetWindow() )
+ {
+ xChild = aChild.GetWindow()->GetAccessible();
+ }
return xChild;
}
@@ -656,7 +686,7 @@ sal_Int32 SAL_CALL SwAccessibleContext::getAccessibleIndexInParent (void)
GetMap()->GetContextImpl( pUpper, !bDisposing ) );
ASSERT( xAccImpl.isValid() || bDisposing, "no parent found" );
if( xAccImpl.isValid() )
- nIndex = xAccImpl->GetChildIndex( GetFrm() );
+ nIndex = xAccImpl->GetChildIndex( *(GetMap()), SwAccessibleChild(GetFrm()) );
}
return nIndex;
@@ -792,20 +822,24 @@ uno::Reference< XAccessible > SAL_CALL SwAccessibleContext::getAccessibleAtPoint
Point aPixPoint( aPoint.X, aPoint.Y ); // px rel to parent
if( !GetFrm()->IsRootFrm() )
{
- SwRect aLogBounds( GetBounds( GetFrm() ) ); // twip rel to doc root
+ 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 SwFrmOrObj aChild( GetChildAtPixel( aPixPoint, GetMap() ) );
+ const SwAccessibleChild aChild( GetChildAtPixel( aPixPoint, *(GetMap()) ) );
if( aChild.GetSwFrm() )
{
xAcc = GetMap()->GetContext( aChild.GetSwFrm() );
}
- else if( aChild.GetSdrObject() )
+ else if( aChild.GetDrawObject() )
{
- xAcc = GetMap()->GetContext( aChild.GetSdrObject(), this );
+ xAcc = GetMap()->GetContext( aChild.GetDrawObject(), this );
+ }
+ else if ( aChild.GetWindow() )
+ {
+ xAcc = aChild.GetWindow()->GetAccessible();
}
return xAcc;
@@ -843,7 +877,7 @@ awt::Rectangle SAL_CALL SwAccessibleContext::getBoundsImpl(sal_Bool bRelative)
CHECK_FOR_WINDOW( XAccessibleComponent, pWin && pParent )
- SwRect aLogBounds( GetBounds( GetFrm() ) ); // twip rel to doc root
+ 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() )
@@ -862,7 +896,7 @@ awt::Rectangle SAL_CALL SwAccessibleContext::getBoundsImpl(sal_Bool bRelative)
aPixBounds = GetMap()->CoreToPixel( aLogBounds.SVRect() );
if( !pParent->IsRootFrm() && bRelative)
{
- SwRect aParentLogBounds( GetBounds( pParent ) ); // twip rel to doc root
+ SwRect aParentLogBounds( GetBounds( *(GetMap()), pParent ) ); // twip rel to doc root
Point aParentPixPos( GetMap()->CoreToPixel( aParentLogBounds.SVRect() ).TopLeft() );
aPixBounds.Move( -aParentPixPos.X(), -aParentPixPos.Y() );
}
@@ -1087,24 +1121,21 @@ void SwAccessibleContext::Dispose( sal_Bool bRecursive )
DBG_MSG_CD( "dispose" )
}
- // --> OD 2008-03-10 #i85634#
-// if( GetFrm() && GetMap() )
-// GetMap()->RemoveContext( GetFrm() );
RemoveFrmFromAccessibleMap();
- // <--
ClearFrm();
pMap = 0;
bDisposing = sal_False;
}
-void SwAccessibleContext::DisposeChild( const SwFrmOrObj& rChildFrmOrObj,
+void SwAccessibleContext::DisposeChild( const SwAccessibleChild& rChildFrmOrObj,
sal_Bool bRecursive )
{
vos::OGuard aGuard(Application::GetSolarMutex());
- SwFrmOrObj aFrmOrObj( GetFrm() );
- if( IsShowing( rChildFrmOrObj ) || !aFrmOrObj.IsVisibleChildrenOnly() )
+ 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
@@ -1116,14 +1147,23 @@ void SwAccessibleContext::DisposeChild( const SwFrmOrObj& rChildFrmOrObj,
sal_True );
xAccImpl->Dispose( bRecursive );
}
- else
+ else if ( rChildFrmOrObj.GetDrawObject() )
{
::vos::ORef< ::accessibility::AccessibleShape > xAccImpl =
- GetMap()->GetContextImpl( rChildFrmOrObj.GetSdrObject(),
+ GetMap()->GetContextImpl( rChildFrmOrObj.GetDrawObject(),
this, sal_True );
- DisposeShape( rChildFrmOrObj.GetSdrObject(),
+ 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 );
@@ -1136,7 +1176,7 @@ void SwAccessibleContext::InvalidatePosOrSize( const SwRect& )
ASSERT( GetFrm() && !GetFrm()->Frm().IsEmpty(), "context should have a size" );
sal_Bool bIsOldShowingState;
- sal_Bool bIsNewShowingState = IsShowing();
+ sal_Bool bIsNewShowingState = IsShowing( *(GetMap()) );
{
vos::OGuard aShowingStateGuard( aMutex );
bIsOldShowingState = bIsShowingState;
@@ -1154,8 +1194,8 @@ void SwAccessibleContext::InvalidatePosOrSize( const SwRect& )
FireVisibleDataEvent();
}
- SwFrmOrObj aParent( GetParent() );
- if( !bIsNewShowingState && aParent.IsVisibleChildrenOnly() )
+ if( !bIsNewShowingState &&
+ SwAccessibleChild( GetParent() ).IsVisibleChildrenOnly() )
{
// The frame is now invisible -> dispose it
Dispose( sal_True );
@@ -1167,7 +1207,7 @@ void SwAccessibleContext::InvalidatePosOrSize( const SwRect& )
}
void SwAccessibleContext::InvalidateChildPosOrSize(
- const SwFrmOrObj& rChildFrmOrObj,
+ const SwAccessibleChild& rChildFrmOrObj,
const SwRect& rOldFrm )
{
vos::OGuard aGuard(Application::GetSolarMutex());
@@ -1176,15 +1216,21 @@ void SwAccessibleContext::InvalidateChildPosOrSize(
!rChildFrmOrObj.GetSwFrm()->Frm().IsEmpty(),
"child context should have a size" );
- SwFrmOrObj aFrm( GetFrm() );
- sal_Bool bNew = rOldFrm.IsEmpty() ||
- (rOldFrm.Left() == 0 && rOldFrm.Top() == 0);
- if( IsShowing( rChildFrmOrObj ) )
+ if ( 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 || (aFrm.IsVisibleChildrenOnly() && !IsShowing( rOldFrm )) )
+ if( bNew || (bVisibleChildrenOnly && !IsShowing( rOldFrm )) )
{
if( rChildFrmOrObj.GetSwFrm() )
{
@@ -1194,15 +1240,15 @@ void SwAccessibleContext::InvalidateChildPosOrSize(
sal_True );
xAccImpl->ScrolledIn();
}
- else
+ else if ( rChildFrmOrObj.GetDrawObject() )
{
::vos::ORef< ::accessibility::AccessibleShape > xAccImpl =
- GetMap()->GetContextImpl( rChildFrmOrObj.GetSdrObject(),
+ GetMap()->GetContextImpl( rChildFrmOrObj.GetDrawObject(),
this, sal_True );
// --> OD 2004-11-29 #i37790#
if ( xAccImpl.isValid() )
{
- ScrolledInShape( rChildFrmOrObj.GetSdrObject(),
+ ScrolledInShape( rChildFrmOrObj.GetDrawObject(),
xAccImpl.getBodyPtr() );
}
else
@@ -1212,6 +1258,13 @@ void SwAccessibleContext::InvalidateChildPosOrSize(
}
// <--
}
+ else if ( rChildFrmOrObj.GetWindow() )
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::CHILD;
+ aEvent.NewValue <<= (rChildFrmOrObj.GetWindow()->GetAccessible());
+ FireAccessibleEvent( aEvent );
+ }
}
}
else
@@ -1220,7 +1273,7 @@ void SwAccessibleContext::InvalidateChildPosOrSize(
// needs to be send. However, there is no wrapper existing, and so
// no notifications for grandchildren are required. If the are
// grandgrandchildren, they would be notified by the layout.
- if( aFrm.IsVisibleChildrenOnly() &&
+ if( bVisibleChildrenOnly &&
!bNew && IsShowing( rOldFrm ) )
{
if( rChildFrmOrObj.GetSwFrm() )
@@ -1231,14 +1284,19 @@ void SwAccessibleContext::InvalidateChildPosOrSize(
xAccImpl->SetParent( this );
xAccImpl->Dispose( sal_True );
}
- else
+ else if ( rChildFrmOrObj.GetDrawObject() )
{
::vos::ORef< ::accessibility::AccessibleShape > xAccImpl =
- GetMap()->GetContextImpl( rChildFrmOrObj.GetSdrObject(),
+ GetMap()->GetContextImpl( rChildFrmOrObj.GetDrawObject(),
this, sal_True );
- DisposeShape( rChildFrmOrObj.GetSdrObject(),
+ DisposeShape( rChildFrmOrObj.GetDrawObject(),
xAccImpl.getBodyPtr() );
}
+ else if ( rChildFrmOrObj.GetWindow() )
+ {
+ ASSERT( false,
+ "<SwAccessibleContext::InvalidateChildPosOrSize(..)> - not expected to handle dispose of child of type <Window>." );
+ }
}
}
}
@@ -1422,13 +1480,67 @@ OUString SwAccessibleContext::GetResource( sal_uInt16 nResId,
return OUString( sStr );
}
-// --> OD 2008-03-10 #i85634#
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,
diff --git a/sw/source/core/access/acccontext.hxx b/sw/source/core/access/acccontext.hxx
index b9b0dcf0bd..090f0d1ab6 100644
--- a/sw/source/core/access/acccontext.hxx
+++ b/sw/source/core/access/acccontext.hxx
@@ -40,8 +40,14 @@ class SwAccessibleMap;
class SwCrsrShell;
class SdrObject;
class SwPaM;
-namespace utl { class AccessibleStateSetHelper; }
-namespace accessibility { class AccessibleShape; }
+namespace utl {
+ class AccessibleStateSetHelper;
+}
+namespace accessibility {
+ class AccessibleShape;
+}
+class SwFmtFld;
+class SwAccessibleChildContainer;
const sal_Char sAccessibleServiceName[] = "com.sun.star.accessibility.Accessible";
@@ -339,13 +345,13 @@ public:
virtual void Dispose( sal_Bool bRecursive = sal_False );
// The child object is not visible an longer and should be destroyed
- virtual void DisposeChild( const SwFrmOrObj& rFrmOrObj, sal_Bool bRecursive );
+ 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 SwFrmOrObj& rFrmOrObj,
+ virtual void InvalidateChildPosOrSize( const sw::access::SwAccessibleChild& rFrmOrObj,
const SwRect& rFrm );
// The content may have changed (but it hasn't tohave changed)
@@ -381,6 +387,25 @@ public:
*/
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
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index 6455cd6f96..eb316eedbf 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -155,8 +155,10 @@ uno::Reference< XAccessible> SAL_CALL
if( mpChildWin )
{
CHECK_FOR_DEFUNC( XAccessibleContext )
- if( nIndex == GetChildCount() )
+ if ( nIndex == GetChildCount( *(GetMap()) ) )
+ {
return mpChildWin->GetAccessible();
+ }
}
return SwAccessibleContext::getAccessibleChild( nIndex );
@@ -186,7 +188,7 @@ sal_Int32 SAL_CALL SwAccessibleDocumentBase::getAccessibleIndexInParent (void)
return -1L;
}
-OUString SAL_CALL SwAccessibleDocumentBase::getAccessibleDescription (void)
+OUString SAL_CALL SwAccessibleDocumentBase::getAccessibleDescription (void)
throw (uno::RuntimeException)
{
return GetResource( STR_ACCESS_DOC_DESC );
diff --git a/sw/source/core/access/accfootnote.hxx b/sw/source/core/access/accfootnote.hxx
index 26789409b6..bd6ebc1df9 100644
--- a/sw/source/core/access/accfootnote.hxx
+++ b/sw/source/core/access/accfootnote.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -26,9 +26,13 @@
************************************************************************/
#ifndef _ACCFOOTNOTE_HXX
#define _ACCFOOTNOTE_HXX
-#ifndef _ACCCONTEXT_HXX
-#include "acccontext.hxx"
-#endif
+
+#include <sal/types.h>
+
+#include <acccontext.hxx>
+
+class SwAccessibleMap;
+class SwFtnFrm;
class SwAccessibleFootnote : public SwAccessibleContext
{
diff --git a/sw/source/core/access/accframe.cxx b/sw/source/core/access/accframe.cxx
index e28032a047..043e40bb94 100644
--- a/sw/source/core/access/accframe.cxx
+++ b/sw/source/core/access/accframe.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -52,22 +52,24 @@
#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.
-sal_Int32 SwAccessibleFrame::GetChildCount( const SwRect& rVisArea,
- const SwFrm *pFrm,
- sal_Bool bInPagePreview )
+/* static */ sal_Int32 SwAccessibleFrame::GetChildCount( SwAccessibleMap& rAccMap,
+ const SwRect& rVisArea,
+ const SwFrm *pFrm,
+ sal_Bool bInPagePreview )
{
sal_Int32 nCount = 0;
- const SwFrmOrObjSList aVisList( rVisArea, pFrm );
- SwFrmOrObjSList::const_iterator aIter( aVisList.begin() );
+ const SwAccessibleChildSList aVisList( rVisArea, *pFrm, rAccMap );
+ SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
while( aIter != aVisList.end() )
{
- const SwFrmOrObj& rLower = *aIter;
+ const SwAccessibleChild& rLower = *aIter;
if( rLower.IsAccessible( bInPagePreview ) )
{
nCount++;
@@ -75,7 +77,8 @@ sal_Int32 SwAccessibleFrame::GetChildCount( const SwRect& rVisArea,
else if( rLower.GetSwFrm() )
{
// There are no unaccessible SdrObjects that count
- nCount += GetChildCount( rVisArea, rLower.GetSwFrm(),
+ nCount += GetChildCount( rAccMap,
+ rVisArea, rLower.GetSwFrm(),
bInPagePreview );
}
++aIter;
@@ -84,23 +87,25 @@ sal_Int32 SwAccessibleFrame::GetChildCount( const SwRect& rVisArea,
return nCount;
}
-SwFrmOrObj SwAccessibleFrame::GetChild( const SwRect& rVisArea,
- const SwFrm *pFrm,
- sal_Int32& rPos,
- sal_Bool bInPagePreview )
+/* static */ SwAccessibleChild SwAccessibleFrame::GetChild(
+ SwAccessibleMap& rAccMap,
+ const SwRect& rVisArea,
+ const SwFrm& rFrm,
+ sal_Int32& rPos,
+ sal_Bool bInPagePreview )
{
- SwFrmOrObj aRet;
+ SwAccessibleChild aRet;
if( rPos >= 0 )
{
- if( SwFrmOrObjMap::IsSortingRequired( pFrm ) )
+ if( SwAccessibleChildMap::IsSortingRequired( rFrm ) )
{
// We need a sorted list here
- const SwFrmOrObjMap aVisMap( rVisArea, pFrm );
- SwFrmOrObjMap::const_iterator aIter( aVisMap.begin() );
+ const SwAccessibleChildMap aVisMap( rVisArea, rFrm, rAccMap );
+ SwAccessibleChildMap::const_iterator aIter( aVisMap.begin() );
while( aIter != aVisMap.end() && !aRet.IsValid() )
{
- const SwFrmOrObj& rLower = (*aIter).second;
+ const SwAccessibleChild& rLower = (*aIter).second;
if( rLower.IsAccessible( bInPagePreview ) )
{
if( 0 == rPos )
@@ -111,7 +116,8 @@ SwFrmOrObj SwAccessibleFrame::GetChild( const SwRect& rVisArea,
else if( rLower.GetSwFrm() )
{
// There are no unaccessible SdrObjects that count
- aRet = GetChild( rVisArea, rLower.GetSwFrm(), rPos,
+ aRet = GetChild( rAccMap,
+ rVisArea, *(rLower.GetSwFrm()), rPos,
bInPagePreview );
}
++aIter;
@@ -121,11 +127,11 @@ SwFrmOrObj SwAccessibleFrame::GetChild( const SwRect& rVisArea,
{
// The unsorted list is sorted enough, because it return lower
// frames in the correct order.
- const SwFrmOrObjSList aVisList( rVisArea, pFrm );
- SwFrmOrObjSList::const_iterator aIter( aVisList.begin() );
+ const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap );
+ SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
while( aIter != aVisList.end() && !aRet.IsValid() )
{
- const SwFrmOrObj& rLower = *aIter;
+ const SwAccessibleChild& rLower = *aIter;
if( rLower.IsAccessible( bInPagePreview ) )
{
if( 0 == rPos )
@@ -136,7 +142,8 @@ SwFrmOrObj SwAccessibleFrame::GetChild( const SwRect& rVisArea,
else if( rLower.GetSwFrm() )
{
// There are no unaccessible SdrObjects that count
- aRet = GetChild( rVisArea, rLower.GetSwFrm(), rPos,
+ aRet = GetChild( rAccMap,
+ rVisArea, *(rLower.GetSwFrm()), rPos,
bInPagePreview );
}
++aIter;
@@ -147,22 +154,24 @@ SwFrmOrObj SwAccessibleFrame::GetChild( const SwRect& rVisArea,
return aRet;
}
-sal_Bool SwAccessibleFrame::GetChildIndex( const SwRect& rVisArea,
- const SwFrm *pFrm,
- const SwFrmOrObj& rChild,
- sal_Int32& rPos,
- sal_Bool bInPagePreview )
+/* 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( SwFrmOrObjMap::IsSortingRequired( pFrm ) )
+ if( SwAccessibleChildMap::IsSortingRequired( rFrm ) )
{
// We need a sorted list here
- const SwFrmOrObjMap aVisMap( rVisArea, pFrm );
- SwFrmOrObjMap::const_iterator aIter( aVisMap.begin() );
+ const SwAccessibleChildMap aVisMap( rVisArea, rFrm, rAccMap );
+ SwAccessibleChildMap::const_iterator aIter( aVisMap.begin() );
while( aIter != aVisMap.end() && !bFound )
{
- const SwFrmOrObj& rLower = (*aIter).second;
+ const SwAccessibleChild& rLower = (*aIter).second;
if( rLower.IsAccessible( bInPagePreview ) )
{
if( rChild == rLower )
@@ -173,7 +182,8 @@ sal_Bool SwAccessibleFrame::GetChildIndex( const SwRect& rVisArea,
else if( rLower.GetSwFrm() )
{
// There are no unaccessible SdrObjects that count
- bFound = GetChildIndex( rVisArea, rLower.GetSwFrm(), rChild,
+ bFound = GetChildIndex( rAccMap,
+ rVisArea, *(rLower.GetSwFrm()), rChild,
rPos, bInPagePreview );
}
++aIter;
@@ -183,11 +193,11 @@ sal_Bool SwAccessibleFrame::GetChildIndex( const SwRect& rVisArea,
{
// The unsorted list is sorted enough, because it return lower
// frames in the correct order.
- const SwFrmOrObjSList aVisList( rVisArea, pFrm );
- SwFrmOrObjSList::const_iterator aIter( aVisList.begin() );
+ const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap );
+ SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
while( aIter != aVisList.end() && !bFound )
{
- const SwFrmOrObj& rLower = *aIter;
+ const SwAccessibleChild& rLower = *aIter;
if( rLower.IsAccessible( bInPagePreview ) )
{
if( rChild == rLower )
@@ -198,7 +208,8 @@ sal_Bool SwAccessibleFrame::GetChildIndex( const SwRect& rVisArea,
else if( rLower.GetSwFrm() )
{
// There are no unaccessible SdrObjects that count
- bFound = GetChildIndex( rVisArea, rLower.GetSwFrm(), rChild,
+ bFound = GetChildIndex( rAccMap,
+ rVisArea, *(rLower.GetSwFrm()), rChild,
rPos, bInPagePreview );
}
++aIter;
@@ -208,31 +219,31 @@ sal_Bool SwAccessibleFrame::GetChildIndex( const SwRect& rVisArea,
return bFound;
}
-SwFrmOrObj SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea,
- const SwFrm *pFrm,
+SwAccessibleChild SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea,
+ const SwFrm& rFrm,
const Point& rPixPos,
sal_Bool bInPagePreview,
- const SwAccessibleMap *pMap )
+ SwAccessibleMap& rAccMap )
{
- SwFrmOrObj aRet;
+ SwAccessibleChild aRet;
- if( SwFrmOrObjMap::IsSortingRequired( pFrm ) )
+ if( SwAccessibleChildMap::IsSortingRequired( rFrm ) )
{
// We need a sorted list here, and we have to reverse iterate,
// because objects in front should be returned.
- const SwFrmOrObjMap aVisMap( rVisArea, pFrm );
- SwFrmOrObjMap::const_reverse_iterator aRIter( aVisMap.rbegin() );
+ const SwAccessibleChildMap aVisMap( rVisArea, rFrm, rAccMap );
+ SwAccessibleChildMap::const_reverse_iterator aRIter( aVisMap.rbegin() );
while( aRIter != aVisMap.rend() && !aRet.IsValid() )
{
- const SwFrmOrObj& rLower = (*aRIter).second;
+ 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( ) );
+ SwRect aLogBounds( rLower.GetBounds( rAccMap ) );
if( !aLogBounds.IsEmpty() )
{
- Rectangle aPixBounds( pMap->CoreToPixel( aLogBounds.SVRect() ) );
+ Rectangle aPixBounds( rAccMap.CoreToPixel( aLogBounds.SVRect() ) );
if( aPixBounds.IsInside( rPixPos ) )
aRet = rLower;
}
@@ -240,8 +251,8 @@ SwFrmOrObj SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea,
else if( rLower.GetSwFrm() )
{
// There are no unaccessible SdrObjects that count
- aRet = GetChildAtPixel( rVisArea, rLower.GetSwFrm(), rPixPos,
- bInPagePreview, pMap );
+ aRet = GetChildAtPixel( rVisArea, *(rLower.GetSwFrm()), rPixPos,
+ bInPagePreview, rAccMap );
}
aRIter++;
}
@@ -251,19 +262,19 @@ SwFrmOrObj SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea,
// The unsorted list is sorted enough, because it returns lower
// frames in the correct order. Morover, we can iterate forward,
// because the lowers don't overlap!
- const SwFrmOrObjSList aVisList( rVisArea, pFrm );
- SwFrmOrObjSList::const_iterator aIter( aVisList.begin() );
+ const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap );
+ SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
while( aIter != aVisList.end() && !aRet.IsValid() )
{
- const SwFrmOrObj& rLower = *aIter;
+ 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( ) );
+ SwRect aLogBounds( rLower.GetBounds( rAccMap ) );
if( !aLogBounds.IsEmpty() )
{
- Rectangle aPixBounds( pMap->CoreToPixel( aLogBounds.SVRect() ) );
+ Rectangle aPixBounds( rAccMap.CoreToPixel( aLogBounds.SVRect() ) );
if( aPixBounds.IsInside( rPixPos ) )
aRet = rLower;
}
@@ -271,8 +282,8 @@ SwFrmOrObj SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea,
else if( rLower.GetSwFrm() )
{
// There are no unaccessible SdrObjects that count
- aRet = GetChildAtPixel( rVisArea, rLower.GetSwFrm(), rPixPos,
- bInPagePreview, pMap );
+ aRet = GetChildAtPixel( rVisArea, *(rLower.GetSwFrm()), rPixPos,
+ bInPagePreview, rAccMap );
}
++aIter;
}
@@ -281,18 +292,20 @@ SwFrmOrObj SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea,
return aRet;
}
-void SwAccessibleFrame::GetChildren( const SwRect& rVisArea, const SwFrm *pFrm,
- ::std::list< SwFrmOrObj >& rChildren,
- sal_Bool bInPagePreview )
+/* static */ void SwAccessibleFrame::GetChildren( SwAccessibleMap& rAccMap,
+ const SwRect& rVisArea,
+ const SwFrm& rFrm,
+ ::std::list< SwAccessibleChild >& rChildren,
+ sal_Bool bInPagePreview )
{
- if( SwFrmOrObjMap::IsSortingRequired( pFrm ) )
+ if( SwAccessibleChildMap::IsSortingRequired( rFrm ) )
{
// We need a sorted list here
- const SwFrmOrObjMap aVisMap( rVisArea, pFrm );
- SwFrmOrObjMap::const_iterator aIter( aVisMap.begin() );
+ const SwAccessibleChildMap aVisMap( rVisArea, rFrm, rAccMap );
+ SwAccessibleChildMap::const_iterator aIter( aVisMap.begin() );
while( aIter != aVisMap.end() )
{
- const SwFrmOrObj& rLower = (*aIter).second;
+ const SwAccessibleChild& rLower = (*aIter).second;
if( rLower.IsAccessible( bInPagePreview ) )
{
rChildren.push_back( rLower );
@@ -300,8 +313,8 @@ void SwAccessibleFrame::GetChildren( const SwRect& rVisArea, const SwFrm *pFrm,
else if( rLower.GetSwFrm() )
{
// There are no unaccessible SdrObjects that count
- GetChildren( rVisArea, rLower.GetSwFrm(), rChildren,
- bInPagePreview );
+ GetChildren( rAccMap, rVisArea, *(rLower.GetSwFrm()),
+ rChildren, bInPagePreview );
}
++aIter;
}
@@ -310,11 +323,11 @@ void SwAccessibleFrame::GetChildren( const SwRect& rVisArea, const SwFrm *pFrm,
{
// The unsorted list is sorted enough, because it return lower
// frames in the correct order.
- const SwFrmOrObjSList aVisList( rVisArea, pFrm );
- SwFrmOrObjSList::const_iterator aIter( aVisList.begin() );
+ const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap );
+ SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
while( aIter != aVisList.end() )
{
- const SwFrmOrObj& rLower = *aIter;
+ const SwAccessibleChild& rLower = *aIter;
if( rLower.IsAccessible( bInPagePreview ) )
{
rChildren.push_back( rLower );
@@ -322,21 +335,22 @@ void SwAccessibleFrame::GetChildren( const SwRect& rVisArea, const SwFrm *pFrm,
else if( rLower.GetSwFrm() )
{
// There are no unaccessible SdrObjects that count
- GetChildren( rVisArea, rLower.GetSwFrm(), rChildren,
- bInPagePreview );
+ GetChildren( rAccMap, rVisArea, *(rLower.GetSwFrm()),
+ rChildren, bInPagePreview );
}
++aIter;
}
}
}
-SwRect SwAccessibleFrame::GetBounds( const SwFrm *pFrm )
+SwRect SwAccessibleFrame::GetBounds( const SwAccessibleMap& rAccMap,
+ const SwFrm *pFrm )
{
if( !pFrm )
pFrm = GetFrm();
- SwFrmOrObj aFrm( pFrm );
- SwRect aBounds( aFrm.GetBounds().Intersection( maVisArea ) );
+ SwAccessibleChild aFrm( pFrm );
+ SwRect aBounds( aFrm.GetBounds( rAccMap ).Intersection( maVisArea ) );
return aBounds;
}
@@ -359,7 +373,7 @@ sal_Bool SwAccessibleFrame::IsEditable( ViewShell *pVSh ) const
sal_Bool SwAccessibleFrame::IsOpaque( ViewShell *pVSh ) const
{
- SwFrmOrObj aFrm( GetFrm() );
+ SwAccessibleChild aFrm( GetFrm() );
if( !aFrm.GetSwFrm() )
return sal_False;
@@ -423,71 +437,10 @@ SwAccessibleFrame::~SwAccessibleFrame()
{
}
-const SwFrm *SwAccessibleFrame::GetParent( const SwFrmOrObj& rFrmOrObj,
- sal_Bool bInPagePreview )
+/* static */ const SwFrm* SwAccessibleFrame::GetParent( const SwAccessibleChild& rFrmOrObj,
+ sal_Bool bInPagePreview )
{
- SwFrmOrObj aParent;
- const SwFrm *pFrm = rFrmOrObj.GetSwFrm();
- if( pFrm )
- {
- if( pFrm->IsFlyFrm() )
- {
- const SwFlyFrm *pFly = static_cast< const SwFlyFrm *>( pFrm );
- if( pFly->IsFlyInCntFrm() )
- {
- // For FLY_AS_CHAR the parent is the anchor
- aParent = pFly->GetAnchorFrm();
- ASSERT( aParent.IsAccessible( bInPagePreview ),
- "parent is not accessible" );
- }
- else
- {
- // In any other case the parent is the root frm
- // (in page preview, the page frame)
- if( bInPagePreview )
- aParent = pFly->FindPageFrm();
- else
- aParent = pFly->FindRootFrm();
- }
- }
- else
- {
- SwFrmOrObj aUpper( pFrm->GetUpper() );
- while( aUpper.GetSwFrm() && !aUpper.IsAccessible(bInPagePreview) )
- aUpper = aUpper.GetSwFrm()->GetUpper();
- aParent = aUpper;
- }
- }
- else if( rFrmOrObj.GetSdrObject() )
- {
- const SwDrawContact *pContact =
- static_cast< const SwDrawContact* >(
- GetUserCall( rFrmOrObj.GetSdrObject() ) );
- ASSERT( pContact, "sdr contact is missing" );
- if( pContact )
- {
- const SwFrmFmt *pFrmFmt = pContact->GetFmt();
- ASSERT( pFrmFmt, "frame format is missing" );
- if (pFrmFmt && FLY_AS_CHAR == pFrmFmt->GetAnchor().GetAnchorId())
- {
- // For FLY_AS_CHAR the parent is the anchor
- aParent = pContact->GetAnchorFrm();
- ASSERT( aParent.IsAccessible( bInPagePreview ),
- "parent is not accessible" );
-
- }
- else
- {
- // In any other case the parent is the root frm
- if( bInPagePreview )
- aParent = pContact->GetAnchorFrm()->FindPageFrm();
- else
- aParent = pContact->GetAnchorFrm()->FindRootFrm();
- }
- }
- }
-
- return aParent.GetSwFrm();
+ return rFrmOrObj.GetParent( bInPagePreview );
}
String SwAccessibleFrame::GetFormattedPageNumber() const
@@ -501,3 +454,44 @@ String SwAccessibleFrame::GetFormattedPageNumber() const
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
index f1be372f4b..48da1bdbb9 100644
--- a/sw/source/core/access/accframe.hxx
+++ b/sw/source/core/access/accframe.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -27,14 +27,22 @@
#ifndef _ACCFRAME_HXX
#define _ACCFRAME_HXX
+#include <swrect.hxx>
+
#include <sal/types.h>
+#include <tools/string.hxx>
#include <list>
#include <accfrmobj.hxx>
-// Any method of this class must be called with an acquired solar mutex!
-
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
{
@@ -45,26 +53,34 @@ class SwAccessibleFrame
protected:
// --> OD 2007-06-29 #i77106#
// method needs to be called by new class <SwAccessibleTableColHeaders>
- static sal_Int32 GetChildCount( const SwRect& rVisArea,
+ static sal_Int32 GetChildCount( SwAccessibleMap& rAccMap,
+ const SwRect& rVisArea,
const SwFrm *pFrm,
sal_Bool bInPagePreview );
private:
- static SwFrmOrObj GetChild( const SwRect& rVisArea,
- const SwFrm *pFrm,
- sal_Int32& rPos,
- sal_Bool bInPagePreview);
- static sal_Bool GetChildIndex( const SwRect& rVisArea,
- const SwFrm *pFrm,
- const SwFrmOrObj& rChild,
- sal_Int32& rPos,
- sal_Bool bInPagePreview );
- static SwFrmOrObj GetChildAtPixel( const SwRect& rVisArea,
- const SwFrm *pFrm,
- const Point& rPos,
- sal_Bool bInPagePreview,
- const SwAccessibleMap *pMap );
- static void GetChildren( const SwRect& rVisArea, const SwFrm *pFrm,
- ::std::list< SwFrmOrObj >& rChildren,
+ 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:
@@ -73,9 +89,10 @@ protected:
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 SwFrmOrObj& rFrmOrObj ) const;
- inline sal_Bool IsShowing() const;
+ inline sal_Bool IsShowing( const SwAccessibleMap& rAccMap ) const;
inline sal_Bool IsInPagePreview() const
{
@@ -94,17 +111,20 @@ protected:
public:
// Return the SwFrm this context is attached to.
- const SwFrm *GetFrm() const { return mpFrm; };
+ const SwFrm* GetFrm() const { return mpFrm; };
-
- static const SwFrm *GetParent( const SwFrmOrObj& rFrmOrObj,
+ 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 SwFrm *pFrm=0 );
+ 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.
@@ -112,12 +132,13 @@ protected:
// Return the lower count or the nth lower, there the lowers have a
// not be same one as the SwFrm's lowers
- inline sal_Int32 GetChildCount() const;
- inline SwFrmOrObj GetChild( sal_Int32 nPos ) const;
- inline sal_Int32 GetChildIndex( const SwFrmOrObj& rChild ) const;
- inline SwFrmOrObj GetChildAtPixel( const Point& rPos,
- const SwAccessibleMap *pMap ) const;
- inline void GetChildren( ::std::list< SwFrmOrObj >& rChildren ) const;
+ 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 )
{
@@ -138,48 +159,17 @@ inline sal_Bool SwAccessibleFrame::IsShowing( const SwRect& rFrm ) const
return rFrm.IsOver( maVisArea );
}
-inline sal_Bool SwAccessibleFrame::IsShowing( const SwFrmOrObj& rFrmOrObj ) const
+inline sal_Bool SwAccessibleFrame::IsShowing( const SwAccessibleMap& rAccMap ) const
{
- return IsShowing( rFrmOrObj.GetBox() );
-}
-
-inline sal_Bool SwAccessibleFrame::IsShowing() const
-{
- SwFrmOrObj aFrmOrObj( GetFrm() );
- return IsShowing( aFrmOrObj );
+ sw::access::SwAccessibleChild aFrmOrObj( GetFrm() );
+ return IsShowing( rAccMap, aFrmOrObj );
}
inline const SwFrm *SwAccessibleFrame::GetParent() const
{
- SwFrmOrObj aFrmOrObj( GetFrm() );
+ sw::access::SwAccessibleChild aFrmOrObj( GetFrm() );
return GetParent( aFrmOrObj, IsInPagePreview() );
}
-inline sal_Int32 SwAccessibleFrame::GetChildCount() const
-{
- return GetChildCount( maVisArea, mpFrm, IsInPagePreview() );
-}
-
-inline SwFrmOrObj SwAccessibleFrame::GetChild( sal_Int32 nPos ) const
-{
- return GetChild( maVisArea, mpFrm, nPos, IsInPagePreview() );
-}
-
-inline sal_Int32 SwAccessibleFrame::GetChildIndex( const SwFrmOrObj& rChild ) const
-{
- sal_Int32 nPos = 0;
- return GetChildIndex( maVisArea, mpFrm, rChild, nPos, IsInPagePreview() ) ? nPos : -1L;
-}
-
-inline SwFrmOrObj SwAccessibleFrame::GetChildAtPixel( const Point& rPos,
- const SwAccessibleMap *pMap ) const
-{
- return GetChildAtPixel( maVisArea, mpFrm, rPos, IsInPagePreview(), pMap );
-}
-
-inline void SwAccessibleFrame::GetChildren( ::std::list< SwFrmOrObj >& rChildren ) const
-{
- GetChildren( maVisArea, mpFrm, rChildren, IsInPagePreview() );
-}
#endif
diff --git a/sw/source/core/access/accframebase.hxx b/sw/source/core/access/accframebase.hxx
index 2ff7c1f2d4..a566103ee2 100644
--- a/sw/source/core/access/accframebase.hxx
+++ b/sw/source/core/access/accframebase.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -26,13 +26,15 @@
************************************************************************/
#ifndef _ACCFRAMEBASE_HXX
#define _ACCFRAMEBASE_HXX
-#ifndef _ACCCONTEXT_HXX
-#include "acccontext.hxx"
-#endif
+
+#include <acccontext.hxx>
+
+#include <calbck.hxx>
class SwFlyFrm;
-class SwAccessibleFrameBase : public SwAccessibleContext, public SwClient
+class SwAccessibleFrameBase : public SwAccessibleContext,
+ public SwClient
{
sal_Bool bIsSelected; // protected by base class mutex
diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx
index 199067d424..47b4007c14 100644
--- a/sw/source/core/access/accfrmobj.cxx
+++ b/sw/source/core/access/accfrmobj.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -28,38 +28,401 @@
// 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 <accfrmobj.hxx>
#include <dcontact.hxx>
-#include <cellfrm.hxx>
-sal_Bool SwFrmOrObj::IsAccessible( sal_Bool bPagePreview ) const
+#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 )
{
- return ( pFrm && pFrm->IsAccessibleFrm() &&
- ( !pFrm->IsCellFrm() ||
- static_cast<const SwCellFrm *>( pFrm )->GetTabBox()->GetSttNd() != 0 ) &&
- !pFrm->IsInCoveredCell() &&
- ( bPagePreview || !pFrm->IsPageFrm() ) ) ||
- pObj;
+ mpFrm = pFrm;
+ mpDrawObj = mpFrm && mpFrm->IsFlyFrm()
+ ? static_cast < const SwFlyFrm * >( mpFrm )->GetVirtDrawObj()
+ : 0;
+ mpWindow = 0;
}
-sal_Bool SwFrmOrObj::IsBoundAsChar() const
+void SwAccessibleChild::Init( Window* pWindow )
{
- // currently only SwFrms are accessible
- if( pFrm )
+ 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 )
{
- return pFrm->IsFlyFrm() &&
- static_cast< const SwFlyFrm *>(pFrm)->IsFlyInCntFrm();
+ 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
{
- const SwFrmFmt *pFrmFmt = pObj ? ::FindFrmFmt( pObj ) : 0;
- return (pFrmFmt)
- ? static_cast<sal_Bool>(FLY_AS_CHAR ==
- pFrmFmt->GetAnchor().GetAnchorId())
- : sal_False;
+ 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->FindRootFrm();
+ }
+ }
+ 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()->FindRootFrm();
+ }
+ }
+ }
+ 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
index 85cf65e420..76113c62ea 100644
--- a/sw/source/core/access/accfrmobj.hxx
+++ b/sw/source/core/access/accfrmobj.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -26,192 +26,70 @@
************************************************************************/
#ifndef _ACCFRMOBJ_HXX
#define _ACCFRMOBJ_HXX
-#include <flyfrm.hxx>
-#include <pagefrm.hxx>
-#include <dflyobj.hxx>
-#include <swtable.hxx>
-
-class SwFrmOrObj
-{
- const SdrObject *pObj;
- const SwFrm *pFrm;
-
- inline void Init( const SdrObject *pO );
- inline void Init( const SwFrm *pF );
-
-public:
-
- inline SwFrmOrObj();
- inline SwFrmOrObj( const SdrObject *pO );
- inline SwFrmOrObj( const SwFrm *pF );
- inline SwFrmOrObj( const SwFrm *pF, const SdrObject *pO );
- inline SwFrmOrObj( const SwFrmOrObj& r );
-
- inline SwFrmOrObj& operator=( const SwFrmOrObj& r );
- inline SwFrmOrObj& operator=( const SdrObject *pO );
- inline SwFrmOrObj& operator=( const SwFrm *pF );
-
- inline sal_Bool operator==( const SwFrmOrObj& r ) const;
- inline sal_Bool operator==( const SdrObject *pO ) const;
- inline sal_Bool operator==( const SwFrm *pF ) const;
-
- inline sal_Bool IsValid() const;
-
- inline const SdrObject *GetSdrObject() const;
- inline const SwFrm *GetSwFrm() const;
-
- sal_Bool IsAccessible( sal_Bool bPagePreview ) const;
- sal_Bool IsBoundAsChar() const;
- inline sal_Bool IsVisibleChildrenOnly() const;
- inline SwRect GetBox() const;
- inline SwRect GetBounds() const;
-};
-
-inline void SwFrmOrObj::Init( const SdrObject *pO )
-{
- pObj = pO;
- // #110094#-1
- pFrm = pObj && pObj->ISA(SwVirtFlyDrawObj)
- ? static_cast < const SwVirtFlyDrawObj * >( pObj )->GetFlyFrm()
- : 0;
-}
-
-inline void SwFrmOrObj::Init( const SwFrm *pF )
-{
- pFrm = pF;
- pObj = pFrm && pFrm->IsFlyFrm()
- ? static_cast < const SwFlyFrm * >( pFrm )->GetVirtDrawObj()
- : 0;
-}
-inline SwFrmOrObj::SwFrmOrObj() :
- pObj( 0 ), pFrm( 0 )
-{}
+#include <sal/types.h>
-inline SwFrmOrObj::SwFrmOrObj( const SdrObject *pO )
-{
- Init( pO );
-}
+class SwAccessibleMap;
+class SwFrm;
+class SdrObject;
+class Window;
+class SwRect;
-inline SwFrmOrObj::SwFrmOrObj( const SwFrm *pF )
-{
- Init( pF );
-}
+namespace sw { namespace access {
-inline SwFrmOrObj::SwFrmOrObj( const SwFrm *pF, const SdrObject *pO )
+class SwAccessibleChild
{
- if( pF )
- Init( pF );
- else
- Init( pO );
- ASSERT( (!pF || pF == pFrm) && (!pO || pO == pObj),
- "invalid frame/object combination" );
+ 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 );
-inline SwFrmOrObj::SwFrmOrObj( const SwFrmOrObj& r ) :
- pObj( r.pObj ), pFrm( r.pFrm )
-{}
+ SwAccessibleChild& operator=( const SdrObject* pDrawObj );
+ SwAccessibleChild& operator=( const SwFrm* pFrm );
+ SwAccessibleChild& operator=( Window* pWindow );
-inline SwFrmOrObj& SwFrmOrObj::operator=( const SwFrmOrObj& r )
-{
- pObj = r.pObj;
- pFrm = r.pFrm;
- return *this;
-}
+ bool operator==( const SwAccessibleChild& r ) const;
-inline SwFrmOrObj& SwFrmOrObj::operator=( const SdrObject *pO )
-{
- Init( pO );
- return *this;
-}
+ bool IsValid() const;
-inline SwFrmOrObj& SwFrmOrObj::operator=( const SwFrm *pF )
-{
- Init( pF );
- return *this;
-}
+ const SwFrm* GetSwFrm() const;
+ const SdrObject* GetDrawObject() const;
+ Window* GetWindow() const;
-inline sal_Bool SwFrmOrObj::operator==( const SwFrmOrObj& r ) const
-{
- return pObj == r.pObj && pFrm == r.pFrm;
-}
+ const SwFrm* GetParent( const sal_Bool bInPagePreview ) const;
-inline sal_Bool SwFrmOrObj::operator==( const SdrObject *pO ) const
-{
- return pObj == pO;
-}
+ bool IsAccessible( sal_Bool bPagePreview ) const;
+ bool IsBoundAsChar() const;
-inline sal_Bool SwFrmOrObj::operator==( const SwFrm *pF ) const
-{
- return pFrm == pF;
-}
+ bool IsVisibleChildrenOnly() const;
+ SwRect GetBox( const SwAccessibleMap& rAccMap ) const;
+ SwRect GetBounds( const SwAccessibleMap& rAccMap ) const;
-inline sal_Bool SwFrmOrObj::IsValid() const
-{
- return pObj != 0 || pFrm != 0;
-}
+ /** indicating, if accessible child is included even, if the corresponding
+ object is not visible.
-inline const SdrObject *SwFrmOrObj::GetSdrObject() const
-{
- return pObj;
-}
+ @author OD
+ */
+ bool AlwaysIncludeAsChild() const;
-inline const SwFrm *SwFrmOrObj::GetSwFrm() const
-{
- return pFrm;
-}
+ private:
+ const SwFrm* mpFrm;
+ const SdrObject* mpDrawObj;
+ Window* mpWindow;
-inline sal_Bool SwFrmOrObj::IsVisibleChildrenOnly() const
-{
- return !pFrm || pFrm->IsRootFrm() ||
- !( pFrm->IsTabFrm() || pFrm->IsInTab() ||
- ( IsBoundAsChar() &&
- static_cast<const SwFlyFrm*>(pFrm)->GetAnchorFrm()->IsInTab()) );
-}
+ void Init( const SdrObject* pDrawObj );
+ void Init( const SwFrm* pFrm );
+ void Init( Window* pWindow );
+};
-inline SwRect SwFrmOrObj::GetBox() const
-{
- if( pFrm )
- {
- if( pFrm->IsPageFrm() &&
- static_cast< const SwPageFrm * >( pFrm )->IsEmptyPage() )
- {
- SwRect aBox( pFrm->Frm().Left(), pFrm->Frm().Top()-1, 1, 1 );
- return aBox;
- }
- else if ( pFrm->IsTabFrm() )
- {
- SwRect aBox( pFrm->Frm() );
- aBox.Intersection( pFrm->GetUpper()->Frm() );
- return aBox;
- }
- else
- return pFrm->Frm();
- }
- else if( pObj )
- return SwRect( pObj->GetCurrentBoundRect() );
- else
- return SwRect();
-}
-
-inline SwRect SwFrmOrObj::GetBounds() const
-{
- if( pFrm )
- {
- if( pFrm->IsPageFrm() &&
- static_cast< const SwPageFrm * >( pFrm )->IsEmptyPage() )
- {
- SwRect aBox( pFrm->Frm().Left(), pFrm->Frm().Top()-1, 0, 0 );
- return aBox;
- }
- else
- return pFrm->PaintArea();
- }
- else if( pObj )
- return SwRect( pObj->GetCurrentBoundRect() );
- return SwRect();
-}
+} } // eof of namespace sw::access
#endif
diff --git a/sw/source/core/access/accfrmobjmap.cxx b/sw/source/core/access/accfrmobjmap.cxx
index 389712e2c9..11834ee899 100644
--- a/sw/source/core/access/accfrmobjmap.cxx
+++ b/sw/source/core/access/accfrmobjmap.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -28,95 +28,141 @@
// 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>
-// OD 2004-05-24 #i28701#
#include <sortedobjs.hxx>
+#include <anchoredobject.hxx>
-#ifndef _ACCFFRMOBJMAP_HXX
-#include <accfrmobjmap.hxx>
-#endif
+#include <svx/svdobj.hxx>
-::std::pair< SwFrmOrObjMap::iterator, bool > SwFrmOrObjMap::insert(
- sal_uInt32 nPos, const SwFrmOrObj& rLower )
-{
- SwFrmOrObjMapKey aKey( SwFrmOrObjMapKey::TEXT, nPos );
- value_type aEntry( aKey, rLower );
- return _SwFrmOrObjMap::insert( aEntry );
-}
+using namespace sw::access;
-::std::pair< SwFrmOrObjMap::iterator, bool > SwFrmOrObjMap::insert(
- const SdrObject *pObj, const SwFrmOrObj& rLower, const SwDoc *pDoc )
+SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea,
+ const SwFrm& rFrm,
+ SwAccessibleMap& rAccMap )
+ : nHellId( rAccMap.GetShell()->GetDoc()->GetHellId() )
+ , nControlsId( rAccMap.GetShell()->GetDoc()->GetControlsId() )
{
- if( !bLayerIdsValid )
- {
- nHellId = pDoc->GetHellId();
- nControlsId = pDoc->GetControlsId();
- bLayerIdsValid = sal_True;
- }
-
- SdrLayerID nLayer = pObj->GetLayer();
- SwFrmOrObjMapKey::LayerId eLayerId = (nHellId == nLayer)
- ? SwFrmOrObjMapKey::HELL
- : ((nControlsId == nLayer) ? SwFrmOrObjMapKey::CONTROLS
- : SwFrmOrObjMapKey::HEAVEN);
- SwFrmOrObjMapKey aKey( eLayerId, pObj->GetOrdNum() );
- value_type aEntry( aKey, rLower );
- return _SwFrmOrObjMap::insert( aEntry );
-}
-
-SwFrmOrObjMap::SwFrmOrObjMap(
- const SwRect& rVisArea, const SwFrm *pFrm ) :
- bLayerIdsValid( sal_False )
-{
- SwFrmOrObj aFrm( pFrm );
- sal_Bool bVisibleOnly = aFrm.IsVisibleChildrenOnly();
+ const bool bVisibleChildrenOnly = SwAccessibleChild( &rFrm ).IsVisibleChildrenOnly();
sal_uInt32 nPos = 0;
- SwFrmOrObj aLower( pFrm->GetLower() );
+ SwAccessibleChild aLower( rFrm.GetLower() );
while( aLower.GetSwFrm() )
{
- if( !bVisibleOnly || aLower.GetBox().IsOver( rVisArea ) )
- insert( nPos++, aLower );
+ if ( !bVisibleChildrenOnly ||
+ aLower.AlwaysIncludeAsChild() ||
+ aLower.GetBox( rAccMap ).IsOver( rVisArea ) )
+ {
+ insert( nPos++, SwAccessibleChildMapKey::TEXT, aLower );
+ }
aLower = aLower.GetSwFrm()->GetNext();
}
- if( pFrm->IsPageFrm() )
+ if ( rFrm.IsPageFrm() )
{
- ASSERT( bVisibleOnly, "page frame within tab frame???" );
+ ASSERT( bVisibleChildrenOnly, "page frame within tab frame???" );
const SwPageFrm *pPgFrm =
- static_cast< const SwPageFrm * >( pFrm );
+ static_cast< const SwPageFrm * >( &rFrm );
const SwSortedObjs *pObjs = pPgFrm->GetSortedObjs();
- if( pObjs )
+ if ( pObjs )
{
- const SwDoc *pDoc = pPgFrm->GetFmt()->GetDoc();
for( sal_uInt16 i=0; i<pObjs->Count(); i++ )
{
aLower = (*pObjs)[i]->GetDrawObj();
- if( aLower.GetBox().IsOver( rVisArea ) )
- insert( aLower.GetSdrObject(), aLower, pDoc );
+ if ( aLower.GetBox( rAccMap ).IsOver( rVisArea ) )
+ {
+ insert( aLower.GetDrawObject(), aLower );
+ }
}
}
}
- else if( pFrm->IsTxtFrm() )
+ else if( rFrm.IsTxtFrm() )
{
- const SwDoc *pDoc = static_cast< const SwTxtFrm * >( pFrm )->GetNode()
- ->GetDoc();
- const SwSortedObjs *pObjs = pFrm->GetDrawObjs();
- if( pObjs )
+ const SwSortedObjs *pObjs = rFrm.GetDrawObjs();
+ if ( pObjs )
{
for( sal_uInt16 i=0; i<pObjs->Count(); i++ )
{
aLower = (*pObjs)[i]->GetDrawObj();
- if( aLower.IsBoundAsChar() &&
- (!bVisibleOnly || aLower.GetBox().IsOver( rVisArea )) )
- insert( aLower.GetSdrObject(), aLower, pDoc );
+ 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
index 9126f519c9..91365ed9c2 100644
--- a/sw/source/core/access/accfrmobjmap.hxx
+++ b/sw/source/core/access/accfrmobjmap.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -26,79 +26,71 @@
************************************************************************/
#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 SwFrmOrObjMapKey
+class SwAccessibleChildMapKey
{
public:
- enum LayerId { INVALID, HELL, TEXT, HEAVEN, CONTROLS };
+ 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;
-public:
-
- inline SwFrmOrObjMapKey();
- inline SwFrmOrObjMapKey( LayerId eId, sal_uInt32 nOrd );
-
- inline sal_Bool operator()( const SwFrmOrObjMapKey& r1,
- const SwFrmOrObjMapKey& r2 ) const;
};
-typedef ::std::map < SwFrmOrObjMapKey, SwFrmOrObj, SwFrmOrObjMapKey >
- _SwFrmOrObjMap;
+typedef ::std::map < SwAccessibleChildMapKey, sw::access::SwAccessibleChild, SwAccessibleChildMapKey >
+ _SwAccessibleChildMap;
-class SwFrmOrObjMap : public _SwFrmOrObjMap
+class SwAccessibleChildMap : public _SwAccessibleChildMap
{
- SdrLayerID nHellId;
- SdrLayerID nControlsId;
- sal_Bool bLayerIdsValid;
+ const SdrLayerID nHellId;
+ const SdrLayerID nControlsId;
- ::std::pair< iterator, bool > insert( sal_uInt32 nPos,
- const SwFrmOrObj& rLower );
- ::std::pair< iterator, bool > insert( const SdrObject *pObj,
- const SwFrmOrObj& rLower,
- const SwDoc *pDoc );
+ ::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:
- SwFrmOrObjMap( const SwRect& rVisArea, const SwFrm *pFrm );
+ SwAccessibleChildMap( const SwRect& rVisArea,
+ const SwFrm& rFrm,
+ SwAccessibleMap& rAccMap );
- inline static sal_Bool IsSortingRequired( const SwFrm *pFrm );
+ static sal_Bool IsSortingRequired( const SwFrm& rFrm );
};
-inline SwFrmOrObjMapKey::SwFrmOrObjMapKey() :
- eLayerId( INVALID ),
- nOrdNum( 0 )
-{
-}
-
-inline SwFrmOrObjMapKey::SwFrmOrObjMapKey(
- LayerId eId, sal_uInt32 nOrd ) :
- eLayerId( eId ),
- nOrdNum( nOrd )
-{
-}
-
-inline sal_Bool SwFrmOrObjMapKey::operator()(
- const SwFrmOrObjMapKey& r1,
- const SwFrmOrObjMapKey& r2 ) const
-{
- return (r1.eLayerId == r2.eLayerId) ? (r1.nOrdNum < r2.nOrdNum) :
- (r1.eLayerId < r2.eLayerId);
-}
-
-inline sal_Bool SwFrmOrObjMap::IsSortingRequired( const SwFrm *pFrm )
-{
- return ( pFrm->IsPageFrm() &&
- static_cast< const SwPageFrm * >( pFrm )->GetSortedObjs() ) ||
- (pFrm->IsTxtFrm() && pFrm->GetDrawObjs() );
-}
-
#endif
diff --git a/sw/source/core/access/accfrmobjslist.cxx b/sw/source/core/access/accfrmobjslist.cxx
index 2745b9dc98..2f3e839918 100644
--- a/sw/source/core/access/accfrmobjslist.cxx
+++ b/sw/source/core/access/accfrmobjslist.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -28,97 +28,146 @@
// 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>
-// OD 2004-05-24 #i28701#
#include <sortedobjs.hxx>
-#include <accfrmobjslist.hxx>
+#include <anchoredobject.hxx>
+using namespace ::sw::access;
-SwFrmOrObjSList_const_iterator::SwFrmOrObjSList_const_iterator(
- const SwFrmOrObjSList& rLst, sal_Bool ) :
- rList( rLst ), aCurr( rList.pFrm->GetLower() ), nNextObj( 0 )
+SwAccessibleChildSList_const_iterator::SwAccessibleChildSList_const_iterator(
+ const SwAccessibleChildSList& rLst,
+ SwAccessibleMap& rAccMap )
+ : rList( rLst ),
+ aCurr( rList.GetFrm().GetLower() ),
+ nNextObj( 0 )
{
if( !aCurr.GetSwFrm() )
{
- if( rList.pFrm->IsPageFrm() )
+ const SwFrm& rFrm = rList.GetFrm();
+ if( rFrm.IsPageFrm() )
{
- const SwPageFrm *pPgFrm =
- static_cast< const SwPageFrm * >( rList.pFrm );
- const SwSortedObjs *pObjs = pPgFrm->GetSortedObjs();
+ const SwPageFrm& rPgFrm = static_cast< const SwPageFrm& >( rFrm );
+ const SwSortedObjs *pObjs = rPgFrm.GetSortedObjs();
if( pObjs && pObjs->Count() )
+ {
aCurr = (*pObjs)[nNextObj++]->GetDrawObj();
+ }
}
- else if( rList.pFrm->IsTxtFrm() )
+ else if( rFrm.IsTxtFrm() )
{
- const SwSortedObjs *pObjs = rList.pFrm->GetDrawObjs();
- if( pObjs && pObjs->Count() )
+ 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 );
-
+ ? (*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.bVisibleOnly )
+
+ if( rList.IsVisibleChildrenOnly() )
{
// Find the first visible
while( aCurr.IsValid() &&
- !aCurr.GetBox().IsOver( rList.aVisArea ) )
+ !aCurr.AlwaysIncludeAsChild() &&
+ !aCurr.GetBox( rAccMap ).IsOver( rList.GetVisArea() ) )
+ {
next();
+ }
}
}
-SwFrmOrObjSList_const_iterator& SwFrmOrObjSList_const_iterator::next()
+SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::next()
{
- sal_Bool bGetSdrObject = sal_False;
- if( aCurr.GetSdrObject() )
+ bool bNextTaken( true );
+ if( aCurr.GetDrawObject() || aCurr.GetWindow() )
{
- bGetSdrObject = sal_True;
+ bNextTaken = false;
}
else if( aCurr.GetSwFrm() )
{
aCurr = aCurr.GetSwFrm()->GetNext();
if( !aCurr.GetSwFrm() )
- bGetSdrObject = sal_True;
+ {
+ bNextTaken = false;
+ }
}
- if( bGetSdrObject )
+ if( !bNextTaken )
{
- if( rList.pFrm->IsPageFrm() )
+ const SwFrm& rFrm = rList.GetFrm();
+ if( rFrm.IsPageFrm() )
{
- const SwPageFrm *pPgFrm =
- static_cast< const SwPageFrm * >( rList.pFrm );
- const SwSortedObjs *pObjs = pPgFrm->GetSortedObjs();
- aCurr = (pObjs && nNextObj < pObjs->Count())
- ? (*pObjs)[nNextObj++]->GetDrawObj()
- : static_cast< const SdrObject *>( 0 );
+ 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( rList.pFrm->IsTxtFrm() )
+ else if( rFrm.IsTxtFrm() )
{
- const SwSortedObjs *pObjs = rList.pFrm->GetDrawObjs();
- aCurr = (pObjs && nNextObj < pObjs->Count())
- ? (*pObjs)[nNextObj++]->GetDrawObj()
- : static_cast< const SdrObject *>( 0 );
+ 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 < pObjs->Count())
- ? (*pObjs)[nNextObj++]->GetDrawObj()
- : static_cast< const SdrObject *>( 0 );
+ {
+ 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;
}
-SwFrmOrObjSList_const_iterator& SwFrmOrObjSList_const_iterator::next_visible()
+SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::next_visible()
{
next();
while( aCurr.IsValid() &&
- !aCurr.GetBox().IsOver( rList.aVisArea ) )
+ !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
index d71a9dc173..f81cfc85a9 100644
--- a/sw/source/core/access/accfrmobjslist.hxx
+++ b/sw/source/core/access/accfrmobjslist.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -28,117 +28,118 @@
#define _ACCFRMOBJSLIST_HXX
#include <accfrmobj.hxx>
+#include <swrect.hxx>
-class SwFrmOrObjSList;
-
-class SwFrmOrObjSList_const_iterator
-{
- friend class SwFrmOrObjSList;
- const SwFrmOrObjSList& rList; // The frame we are iterating over
- SwFrmOrObj aCurr; // The current object
- sal_uInt16 nNextObj; // The index of the current sdr object
-
- inline SwFrmOrObjSList_const_iterator( const SwFrmOrObjSList& rLst );
- SwFrmOrObjSList_const_iterator( const SwFrmOrObjSList& rLst, sal_Bool );
+class SwAccessibleMap;
-// SwFrmOrObjSList_const_iterator& begin();
- SwFrmOrObjSList_const_iterator& next();
- SwFrmOrObjSList_const_iterator& next_visible();
+class SwAccessibleChildSList;
-public:
-
- inline SwFrmOrObjSList_const_iterator(
- const SwFrmOrObjSList_const_iterator& rIter );
- inline sal_Bool operator==(
- const SwFrmOrObjSList_const_iterator& r ) const;
- inline sal_Bool operator!=(
- const SwFrmOrObjSList_const_iterator& r ) const;
- inline SwFrmOrObjSList_const_iterator& operator++();
- inline const SwFrmOrObj& operator*() const;
-};
-
-// An iterator to iterate over a frame's child in any order
-class SwFrmOrObjSList
+class SwAccessibleChildSList_const_iterator
{
- friend class SwFrmOrObjSList_const_iterator;
+private:
+ friend class SwAccessibleChildSList;
- SwRect aVisArea;
- const SwFrm *pFrm; // The frame we are iterating over
- sal_Bool bVisibleOnly;
-
-public:
+ 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
- typedef SwFrmOrObjSList_const_iterator const_iterator;
+ inline SwAccessibleChildSList_const_iterator( const SwAccessibleChildSList& rLst )
+ : rList( rLst )
+ , nNextObj( 0 )
+ {}
- inline SwFrmOrObjSList( const SwFrm *pF );
- inline SwFrmOrObjSList( const SwRect& rVisArea, const SwFrm *pF );
+ SwAccessibleChildSList_const_iterator( const SwAccessibleChildSList& rLst,
+ SwAccessibleMap& rAccMap );
- inline const_iterator begin() const;
- inline const_iterator end() const;
-};
-
-inline SwFrmOrObjSList_const_iterator::SwFrmOrObjSList_const_iterator(
- const SwFrmOrObjSList& rLst ) :
- rList( rLst ), nNextObj( 0 )
-{
-}
+ SwAccessibleChildSList_const_iterator& next();
+ SwAccessibleChildSList_const_iterator& next_visible();
-inline SwFrmOrObjSList_const_iterator::SwFrmOrObjSList_const_iterator(
- const SwFrmOrObjSList_const_iterator& rIter ) :
- rList( rIter.rList ),
- aCurr( rIter.aCurr ),
- nNextObj( rIter.nNextObj )
-{
-}
+public:
-inline sal_Bool SwFrmOrObjSList_const_iterator::operator==(
- const SwFrmOrObjSList_const_iterator& r ) const
-{
- return aCurr == r.aCurr;
-}
+ inline SwAccessibleChildSList_const_iterator( const SwAccessibleChildSList_const_iterator& rIter )
+ : rList( rIter.rList )
+ , aCurr( rIter.aCurr )
+ , nNextObj( rIter.nNextObj )
+ {}
-inline sal_Bool SwFrmOrObjSList_const_iterator::operator!=(
- const SwFrmOrObjSList_const_iterator& r ) const
-{
- return !(aCurr == r.aCurr);
-}
+ inline sal_Bool operator==( const SwAccessibleChildSList_const_iterator& r ) const
+ {
+ return aCurr == r.aCurr;
+ }
-inline SwFrmOrObjSList_const_iterator& SwFrmOrObjSList_const_iterator::operator++()
-{
- return rList.bVisibleOnly ? next_visible() : next();
-}
+ inline sal_Bool operator!=(
+ const SwAccessibleChildSList_const_iterator& r ) const
+ {
+ return !(*this == r);
+ }
-inline const SwFrmOrObj& SwFrmOrObjSList_const_iterator::operator*() const
-{
- return aCurr;
-}
+ SwAccessibleChildSList_const_iterator& operator++();
-inline SwFrmOrObjSList::SwFrmOrObjSList( const SwFrm *pF ) :
- pFrm( pF ),
- bVisibleOnly( sal_False )
-{
-}
+ inline const sw::access::SwAccessibleChild& operator*() const
+ {
+ return aCurr;
+ }
+};
-inline SwFrmOrObjSList::SwFrmOrObjSList( const SwRect& rVisArea,
- const SwFrm *pF ) :
- aVisArea( rVisArea ),
- pFrm( pF )
+// An iterator to iterate over a frame's child in any order
+class SwAccessibleChildSList
{
- SwFrmOrObj aFrm( pFrm );
- bVisibleOnly = aFrm.IsVisibleChildrenOnly();
-}
+ const SwRect maVisArea;
+ const SwFrm& mrFrm;
+ const sal_Bool mbVisibleChildrenOnly;
+ SwAccessibleMap& mrAccMap;
-inline SwFrmOrObjSList_const_iterator SwFrmOrObjSList::begin() const
-{
-// SwFrmOrObjSList_const_iterator aIter2( *this );
-// aIter2.begin();
-// return aIter2;
- return SwFrmOrObjSList_const_iterator( *this, sal_True );
-}
+public:
-inline SwFrmOrObjSList_const_iterator SwFrmOrObjSList::end() const
-{
- return SwFrmOrObjSList_const_iterator( *this );
-}
+ 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/accmap.cxx b/sw/source/core/access/accmap.cxx
index 6892ab59c5..5e48747e82 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -39,9 +39,7 @@
#include <map>
#include <list>
#include <accmap.hxx>
-#ifndef _ACCCONTEXT_HXX
#include <acccontext.hxx>
-#endif
#include <accdoc.hxx>
#include <accpreview.hxx>
#include <accpage.hxx>
@@ -53,7 +51,7 @@
#include <accembedded.hxx>
#include <acccell.hxx>
#include <acctable.hxx>
-#include "fesh.hxx"
+#include <fesh.hxx>
#include <rootfrm.hxx>
#include <txtfrm.hxx>
#include <hffrm.hxx>
@@ -61,10 +59,9 @@
#include <cellfrm.hxx>
#include <tabfrm.hxx>
#include <pagefrm.hxx>
+#include <flyfrm.hxx>
#include <ndtyp.hxx>
-#ifndef IDOCUMENTDRAWMODELACCESS_HXX_INCLUDED
#include <IDocumentDrawModelAccess.hxx>
-#endif
#include <svx/ShapeTypeHandler.hxx>
#include <vcl/svapp.hxx>
#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
@@ -77,10 +74,13 @@
#include <pam.hxx>
#include <ndtxt.hxx>
// <--
+#include <dflyobj.hxx>
+#include <prevwpage.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
using ::rtl::OUString;
+using namespace ::sw::access;
struct SwFrmFunc
{
@@ -329,7 +329,7 @@ private:
SwRect maOldBox; // the old bounds for CHILD_POS_CHANGED
// and POS_CHANGED
uno::WeakReference < XAccessible > mxAcc; // The object that fires the event
- SwFrmOrObj maFrmOrObj; // the child for CHILD_POS_CHANGED and
+ SwAccessibleChild maFrmOrObj; // the child for CHILD_POS_CHANGED and
// the same as xAcc for any other
// event type
EventType meType; // The event type
@@ -342,7 +342,7 @@ private:
public:
SwAccessibleEvent_Impl( EventType eT,
SwAccessibleContext *pA,
- const SwFrmOrObj& rFrmOrObj )
+ const SwAccessibleChild& rFrmOrObj )
: mxAcc( pA ),
maFrmOrObj( rFrmOrObj ),
meType( eT ),
@@ -350,7 +350,7 @@ public:
{}
SwAccessibleEvent_Impl( EventType eT,
- const SwFrmOrObj& rFrmOrObj )
+ const SwAccessibleChild& rFrmOrObj )
: maFrmOrObj( rFrmOrObj ),
meType( eT ),
mnStates( 0 )
@@ -369,7 +369,7 @@ public:
SwAccessibleEvent_Impl( EventType eT,
SwAccessibleContext *pA,
- const SwFrmOrObj& rFrmOrObj,
+ const SwAccessibleChild& rFrmOrObj,
const SwRect& rR )
: maOldBox( rR ),
mxAcc( pA ),
@@ -385,7 +385,7 @@ public:
// --> OD 2005-12-12 #i27301# - use new type definition for parameter <_nStates>
SwAccessibleEvent_Impl( EventType eT,
SwAccessibleContext *pA,
- const SwFrmOrObj& rFrmOrObj,
+ const SwAccessibleChild& rFrmOrObj,
const tAccessibleStates _nStates )
: mxAcc( pA ),
maFrmOrObj( rFrmOrObj ),
@@ -425,7 +425,7 @@ public:
maOldBox = rOldBox;
}
- inline const SwFrmOrObj& GetFrmOrObj() const
+ inline const SwAccessibleChild& GetFrmOrObj() const
{
return maFrmOrObj;
}
@@ -524,22 +524,26 @@ public:
//------------------------------------------------------------------------------
-struct SwFrmOrObjFunc
+struct SwAccessibleChildFunc
{
- sal_Bool operator()( const SwFrmOrObj& r1,
- const SwFrmOrObj& r2 ) const
+ sal_Bool operator()( const SwAccessibleChild& r1,
+ const SwAccessibleChild& r2 ) const
{
const void *p1 = r1.GetSwFrm()
- ? static_cast < const void * >( r1.GetSwFrm())
- : static_cast < const void * >( r1.GetSdrObject() );
+ ? 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())
- : static_cast < const void * >( r2.GetSdrObject() );
+ ? 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 < SwFrmOrObj, SwAccessibleEventList_Impl::iterator,
- SwFrmOrObjFunc > _SwAccessibleEventMap_Impl;
+typedef ::std::map < SwAccessibleChild, SwAccessibleEventList_Impl::iterator,
+ SwAccessibleChildFunc > _SwAccessibleEventMap_Impl;
class SwAccessibleEventMap_Impl: public _SwAccessibleEventMap_Impl
{
@@ -577,6 +581,222 @@ typedef ::std::map< uno::WeakReference < XAccessible >,
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 )
@@ -796,9 +1016,10 @@ void SwAccessibleMap::InvalidateCursorPosition(
ASSERT( pAccImpl->GetFrm(), "caret context is disposed" );
if( GetShell()->ActionPend() )
{
- SwAccessibleEvent_Impl aEvent(
- SwAccessibleEvent_Impl::CARET_OR_STATES, pAccImpl,
- pAccImpl->GetFrm(), ACC_STATE_CARET );
+ SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CARET_OR_STATES,
+ pAccImpl,
+ SwAccessibleChild(pAccImpl->GetFrm()),
+ ACC_STATE_CARET );
AppendEvent( aEvent );
}
else
@@ -873,11 +1094,10 @@ void SwAccessibleMap::DoInvalidateShapeSelection()
}
if( bChanged )
{
- SwFrmOrObj aFrmOrObj( pShape->first );
- SwFrmOrObj aParent =
- SwAccessibleFrame::GetParent( aFrmOrObj,
- GetShell()->IsPreView() );
- aParents.push_back( aParent.GetSwFrm() );
+ const SwFrm* pParent = SwAccessibleFrame::GetParent(
+ SwAccessibleChild( pShape->first ),
+ GetShell()->IsPreView() );
+ aParents.push_back( pParent );
}
}
@@ -1166,7 +1386,7 @@ uno::Reference<XAccessible> SwAccessibleMap::GetDocumentPreview(
// create & update preview data object
if( mpPreview == NULL )
mpPreview = new SwAccPreviewData();
- mpPreview->Update( _rPrevwPages, _rScale, _pSelectedPageFrm, _rPrevwWinSize );
+ mpPreview->Update( *this, _rPrevwPages, _rScale, _pSelectedPageFrm, _rPrevwWinSize );
uno::Reference<XAccessible> xAcc = _GetDocumentView( sal_True );
return xAcc;
@@ -1197,8 +1417,8 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext( const SwFrm *pFrm,
{
case FRM_TXT:
mnPara++;
- pAcc = new SwAccessibleParagraph( this,
- static_cast< const SwTxtFrm * >( pFrm ) );
+ pAcc = new SwAccessibleParagraph( *this,
+ static_cast< const SwTxtFrm& >( *pFrm ) );
break;
case FRM_HEADER:
pAcc = new SwAccessibleHeaderFooter( this,
@@ -1458,10 +1678,12 @@ void SwAccessibleMap::RemoveContext( const SdrObject *pObj )
}
-void SwAccessibleMap::Dispose( const SwFrm *pFrm, const SdrObject *pObj,
+void SwAccessibleMap::Dispose( const SwFrm *pFrm,
+ const SdrObject *pObj,
+ Window* pWindow,
sal_Bool bRecursive )
{
- SwFrmOrObj aFrmOrObj( pFrm, pObj );
+ 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
@@ -1470,11 +1692,11 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm, const SdrObject *pObj,
ASSERT( !aFrmOrObj.GetSwFrm() || aFrmOrObj.GetSwFrm()->IsAccessibleFrm(),
"non accessible frame should be disposed" );
- ::vos::ORef< SwAccessibleContext > xAccImpl;
- ::vos::ORef< SwAccessibleContext > xParentAccImpl;
- ::vos::ORef< ::accessibility::AccessibleShape > xShapeAccImpl;
if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) )
{
+ ::vos::ORef< SwAccessibleContext > xAccImpl;
+ ::vos::ORef< SwAccessibleContext > xParentAccImpl;
+ ::vos::ORef< ::accessibility::AccessibleShape > xShapeAccImpl;
// get accessible context for frame
{
vos::OGuard aGuard( maMutex );
@@ -1514,7 +1736,7 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm, const SdrObject *pObj,
mpShapeMap )
{
SwAccessibleShapeMap_Impl::iterator aIter =
- mpShapeMap->find( aFrmOrObj.GetSdrObject() );
+ mpShapeMap->find( aFrmOrObj.GetDrawObject() );
if( aIter != mpShapeMap->end() )
{
uno::Reference < XAccessible > xAcc( (*aIter).second );
@@ -1574,7 +1796,7 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm, const SdrObject *pObj,
}
else if( xShapeAccImpl.isValid() )
{
- RemoveContext( aFrmOrObj.GetSdrObject() );
+ RemoveContext( aFrmOrObj.GetDrawObject() );
xShapeAccImpl->dispose();
}
@@ -1585,9 +1807,10 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm, const SdrObject *pObj,
void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm,
const SdrObject *pObj,
+ Window* pWindow,
const SwRect& rOldBox )
{
- SwFrmOrObj aFrmOrObj( pFrm, pObj );
+ SwAccessibleChild aFrmOrObj( pFrm, pObj, pWindow );
if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) )
{
::vos::ORef< SwAccessibleContext > xAccImpl;
@@ -1669,7 +1892,7 @@ void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm,
void SwAccessibleMap::InvalidateContent( const SwFrm *pFrm )
{
- SwFrmOrObj aFrmOrObj( pFrm );
+ SwAccessibleChild aFrmOrObj( pFrm );
if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) )
{
uno::Reference < XAccessible > xAcc;
@@ -1708,7 +1931,7 @@ void SwAccessibleMap::InvalidateContent( const SwFrm *pFrm )
// --> OD 2009-01-06 #i88069#
void SwAccessibleMap::InvalidateAttr( const SwTxtFrm& rTxtFrm )
{
- SwFrmOrObj aFrmOrObj( &rTxtFrm );
+ SwAccessibleChild aFrmOrObj( &rTxtFrm );
if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) )
{
uno::Reference < XAccessible > xAcc;
@@ -1747,7 +1970,7 @@ void SwAccessibleMap::InvalidateAttr( const SwTxtFrm& rTxtFrm )
void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm )
{
- SwFrmOrObj aFrmOrObj( pFrm );
+ SwAccessibleChild aFrmOrObj( pFrm );
sal_Bool bShapeSelected = sal_False;
const ViewShell *pVSh = GetShell();
if( pVSh->ISA( SwCrsrShell ) )
@@ -1873,7 +2096,7 @@ void SwAccessibleMap::InvalidateStates( tAccessibleStates _nStates,
const SwFrm* _pFrm )
{
// Start with the frame or the first upper that is accessible
- SwFrmOrObj aFrmOrObj( _pFrm );
+ SwAccessibleChild aFrmOrObj( _pFrm );
while( aFrmOrObj.GetSwFrm() &&
!aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) )
aFrmOrObj = aFrmOrObj.GetSwFrm()->GetUpper();
@@ -1885,9 +2108,10 @@ void SwAccessibleMap::InvalidateStates( tAccessibleStates _nStates,
static_cast< SwAccessibleContext *>( xAcc.get() );
if( GetShell()->ActionPend() )
{
- SwAccessibleEvent_Impl aEvent(
- SwAccessibleEvent_Impl::CARET_OR_STATES, pAccImpl,
- pAccImpl->GetFrm(), _nStates );
+ SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CARET_OR_STATES,
+ pAccImpl,
+ SwAccessibleChild(pAccImpl->GetFrm()),
+ _nStates );
AppendEvent( aEvent );
}
else
@@ -1902,7 +2126,7 @@ void SwAccessibleMap::_InvalidateRelationSet( const SwFrm* pFrm,
sal_Bool bFrom )
{
// first, see if this frame is accessible, and if so, get the respective
- SwFrmOrObj aFrmOrObj( pFrm );
+ SwAccessibleChild aFrmOrObj( pFrm );
if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) )
{
uno::Reference < XAccessible > xAcc;
@@ -1927,9 +2151,11 @@ void SwAccessibleMap::_InvalidateRelationSet( const SwFrm* pFrm,
static_cast< SwAccessibleContext *>( xAcc.get() );
if( GetShell()->ActionPend() )
{
- SwAccessibleEvent_Impl aEvent(
- SwAccessibleEvent_Impl::CARET_OR_STATES, pAccImpl, pFrm,
- bFrom ? ACC_STATE_RELATION_FROM : ACC_STATE_RELATION_TO );
+ SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CARET_OR_STATES,
+ pAccImpl, SwAccessibleChild(pFrm),
+ ( bFrom
+ ? ACC_STATE_RELATION_FROM
+ : ACC_STATE_RELATION_TO ) );
AppendEvent( aEvent );
}
else
@@ -1971,7 +2197,7 @@ void SwAccessibleMap::InvalidateParaFlowRelation( const SwTxtFrm& _rTxtFrm,
void SwAccessibleMap::InvalidateParaTextSelection( const SwTxtFrm& _rTxtFrm )
{
// first, see if this frame is accessible, and if so, get the respective
- SwFrmOrObj aFrmOrObj( &_rTxtFrm );
+ SwAccessibleChild aFrmOrObj( &_rTxtFrm );
if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) )
{
uno::Reference < XAccessible > xAcc;
@@ -1998,7 +2224,8 @@ void SwAccessibleMap::InvalidateParaTextSelection( const SwTxtFrm& _rTxtFrm )
{
SwAccessibleEvent_Impl aEvent(
SwAccessibleEvent_Impl::CARET_OR_STATES,
- pAccImpl, &_rTxtFrm,
+ pAccImpl,
+ SwAccessibleChild( &_rTxtFrm ),
ACC_STATE_TEXT_SELECTION_CHANGED );
AppendEvent( aEvent );
}
@@ -2011,6 +2238,43 @@ void SwAccessibleMap::InvalidateParaTextSelection( const SwTxtFrm& _rTxtFrm )
}
}
+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,
@@ -2022,7 +2286,7 @@ void SwAccessibleMap::UpdatePreview( const std::vector<PrevwPage*>& _rPrevwPages
DBG_ASSERT( mpPreview != NULL, "no preview data?" );
// OD 15.01.2003 #103492# - adjustments for changed method signature
- mpPreview->Update( _rPrevwPages, _rScale, _pSelectedPageFrm, _rPrevwWinSize );
+ mpPreview->Update( *this, _rPrevwPages, _rScale, _pSelectedPageFrm, _rPrevwWinSize );
// propagate change of VisArea through the document's
// accessibility tree; this will also send appropriate scroll
@@ -2247,7 +2511,7 @@ sal_Bool SwAccessibleMap::ReplaceChild (
// Also get keep parent.
uno::Reference < XAccessible > xParent( pCurrentChild->getAccessibleParent() );
pCurrentChild = 0; // well be realease by dispose
- Dispose( 0, pObj );
+ Dispose( 0, pObj, 0 );
{
vos::OGuard aGuard( maMutex );
@@ -2284,7 +2548,7 @@ sal_Bool SwAccessibleMap::ReplaceChild (
}
SwRect aEmptyRect;
- InvalidatePosOrSize( 0, pObj, aEmptyRect );
+ InvalidatePosOrSize( 0, pObj, 0, aEmptyRect );
return sal_True;
}
@@ -2612,153 +2876,13 @@ void SwAccessibleMap::InvalidateTextSelectionOfAllParas()
}
}
-//
-// SwAccPreviewData
-//
-
-SwAccPreviewData::SwAccPreviewData() :
- mpSelPage( 0 )
-{
-}
-
-SwAccPreviewData::~SwAccPreviewData()
-{
-}
-
-// OD 13.01.2003 #103492# - complete re-factoring of method due to new page/print
-// preview functionality.
-void SwAccPreviewData::Update( const std::vector<PrevwPage*>& _rPrevwPages,
- const Fraction& _rScale,
- const SwPageFrm* _pSelectedPageFrm,
- const Size& _rPrevwWinSize )
+const SwRect& SwAccessibleMap::GetVisArea() const
{
- // store preview scaling, maximal preview page size and selected page
- maScale = _rScale;
- mpSelPage = _pSelectedPageFrm;
-
- // prepare loop on preview pages
- maPreviewRects.clear();
- maLogicRects.clear();
- SwFrmOrObj aPage;
- maVisArea.Clear();
+ DBG_ASSERT( !GetShell()->IsPreView() || (mpPreview != NULL),
+ "preview without preview data?" );
- // loop on preview pages to calculate <maPreviewRects>, <maLogicRects> and
- // <maVisArea>
- for ( std::vector<PrevwPage*>::const_iterator aPageIter = _rPrevwPages.begin();
- aPageIter != _rPrevwPages.end();
- ++aPageIter )
- {
- aPage = (*aPageIter)->pPage;
-
- // add preview page rectangle to <maPreviewRects>
- Rectangle aPrevwPgRect( (*aPageIter)->aPrevwWinPos, (*aPageIter)->aPageSize );
- maPreviewRects.push_back( aPrevwPgRect );
-
- // add logic page rectangle to <maLogicRects>
- SwRect aLogicPgSwRect( aPage.GetBox() );
- Rectangle aLogicPgRect( aLogicPgSwRect.SVRect() );
- maLogicRects.push_back( aLogicPgRect );
- // union visible area with visible part of logic page rectangle
- if ( (*aPageIter)->bVisible )
- {
- if ( !(*aPageIter)->pPage->IsEmptyPage() )
- {
- AdjustLogicPgRectToVisibleArea( aLogicPgSwRect,
- SwRect( aPrevwPgRect ),
- _rPrevwWinSize );
- }
- if ( maVisArea.IsEmpty() )
- maVisArea = aLogicPgSwRect;
- else
- maVisArea.Union( aLogicPgSwRect );
- }
- }
+ return GetShell()->IsPreView()
+ ? mpPreview->GetVisArea()
+ : GetShell()->VisArea();
}
-// OD 16.01.2003 #103492# - complete re-factoring of method due to new page/print
-// preview functionality.
-void SwAccPreviewData::InvalidateSelection( const SwPageFrm* _pSelectedPageFrm )
-{
- mpSelPage = _pSelectedPageFrm;
- ASSERT( mpSelPage, "selected page not found" );
-}
-
-struct ContainsPredicate
-{
- const Point& mrPoint;
- ContainsPredicate( const Point& rPoint ) : mrPoint(rPoint) {}
- bool operator() ( const Rectangle& rRect ) const
- {
- return rRect.IsInside( mrPoint ) ? true : false;
- }
-};
-
-const SwRect& SwAccPreviewData::GetVisArea() const
-{
- return maVisArea;
-}
-
-void SwAccPreviewData::AdjustMapMode( MapMode& rMapMode,
- const Point& rPoint ) const
-{
- // adjust scale
- rMapMode.SetScaleX( maScale );
- rMapMode.SetScaleY( maScale );
-
- // find proper rectangle
- Rectangles::const_iterator aBegin = maLogicRects.begin();
- Rectangles::const_iterator aEnd = maLogicRects.end();
- Rectangles::const_iterator aFound = ::std::find_if( aBegin, aEnd,
- ContainsPredicate( rPoint ) );
-
- if( aFound != aEnd )
- {
- // found! set new origin
- Point aPoint = (maPreviewRects.begin() + (aFound - aBegin))->TopLeft();
- aPoint -= (maLogicRects.begin() + (aFound-aBegin))->TopLeft();
- rMapMode.SetOrigin( aPoint );
- }
- // else: don't adjust MapMode
-}
-
-void SwAccPreviewData::DisposePage(const SwPageFrm *pPageFrm )
-{
- if( mpSelPage == pPageFrm )
- mpSelPage = 0;
-}
-
-/** adjust logic page retangle to its visible part
-
- OD 17.01.2003 #103492#
-
- @author OD
-*/
-void SwAccPreviewData::AdjustLogicPgRectToVisibleArea(
- SwRect& _iorLogicPgSwRect,
- const SwRect& _rPrevwPgSwRect,
- const Size& _rPrevwWinSize )
-{
- // determine preview window rectangle
- const SwRect aPrevwWinSwRect( Point( 0, 0 ), _rPrevwWinSize );
- // calculate visible preview page rectangle
- SwRect aVisPrevwPgSwRect( _rPrevwPgSwRect );
- aVisPrevwPgSwRect.Intersection( aPrevwWinSwRect );
- // adjust logic page rectangle
- SwTwips nTmpDiff;
- // left
- nTmpDiff = aVisPrevwPgSwRect.Left() - _rPrevwPgSwRect.Left();
- if ( nTmpDiff > 0 )
- _iorLogicPgSwRect.Left( _iorLogicPgSwRect.Left() + nTmpDiff );
- // top
- nTmpDiff = aVisPrevwPgSwRect.Top() - _rPrevwPgSwRect.Top();
- if ( nTmpDiff > 0 )
- _iorLogicPgSwRect.Top( _iorLogicPgSwRect.Top() + nTmpDiff );
- // right
- nTmpDiff = _rPrevwPgSwRect.Right() - aVisPrevwPgSwRect.Right();
- if ( nTmpDiff > 0 )
- _iorLogicPgSwRect.Right( _iorLogicPgSwRect.Right() - nTmpDiff );
- // bottom
- nTmpDiff = _rPrevwPgSwRect.Bottom() - aVisPrevwPgSwRect.Bottom();
- if ( nTmpDiff > 0 )
- _iorLogicPgSwRect.Bottom( _iorLogicPgSwRect.Bottom() - nTmpDiff );
-}
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 9834b7a6d1..368e076470 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -29,13 +29,14 @@
#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 <fesh.hxx>
#include <viewopt.hxx>
#include <vos/mutex.hxx>
#include <vcl/svapp.hxx>
@@ -51,56 +52,44 @@
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <com/sun/star/beans/UnknownPropertyException.hpp>
#include <breakit.hxx>
-#include "accpara.hxx"
-#ifndef _ACCESS_HRC
-#include "access.hrc"
-#endif
-#include "accportions.hxx"
+#include <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 "unoport.hxx"
-#include "doc.hxx"
-#include "crsskip.hxx"
+#include <unocrsr.hxx>
+//#include <unoobj.hxx>
+#include <unoport.hxx>
+#include <doc.hxx>
+#include <crsskip.hxx>
#include <txtatr.hxx>
#include <acchyperlink.hxx>
#include <acchypertextdata.hxx>
-// --> OD 2005-12-02 #i27138#
#include <unotools/accessiblerelationsethelper.hxx>
#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
-// <--
#include <comphelper/accessibletexthelper.hxx>
-// --> OD 2006-07-12 #i63870#
#include <unomap.hxx>
-// <--
-// --> OD 2007-01-15 #i72800#
#include <unoprnms.hxx>
-// <--
-// --> OD 2007-01-15 #i73371#
#include <com/sun/star/text/WritingMode2.hpp>
-// <--
-// --> OD 2007-01-17 #i71385#
#include <editeng/brshitem.hxx>
#include <viewimp.hxx>
-// <--
-// --> OD 2007-11-12 #i82637#
#include <boost/scoped_ptr.hpp>
-// <--
-// --> OD 2008-05-26 #i71360#
#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::i18n;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::accessibility;
-using ::rtl::OUString;
using beans::PropertyValue;
using beans::XMultiPropertySet;
@@ -132,15 +121,15 @@ const SwTxtNode* SwAccessibleParagraph::GetTxtNode() const
return pNode;
}
-OUString SwAccessibleParagraph::GetString()
+::rtl::OUString SwAccessibleParagraph::GetString()
{
return GetPortionData().GetAccessibleString();
}
-OUString SwAccessibleParagraph::GetDescription()
+::rtl::OUString SwAccessibleParagraph::GetDescription()
{
// --> OD 2004-09-29 #117933# - provide empty description for paragraphs
- return OUString();
+ return ::rtl::OUString();
// <--
}
@@ -389,11 +378,11 @@ void SwAccessibleParagraph::GetStates(
void SwAccessibleParagraph::_InvalidateContent( sal_Bool bVisibleDataFired )
{
- OUString sOldText( GetString() );
+ ::rtl::OUString sOldText( GetString() );
ClearPortionData();
- const OUString& rText = GetString();
+ const ::rtl::OUString& rText = GetString();
if( rText != sOldText )
{
@@ -425,8 +414,8 @@ void SwAccessibleParagraph::_InvalidateContent( sal_Bool bVisibleDataFired )
if( bNewIsHeading != bOldIsHeading || rText != sOldText )
{
- OUString sNewDesc( GetDescription() );
- OUString sOldDesc;
+ ::rtl::OUString sNewDesc( GetDescription() );
+ ::rtl::OUString sOldDesc;
{
vos::OGuard aGuard( aMutex );
sOldDesc = sDesc;
@@ -503,19 +492,27 @@ void SwAccessibleParagraph::_InvalidateFocus()
}
SwAccessibleParagraph::SwAccessibleParagraph(
- SwAccessibleMap* pInitMap,
- const SwTxtFrm *pTxtFrm ) :
- SwAccessibleContext( pInitMap, AccessibleRole::PARAGRAPH, pTxtFrm ),
- pPortionData( NULL ),
- pHyperTextData( NULL ),
- nOldCaretPos( -1 ),
- aSelectionHelper( *this )
+ 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( OUString() );
+ SetName( ::rtl::OUString() );
// <--
// If this object has the focus, then it is remembered by the map itself.
@@ -528,6 +525,9 @@ SwAccessibleParagraph::~SwAccessibleParagraph()
delete pPortionData;
delete pHyperTextData;
+ // --> OD 2010-02-22 #i108125#
+ delete mpParaChangeTrackInfo;
+ // <--
}
sal_Bool SwAccessibleParagraph::HasCursor()
@@ -648,8 +648,8 @@ sal_Bool SwAccessibleParagraph::IsValidRange(
sal_Bool SwAccessibleParagraph::GetCharBoundary(
- Boundary& rBound,
- const OUString&,
+ i18n::Boundary& rBound,
+ const ::rtl::OUString&,
sal_Int32 nPos )
{
rBound.startPos = nPos;
@@ -658,8 +658,8 @@ sal_Bool SwAccessibleParagraph::GetCharBoundary(
}
sal_Bool SwAccessibleParagraph::GetWordBoundary(
- Boundary& rBound,
- const OUString& rText,
+ i18n::Boundary& rBound,
+ const ::rtl::OUString& rText,
sal_Int32 nPos )
{
sal_Bool bRet = sal_False;
@@ -671,12 +671,12 @@ sal_Bool SwAccessibleParagraph::GetWordBoundary(
{
// get locale for this position
USHORT nModelPos = GetPortionData().GetModelPosition( nPos );
- Locale aLocale = pBreakIt->GetLocale(
+ 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 USHORT nWordType = WordType::ANY_WORD;
+ const USHORT nWordType = i18n::WordType::ANY_WORD;
// get word boundary, as the Break-Iterator sees fit.
rBound = pBreakIt->GetBreakIter()->getWordBoundary(
@@ -697,8 +697,8 @@ sal_Bool SwAccessibleParagraph::GetWordBoundary(
}
sal_Bool SwAccessibleParagraph::GetSentenceBoundary(
- Boundary& rBound,
- const OUString&,
+ i18n::Boundary& rBound,
+ const ::rtl::OUString&,
sal_Int32 nPos )
{
GetPortionData().GetSentenceBoundary( rBound, nPos );
@@ -706,8 +706,8 @@ sal_Bool SwAccessibleParagraph::GetSentenceBoundary(
}
sal_Bool SwAccessibleParagraph::GetLineBoundary(
- Boundary& rBound,
- const OUString& rText,
+ i18n::Boundary& rBound,
+ const ::rtl::OUString& rText,
sal_Int32 nPos )
{
if( rText.getLength() == nPos )
@@ -718,8 +718,8 @@ sal_Bool SwAccessibleParagraph::GetLineBoundary(
}
sal_Bool SwAccessibleParagraph::GetParagraphBoundary(
- Boundary& rBound,
- const OUString& rText,
+ i18n::Boundary& rBound,
+ const ::rtl::OUString& rText,
sal_Int32 )
{
rBound.startPos = 0;
@@ -728,8 +728,8 @@ sal_Bool SwAccessibleParagraph::GetParagraphBoundary(
}
sal_Bool SwAccessibleParagraph::GetAttributeBoundary(
- Boundary& rBound,
- const OUString&,
+ i18n::Boundary& rBound,
+ const ::rtl::OUString&,
sal_Int32 nPos )
{
GetPortionData().GetAttributeBoundary( rBound, nPos );
@@ -737,8 +737,8 @@ sal_Bool SwAccessibleParagraph::GetAttributeBoundary(
}
sal_Bool SwAccessibleParagraph::GetGlyphBoundary(
- Boundary& rBound,
- const OUString& rText,
+ i18n::Boundary& rBound,
+ const ::rtl::OUString& rText,
sal_Int32 nPos )
{
sal_Bool bRet = sal_False;
@@ -751,11 +751,11 @@ sal_Bool SwAccessibleParagraph::GetGlyphBoundary(
{
// get locale for this position
USHORT nModelPos = GetPortionData().GetModelPosition( nPos );
- Locale aLocale = pBreakIt->GetLocale(
+ lang::Locale aLocale = pBreakIt->GetLocale(
GetTxtNode()->GetLang( nModelPos ) );
// get word boundary, as the Break-Iterator sees fit.
- const USHORT nIterMode = CharacterIteratorMode::SKIPCELL;
+ const USHORT nIterMode = i18n::CharacterIteratorMode::SKIPCELL;
sal_Int32 nDone = 0;
rBound.endPos = pBreakIt->GetBreakIter()->nextCharacters(
rText, nPos, aLocale, nIterMode, 1, nDone );
@@ -777,20 +777,20 @@ sal_Bool SwAccessibleParagraph::GetGlyphBoundary(
sal_Bool SwAccessibleParagraph::GetTextBoundary(
- Boundary& rBound,
- const OUString& rText,
+ i18n::Boundary& rBound,
+ const ::rtl::OUString& rText,
sal_Int32 nPos,
sal_Int16 nTextType )
throw (
- IndexOutOfBoundsException,
- IllegalArgumentException,
+ lang::IndexOutOfBoundsException,
+ lang::IllegalArgumentException,
uno::RuntimeException)
{
// error checking
if( !( AccessibleTextType::LINE == nTextType
? IsValidPosition( nPos, rText.getLength() )
: IsValidChar( nPos, rText.getLength() ) ) )
- throw IndexOutOfBoundsException();
+ throw lang::IndexOutOfBoundsException();
sal_Bool bRet;
@@ -825,13 +825,13 @@ sal_Bool SwAccessibleParagraph::GetTextBoundary(
break;
default:
- throw IllegalArgumentException( );
+ throw lang::IllegalArgumentException( );
}
return bRet;
}
-OUString SAL_CALL SwAccessibleParagraph::getAccessibleDescription (void)
+::rtl::OUString SAL_CALL SwAccessibleParagraph::getAccessibleDescription (void)
throw (uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
@@ -845,7 +845,7 @@ OUString SAL_CALL SwAccessibleParagraph::getAccessibleDescription (void)
return sDesc;
}
-Locale SAL_CALL SwAccessibleParagraph::getLocale (void)
+lang::Locale SAL_CALL SwAccessibleParagraph::getLocale (void)
throw (IllegalAccessibleComponentStateException, uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
@@ -857,7 +857,7 @@ Locale SAL_CALL SwAccessibleParagraph::getLocale (void)
}
const SwTxtNode *pTxtNd = pTxtFrm->GetTxtNode();
- Locale aLoc( pBreakIt->GetLocale( pTxtNd->GetLang( 0 ) ) );
+ lang::Locale aLoc( pBreakIt->GetLocale( pTxtNd->GetLang( 0 ) ) );
return aLoc;
}
@@ -1010,10 +1010,10 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getBackground()
}
// <--
-OUString SAL_CALL SwAccessibleParagraph::getImplementationName()
+::rtl::OUString SAL_CALL SwAccessibleParagraph::getImplementationName()
throw( uno::RuntimeException )
{
- return OUString(RTL_CONSTASCII_USTRINGPARAM(sImplementationName));
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sImplementationName));
}
sal_Bool SAL_CALL SwAccessibleParagraph::supportsService(
@@ -1026,13 +1026,13 @@ sal_Bool SAL_CALL SwAccessibleParagraph::supportsService(
sizeof(sAccessibleServiceName)-1 );
}
-Sequence< OUString > SAL_CALL SwAccessibleParagraph::getSupportedServiceNames()
+uno::Sequence< ::rtl::OUString > SAL_CALL SwAccessibleParagraph::getSupportedServiceNames()
throw( uno::RuntimeException )
{
- Sequence< OUString > aRet(2);
- OUString* pArray = aRet.getArray();
- pArray[0] = OUString( RTL_CONSTASCII_USTRINGPARAM(sServiceName) );
- pArray[1] = OUString( RTL_CONSTASCII_USTRINGPARAM(sAccessibleServiceName) );
+ 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;
}
@@ -1040,10 +1040,10 @@ Sequence< OUString > SAL_CALL SwAccessibleParagraph::getSupportedServiceNames()
//===== XInterface =======================================================
//
-Any SwAccessibleParagraph::queryInterface( const Type& rType )
- throw (RuntimeException)
+uno::Any SwAccessibleParagraph::queryInterface( const uno::Type& rType )
+ throw (uno::RuntimeException)
{
- Any aRet;
+ uno::Any aRet;
if ( rType == ::getCppuType((uno::Reference<XAccessibleText> *)0) )
{
uno::Reference<XAccessibleText> aAccText = (XAccessibleText *) *this; // resolve ambiguity
@@ -1095,9 +1095,9 @@ Any SwAccessibleParagraph::queryInterface( const Type& rType )
}
//====== XTypeProvider ====================================================
-Sequence< Type > SAL_CALL SwAccessibleParagraph::getTypes() throw(RuntimeException)
+uno::Sequence< uno::Type > SAL_CALL SwAccessibleParagraph::getTypes() throw(uno::RuntimeException)
{
- Sequence< Type > aTypes( SwAccessibleContext::getTypes() );
+ uno::Sequence< uno::Type > aTypes( SwAccessibleContext::getTypes() );
sal_Int32 nIndex = aTypes.getLength();
// --> OD 2006-07-13 #i63870#
@@ -1106,7 +1106,7 @@ Sequence< Type > SAL_CALL SwAccessibleParagraph::getTypes() throw(RuntimeExcepti
// add type accessibility::XAccessibleTextMarkup and accessibility::XAccessibleMultiLineText
aTypes.realloc( nIndex + 6 );
- Type* pTypes = aTypes.getArray();
+ 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 ) );
@@ -1118,11 +1118,11 @@ Sequence< Type > SAL_CALL SwAccessibleParagraph::getTypes() throw(RuntimeExcepti
return aTypes;
}
-Sequence< sal_Int8 > SAL_CALL SwAccessibleParagraph::getImplementationId()
- throw(RuntimeException)
+uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleParagraph::getImplementationId()
+ throw(uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
- static Sequence< sal_Int8 > aId( 16 );
+ static uno::Sequence< sal_Int8 > aId( 16 );
static sal_Bool bInit = sal_False;
if(!bInit)
{
@@ -1138,7 +1138,7 @@ Sequence< sal_Int8 > SAL_CALL SwAccessibleParagraph::getImplementationId()
//
sal_Int32 SwAccessibleParagraph::getCaretPosition()
- throw (RuntimeException)
+ throw (uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
@@ -1160,7 +1160,7 @@ sal_Int32 SwAccessibleParagraph::getCaretPosition()
}
sal_Bool SAL_CALL SwAccessibleParagraph::setCaretPosition( sal_Int32 nIndex )
- throw (IndexOutOfBoundsException, uno::RuntimeException)
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
@@ -1170,7 +1170,7 @@ sal_Bool SAL_CALL SwAccessibleParagraph::setCaretPosition( sal_Int32 nIndex )
sal_Int32 nLength = GetString().getLength();
if ( ! IsValidPosition( nIndex, nLength ) )
{
- throw IndexOutOfBoundsException();
+ throw lang::IndexOutOfBoundsException();
}
sal_Bool bRet = sal_False;
@@ -1193,13 +1193,13 @@ sal_Bool SAL_CALL SwAccessibleParagraph::setCaretPosition( sal_Int32 nIndex )
}
sal_Unicode SwAccessibleParagraph::getCharacter( sal_Int32 nIndex )
- throw (IndexOutOfBoundsException, uno::RuntimeException)
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
- OUString sText( GetString() );
+ ::rtl::OUString sText( GetString() );
// return character (if valid)
if( IsValidChar(nIndex, sText.getLength() ) )
@@ -1207,25 +1207,25 @@ sal_Unicode SwAccessibleParagraph::getCharacter( sal_Int32 nIndex )
return sText.getStr()[nIndex];
}
else
- throw IndexOutOfBoundsException();
+ throw lang::IndexOutOfBoundsException();
}
// --> OD 2006-07-20 #i63870#
// re-implement method on behalf of methods <_getDefaultAttributesImpl(..)> and
// <_getRunAttributesImpl(..)>
-Sequence<PropertyValue> SwAccessibleParagraph::getCharacterAttributes(
+uno::Sequence<PropertyValue> SwAccessibleParagraph::getCharacterAttributes(
sal_Int32 nIndex,
const uno::Sequence< ::rtl::OUString >& aRequestedAttributes )
- throw (IndexOutOfBoundsException, uno::RuntimeException)
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
- const OUString& rText = GetString();
+ const ::rtl::OUString& rText = GetString();
if( ! IsValidChar( nIndex, rText.getLength() ) )
- throw IndexOutOfBoundsException();
+ throw lang::IndexOutOfBoundsException();
// retrieve default character attributes
tAccParaPropValMap aDefAttrSeq;
@@ -1236,7 +1236,7 @@ Sequence<PropertyValue> SwAccessibleParagraph::getCharacterAttributes(
_getRunAttributesImpl( nIndex, aRequestedAttributes, aRunAttrSeq );
// merge default and run attributes
- Sequence< PropertyValue > aValues( aDefAttrSeq.size() );
+ uno::Sequence< PropertyValue > aValues( aDefAttrSeq.size() );
PropertyValue* pValues = aValues.getArray();
sal_Int32 i = 0;
for ( tAccParaPropValMap::const_iterator aDefIter = aDefAttrSeq.begin();
@@ -1354,7 +1354,7 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl(
const SfxPoolItem* pItem = pSet->GetItem( aPropIt->nWID );
if ( pItem )
{
- Any aVal;
+ uno::Any aVal;
pItem->QueryValue( aVal, aPropIt->nMemberId );
PropertyValue rPropVal;
@@ -1372,14 +1372,14 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl(
// add property value entry for the paragraph style
if ( !bOnlyCharAttrs && pTxtNode->GetTxtColl() )
{
- const OUString sParaStyleName =
- OUString::createFromAscii(
+ 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;
- Any aVal( makeAny( OUString( pTxtNode->GetTxtColl()->GetName() ) ) );
+ uno::Any aVal( uno::makeAny( ::rtl::OUString( pTxtNode->GetTxtColl()->GetName() ) ) );
rPropVal.Value = aVal;
rPropVal.Handle = -1;
rPropVal.State = beans::PropertyState_DEFAULT_VALUE;
@@ -1393,8 +1393,8 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl(
// resolve value text::WritingMode2::PAGE of property value entry WritingMode
if ( !bOnlyCharAttrs && GetFrm() )
{
- const OUString sWritingMode =
- OUString::createFromAscii(
+ const ::rtl::OUString sWritingMode =
+ ::rtl::OUString::createFromAscii(
GetPropName( UNO_NAME_WRITING_MODE ).pName );
tAccParaPropValMap::iterator aIter = aDefAttrSeq.find( sWritingMode );
if ( aIter != aDefAttrSeq.end() )
@@ -1447,7 +1447,7 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl(
}
else
{
- const OUString* pReqAttrs = aRequestedAttributes.getConstArray();
+ const ::rtl::OUString* pReqAttrs = aRequestedAttributes.getConstArray();
const sal_Int32 nLength = aRequestedAttributes.getLength();
for( sal_Int32 i = 0; i < nLength; ++i )
{
@@ -1460,8 +1460,8 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl(
}
}
-Sequence< PropertyValue > SwAccessibleParagraph::getDefaultAttributes(
- const Sequence< ::rtl::OUString >& aRequestedAttributes )
+uno::Sequence< PropertyValue > SwAccessibleParagraph::getDefaultAttributes(
+ const uno::Sequence< ::rtl::OUString >& aRequestedAttributes )
throw ( uno::RuntimeException )
{
vos::OGuard aGuard(Application::GetSolarMutex());
@@ -1470,7 +1470,30 @@ Sequence< PropertyValue > SwAccessibleParagraph::getDefaultAttributes(
tAccParaPropValMap aDefAttrSeq;
_getDefaultAttributesImpl( aRequestedAttributes, aDefAttrSeq );
- Sequence< PropertyValue > aValues( aDefAttrSeq.size() );
+ // --> 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();
@@ -1481,6 +1504,21 @@ Sequence< PropertyValue > SwAccessibleParagraph::getDefaultAttributes(
++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;
}
@@ -1544,7 +1582,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
uno::Sequence< ::rtl::OUString > aDummy;
_getDefaultAttributesImpl( aDummy, aDefAttrSeq, true );
// <--
-
+
const SfxItemPropertyMap* pPropMap =
aSwMapProvider.GetPropertySet( PROPERTY_MAP_TEXT_CURSOR )->getPropertyMap();
PropertyEntryVector_t aPropertyEntries = pPropMap->getPropertyEntries();
@@ -1557,7 +1595,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
// the corresponding default character attributes, are excluded.
if ( aSet.GetItemState( aPropIt->nWID, TRUE, &pItem ) == SFX_ITEM_SET )
{
- Any aVal;
+ uno::Any aVal;
pItem->QueryValue( aVal, aPropIt->nMemberId );
PropertyValue rPropVal;
@@ -1585,7 +1623,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
}
else
{
- const OUString* pReqAttrs = aRequestedAttributes.getConstArray();
+ const ::rtl::OUString* pReqAttrs = aRequestedAttributes.getConstArray();
const sal_Int32 nLength = aRequestedAttributes.getLength();
for( sal_Int32 i = 0; i < nLength; ++i )
{
@@ -1601,27 +1639,27 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
delete pPaM;
}
-Sequence< PropertyValue > SwAccessibleParagraph::getRunAttributes(
+uno::Sequence< PropertyValue > SwAccessibleParagraph::getRunAttributes(
sal_Int32 nIndex,
- const Sequence< ::rtl::OUString >& aRequestedAttributes )
- throw ( IndexOutOfBoundsException,
+ const uno::Sequence< ::rtl::OUString >& aRequestedAttributes )
+ throw ( lang::IndexOutOfBoundsException,
uno::RuntimeException )
{
vos::OGuard aGuard(Application::GetSolarMutex());
CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
{
- const OUString& rText = GetString();
+ const ::rtl::OUString& rText = GetString();
if ( !IsValidChar( nIndex, rText.getLength() ) )
{
- throw IndexOutOfBoundsException();
+ throw lang::IndexOutOfBoundsException();
}
}
tAccParaPropValMap aRunAttrSeq;
_getRunAttributesImpl( nIndex, aRequestedAttributes, aRunAttrSeq );
- Sequence< PropertyValue > aValues( aRunAttrSeq.size() );
+ uno::Sequence< PropertyValue > aValues( aRunAttrSeq.size() );
PropertyValue* pValues = aValues.getArray();
sal_Int32 i = 0;
for ( tAccParaPropValMap::const_iterator aIter = aRunAttrSeq.begin();
@@ -1638,7 +1676,7 @@ Sequence< PropertyValue > SwAccessibleParagraph::getRunAttributes(
awt::Rectangle SwAccessibleParagraph::getCharacterBounds(
sal_Int32 nIndex )
- throw (IndexOutOfBoundsException, uno::RuntimeException)
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
@@ -1649,7 +1687,7 @@ awt::Rectangle SwAccessibleParagraph::getCharacterBounds(
IsValidChar -> IsValidPosition
*/
if( ! (IsValidPosition( nIndex, GetString().getLength() ) ) )
- throw IndexOutOfBoundsException();
+ throw lang::IndexOutOfBoundsException();
/* #i12332# */
sal_Bool bBehindText = sal_False;
@@ -1689,7 +1727,7 @@ awt::Rectangle SwAccessibleParagraph::getCharacterBounds(
CHECK_FOR_WINDOW( XAccessibleComponent, pWin );
Rectangle aScreenRect( GetMap()->CoreToPixel( aCoreRect.SVRect() ));
- SwRect aFrmLogBounds( GetBounds() ); // twip rel to doc root
+ SwRect aFrmLogBounds( GetBounds( *(GetMap()) ) ); // twip rel to doc root
Point aFrmPixPos( GetMap()->CoreToPixel( aFrmLogBounds.SVRect() ).TopLeft() );
aScreenRect.Move( -aFrmPixPos.X(), -aFrmPixPos.Y() );
@@ -1701,7 +1739,7 @@ awt::Rectangle SwAccessibleParagraph::getCharacterBounds(
}
sal_Int32 SwAccessibleParagraph::getCharacterCount()
- throw (RuntimeException)
+ throw (uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
@@ -1711,7 +1749,7 @@ sal_Int32 SwAccessibleParagraph::getCharacterCount()
}
sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint )
- throw (RuntimeException)
+ throw (uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
@@ -1727,7 +1765,7 @@ sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint )
Window *pWin = GetWindow();
CHECK_FOR_WINDOW( XAccessibleComponent, pWin );
Point aPoint( rPoint.X, rPoint.Y );
- SwRect aLogBounds( GetBounds( GetFrm() ) ); // twip rel to doc root
+ 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();
@@ -1787,8 +1825,8 @@ sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint )
: -1L;
}
-OUString SwAccessibleParagraph::getSelectedText()
- throw (RuntimeException)
+::rtl::OUString SwAccessibleParagraph::getSelectedText()
+ throw (uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
@@ -1796,11 +1834,13 @@ OUString SwAccessibleParagraph::getSelectedText()
sal_Int32 nStart, nEnd;
sal_Bool bSelected = GetSelection( nStart, nEnd );
- return bSelected ? GetString().copy( nStart, nEnd - nStart ) : OUString();
+ return bSelected
+ ? GetString().copy( nStart, nEnd - nStart )
+ : ::rtl::OUString();
}
sal_Int32 SwAccessibleParagraph::getSelectionStart()
- throw (RuntimeException)
+ throw (uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
@@ -1812,7 +1852,7 @@ sal_Int32 SwAccessibleParagraph::getSelectionStart()
}
sal_Int32 SwAccessibleParagraph::getSelectionEnd()
- throw (RuntimeException)
+ throw (uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
@@ -1824,7 +1864,7 @@ sal_Int32 SwAccessibleParagraph::getSelectionEnd()
}
sal_Bool SwAccessibleParagraph::setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
- throw (IndexOutOfBoundsException, uno::RuntimeException)
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
@@ -1834,7 +1874,7 @@ sal_Bool SwAccessibleParagraph::setSelection( sal_Int32 nStartIndex, sal_Int32 n
sal_Int32 nLength = GetString().getLength();
if ( ! IsValidRange( nStartIndex, nEndIndex, nLength ) )
{
- throw IndexOutOfBoundsException();
+ throw lang::IndexOutOfBoundsException();
}
sal_Bool bRet = sal_False;
@@ -1859,8 +1899,8 @@ sal_Bool SwAccessibleParagraph::setSelection( sal_Int32 nStartIndex, sal_Int32 n
return bRet;
}
-OUString SwAccessibleParagraph::getText()
- throw (RuntimeException)
+::rtl::OUString SwAccessibleParagraph::getText()
+ throw (uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
@@ -1869,15 +1909,15 @@ OUString SwAccessibleParagraph::getText()
return GetString();
}
-OUString SwAccessibleParagraph::getTextRange(
+::rtl::OUString SwAccessibleParagraph::getTextRange(
sal_Int32 nStartIndex, sal_Int32 nEndIndex )
- throw (IndexOutOfBoundsException, uno::RuntimeException)
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
- OUString sText( GetString() );
+ ::rtl::OUString sText( GetString() );
if ( IsValidRange( nStartIndex, nEndIndex, sText.getLength() ) )
{
@@ -1885,7 +1925,7 @@ OUString SwAccessibleParagraph::getTextRange(
return sText.copy(nStartIndex, nEndIndex-nStartIndex );
}
else
- throw IndexOutOfBoundsException();
+ throw lang::IndexOutOfBoundsException();
}
/*accessibility::*/TextSegment SwAccessibleParagraph::getTextAtIndex( sal_Int32 nIndex, sal_Int16 nTextType ) throw (lang::IndexOutOfBoundsException, lang::IllegalArgumentException, uno::RuntimeException)
@@ -1898,7 +1938,7 @@ OUString SwAccessibleParagraph::getTextRange(
aResult.SegmentStart = -1;
aResult.SegmentEnd = -1;
- const OUString rText = GetString();
+ 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
@@ -1907,7 +1947,7 @@ OUString SwAccessibleParagraph::getTextRange(
return aResult;
// with error checking
- Boundary aBound;
+ i18n::Boundary aBound;
sal_Bool bWord = GetTextBoundary( aBound, rText, nIndex, nTextType );
DBG_ASSERT( aBound.startPos >= 0, "illegal boundary" );
@@ -1930,14 +1970,14 @@ OUString SwAccessibleParagraph::getTextRange(
CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
- const OUString rText = GetString();
+ const ::rtl::OUString rText = GetString();
/*accessibility::*/TextSegment aResult;
aResult.SegmentStart = -1;
aResult.SegmentEnd = -1;
// get starting pos
- Boundary aBound;
+ i18n::Boundary aBound;
if (nIndex == rText.getLength())
aBound.startPos = aBound.endPos = nIndex;
else
@@ -1977,7 +2017,7 @@ OUString SwAccessibleParagraph::getTextRange(
/*accessibility::*/TextSegment aResult;
aResult.SegmentStart = -1;
aResult.SegmentEnd = -1;
- const OUString rText = GetString();
+ const ::rtl::OUString rText = GetString();
// implement the silly specification that first position after
// text must return an empty string, rather than throwing an
@@ -1987,7 +2027,7 @@ OUString SwAccessibleParagraph::getTextRange(
// get first word, then skip to next word
- Boundary aBound;
+ i18n::Boundary aBound;
GetTextBoundary( aBound, rText, nIndex, nTextType );
sal_Bool bWord = sal_False;
while( !bWord )
@@ -2009,7 +2049,7 @@ OUString SwAccessibleParagraph::getTextRange(
}
sal_Bool SwAccessibleParagraph::copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
- throw (IndexOutOfBoundsException, uno::RuntimeException)
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
vos::OGuard aGuard(Application::GetSolarMutex());
@@ -2026,7 +2066,7 @@ sal_Bool SwAccessibleParagraph::copyText( sal_Int32 nStartIndex, sal_Int32 nEndI
//
sal_Bool SwAccessibleParagraph::cutText( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
- throw (IndexOutOfBoundsException, uno::RuntimeException)
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
CHECK_FOR_DEFUNC( XAccessibleEditableText );
vos::OGuard aGuard(Application::GetSolarMutex());
@@ -2041,7 +2081,7 @@ sal_Bool SwAccessibleParagraph::cutText( sal_Int32 nStartIndex, sal_Int32 nEndIn
}
sal_Bool SwAccessibleParagraph::pasteText( sal_Int32 nIndex )
- throw (IndexOutOfBoundsException, uno::RuntimeException)
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
CHECK_FOR_DEFUNC( XAccessibleEditableText );
vos::OGuard aGuard(Application::GetSolarMutex());
@@ -2056,27 +2096,27 @@ sal_Bool SwAccessibleParagraph::pasteText( sal_Int32 nIndex )
}
sal_Bool SwAccessibleParagraph::deleteText( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
- throw (IndexOutOfBoundsException, uno::RuntimeException)
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- return replaceText( nStartIndex, nEndIndex, OUString() );
+ return replaceText( nStartIndex, nEndIndex, ::rtl::OUString() );
}
-sal_Bool SwAccessibleParagraph::insertText( const OUString& sText, sal_Int32 nIndex )
- throw (IndexOutOfBoundsException, uno::RuntimeException)
+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 OUString& sReplacement )
- throw (IndexOutOfBoundsException, uno::RuntimeException)
+ const ::rtl::OUString& sReplacement )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
CHECK_FOR_DEFUNC( XAccessibleEditableText );
- const OUString& rText = GetString();
+ const ::rtl::OUString& rText = GetString();
if( IsValidRange( nStartIndex, nEndIndex, rText.getLength() ) )
{
@@ -2114,7 +2154,7 @@ sal_Bool SwAccessibleParagraph::replaceText(
return bSuccess;
}
else
- throw IndexOutOfBoundsException();
+ throw lang::IndexOutOfBoundsException();
}
struct IndexCompare
@@ -2131,16 +2171,16 @@ struct IndexCompare
sal_Bool SwAccessibleParagraph::setAttributes(
sal_Int32 nStartIndex,
sal_Int32 nEndIndex,
- const Sequence<PropertyValue>& rAttributeSet )
- throw (IndexOutOfBoundsException, uno::RuntimeException)
+ const uno::Sequence<PropertyValue>& rAttributeSet )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
CHECK_FOR_DEFUNC( XAccessibleEditableText );
- const OUString& rText = GetString();
+ const ::rtl::OUString& rText = GetString();
if( ! IsValidRange( nStartIndex, nEndIndex, rText.getLength() ) )
- throw IndexOutOfBoundsException();
+ throw lang::IndexOutOfBoundsException();
if( !IsEditableState() )
return sal_False;
@@ -2161,10 +2201,10 @@ sal_Bool SwAccessibleParagraph::setAttributes(
sort( &pIndices[0], &pIndices[nLength], IndexCompare(pPairs) );
// create sorted sequences accoring to index array
- Sequence<OUString> aNames( nLength );
- OUString* pNames = aNames.getArray();
- Sequence<Any> aValues( nLength );
- Any* pValues = aValues.getArray();
+ 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]];
@@ -2188,8 +2228,8 @@ sal_Bool SwAccessibleParagraph::setAttributes(
return bRet;
}
-sal_Bool SwAccessibleParagraph::setText( const OUString& sText )
- throw (RuntimeException)
+sal_Bool SwAccessibleParagraph::setText( const ::rtl::OUString& sText )
+ throw (uno::RuntimeException)
{
return replaceText(0, GetString().getLength(), sText);
}
@@ -2198,7 +2238,7 @@ sal_Bool SwAccessibleParagraph::setText( const OUString& sText )
void SwAccessibleParagraph::selectAccessibleChild(
sal_Int32 nChildIndex )
- throw ( IndexOutOfBoundsException,
+ throw ( lang::IndexOutOfBoundsException,
uno::RuntimeException )
{
CHECK_FOR_DEFUNC( XAccessibleSelection );
@@ -2208,7 +2248,7 @@ void SwAccessibleParagraph::selectAccessibleChild(
sal_Bool SwAccessibleParagraph::isAccessibleChildSelected(
sal_Int32 nChildIndex )
- throw ( IndexOutOfBoundsException,
+ throw ( lang::IndexOutOfBoundsException,
uno::RuntimeException )
{
CHECK_FOR_DEFUNC( XAccessibleSelection );
@@ -2242,7 +2282,7 @@ sal_Int32 SwAccessibleParagraph::getSelectedAccessibleChildCount( )
uno::Reference<XAccessible> SwAccessibleParagraph::getSelectedAccessibleChild(
sal_Int32 nSelectedChildIndex )
- throw ( IndexOutOfBoundsException,
+ throw ( lang::IndexOutOfBoundsException,
uno::RuntimeException)
{
CHECK_FOR_DEFUNC( XAccessibleSelection );
@@ -2253,7 +2293,7 @@ uno::Reference<XAccessible> SwAccessibleParagraph::getSelectedAccessibleChild(
// --> OD 2004-11-16 #111714# - index has to be treated as global child index.
void SwAccessibleParagraph::deselectAccessibleChild(
sal_Int32 nChildIndex )
- throw ( IndexOutOfBoundsException,
+ throw ( lang::IndexOutOfBoundsException,
uno::RuntimeException )
{
CHECK_FOR_DEFUNC( XAccessibleSelection );
@@ -2315,7 +2355,7 @@ const SwTxtAttr *SwHyperlinkIter_Impl::next()
};
sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkCount()
- throw (RuntimeException)
+ throw (uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
@@ -2337,7 +2377,7 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkCount()
uno::Reference< XAccessibleHyperlink > SAL_CALL
SwAccessibleParagraph::getHyperLink( sal_Int32 nLinkIndex )
- throw (IndexOutOfBoundsException, uno::RuntimeException)
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
CHECK_FOR_DEFUNC( XAccessibleHypertext );
@@ -2386,13 +2426,13 @@ uno::Reference< XAccessibleHyperlink > SAL_CALL
}
if( !xRet.is() )
- throw IndexOutOfBoundsException();
+ throw lang::IndexOutOfBoundsException();
return xRet;
}
sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkIndex( sal_Int32 nCharIndex )
- throw (IndexOutOfBoundsException, uno::RuntimeException)
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
CHECK_FOR_DEFUNC( XAccessibleHypertext );
@@ -2401,7 +2441,7 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkIndex( sal_Int32 nCharInde
sal_Int32 nLength = GetString().getLength();
if ( ! IsValidPosition( nCharIndex, nLength ) )
{
- throw IndexOutOfBoundsException();
+ throw lang::IndexOutOfBoundsException();
}
sal_Int32 nRet = -1;
@@ -2430,13 +2470,30 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkIndex( sal_Int32 nCharInde
}
// --> 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)
{
- SwTextMarkupHelper aTextMarkupHelper( *GetTxtNode(), GetPortionData() );
+ 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 aTextMarkupHelper.getTextMarkupCount( nTextMarkupType );
+ return pTextMarkupHelper->getTextMarkupCount( nTextMarkupType );
}
/*accessibility::*/TextSegment SAL_CALL
@@ -2446,9 +2503,25 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getTextMarkupCount( sal_Int32 nTextMar
lang::IllegalArgumentException,
uno::RuntimeException)
{
- SwTextMarkupHelper aTextMarkupHelper( *GetTxtNode(), GetPortionData() );
+ 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 aTextMarkupHelper.getTextMarkup( nTextMarkupIndex, nTextMarkupType );
+ return pTextMarkupHelper->getTextMarkup( nTextMarkupIndex, nTextMarkupType );
}
uno::Sequence< /*accessibility::*/TextSegment > SAL_CALL
@@ -2465,9 +2538,25 @@ uno::Sequence< /*accessibility::*/TextSegment > SAL_CALL
throw lang::IndexOutOfBoundsException();
}
- SwTextMarkupHelper aTextMarkupHelper( *GetTxtNode(), GetPortionData() );
+ 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 aTextMarkupHelper.getTextMarkupAtIndex( nCharIndex, nTextMarkupType );
+ return pTextMarkupHelper->getTextMarkupAtIndex( nCharIndex, nTextMarkupType );
}
// <--
@@ -2499,7 +2588,7 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getLineNumberAtIndex( sal_Int32 nIndex
throw lang::IndexOutOfBoundsException();
}
- Boundary aLineBound;
+ i18n::Boundary aLineBound;
GetPortionData().GetBoundaryOfLine( nLineNo, aLineBound );
/*accessibility::*/TextSegment aTextAtLine;
@@ -2541,7 +2630,7 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getNumberOfLineWithCaret()
// special handling for cursor positioned at end of text line via End key
if ( nCaretPos != 0 )
{
- Boundary aLineBound;
+ i18n::Boundary aLineBound;
GetPortionData().GetBoundaryOfLine( nLineNo, aLineBound );
if ( nCaretPos == aLineBound.startPos )
{
@@ -2557,7 +2646,7 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getNumberOfLineWithCaret()
Rectangle aScreenRect( GetMap()->CoreToPixel( aCursorCoreRect.SVRect() ));
- SwRect aFrmLogBounds( GetBounds() ); // twip rel to doc root
+ SwRect aFrmLogBounds( GetBounds( *(GetMap()) ) ); // twip rel to doc root
Point aFrmPixPos( GetMap()->CoreToPixel( aFrmLogBounds.SVRect() ).TopLeft() );
aScreenRect.Move( -aFrmPixPos.X(), -aFrmPixPos.Y() );
@@ -2579,4 +2668,11 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getNumberOfLineWithCaret()
return nLineNo;
}
+// --> OD 2010-02-19 #i108125#
+void SwAccessibleParagraph::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
+{
+ mpParaChangeTrackInfo->reset();
+
+ SwClient::Modify( pOld, pNew );
+}
// <--
diff --git a/sw/source/core/access/accpara.hxx b/sw/source/core/access/accpara.hxx
index ef87275fe9..037c731169 100644
--- a/sw/source/core/access/accpara.hxx
+++ b/sw/source/core/access/accpara.hxx
@@ -26,24 +26,19 @@
************************************************************************/
#ifndef _ACCPARA_HXX
#define _ACCPARA_HXX
-#ifndef _ACCCONTEXT_HXX
-#include "acccontext.hxx"
-#endif
+
+#include <acccontext.hxx>
#include <com/sun/star/accessibility/XAccessibleEditableText.hpp>
#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
#include <com/sun/star/accessibility/XAccessibleHypertext.hpp>
-// --> OD 2008-05-19 #i71360#
#include <com/sun/star/accessibility/XAccessibleTextMarkup.hpp>
-// <--
-// --> OD 2008-05-29 #i89175#
#include <com/sun/star/accessibility/XAccessibleMultiLineText.hpp>
-// <--
-
-// --> OD 2006-07-11 #i63870#
#include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp>
#include <hash_map>
+#include <accselectionhelper.hxx>
+// --> OD 2010-02-19 #i108125#
+#include <calbck.hxx>
// <--
-#include "accselectionhelper.hxx"
class SwTxtFrm;
class SwTxtNode;
@@ -51,6 +46,10 @@ 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; }
@@ -63,19 +62,16 @@ typedef ::std::hash_map< ::rtl::OUString,
::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,
- // --> OD 2008-05-19 #i71360#
public com::sun::star::accessibility::XAccessibleTextMarkup,
- // <--
- // --> OD 2008-05-29 #i89175#
public com::sun::star::accessibility::XAccessibleMultiLineText,
- // <--
- // --> OD 2006-07-11 #i63870#
public ::com::sun::star::accessibility::XAccessibleTextAttributes
- // <--
{
friend class SwAccessibleHyperlink;
@@ -98,6 +94,9 @@ class SwAccessibleParagraph :
// implementation for XAccessibleSelection
SwAccessibleSelectionHelper aSelectionHelper;
+ // --> OD 2010-02-19 #i108125#
+ SwParaChangeTrackingInfo* mpParaChangeTrackInfo;
+ // <--
/// get the SwTxtNode (requires frame; check before)
const SwTxtNode* GetTxtNode() const;
@@ -237,13 +236,17 @@ protected:
public:
- SwAccessibleParagraph( SwAccessibleMap* pInitMap,
- const SwTxtFrm *pTxtFrm );
+ SwAccessibleParagraph( SwAccessibleMap& rInitMap,
+ const SwTxtFrm& rTxtFrm );
inline operator ::com::sun::star::accessibility::XAccessibleText *();
virtual sal_Bool HasCursor(); // required by map to remember that object
+ // --> OD 2010-02-19 #i108125#
+ virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew);
+ // <--
+
//===== XAccessibleContext ==============================================
/// Return this object's description.
diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx
index 0586210675..2d216533f1 100644
--- a/sw/source/core/access/accportions.cxx
+++ b/sw/source/core/access/accportions.cxx
@@ -259,12 +259,6 @@ sal_Bool SwAccessiblePortionData::IsReadOnlyPortion( size_t nPortionNo ) const
return IsPortionAttrSet(nPortionNo, PORATTR_READONLY);
}
-sal_Bool SwAccessiblePortionData::IsGrayPortion( size_t nPortionNo ) const
-{
- return IsPortionAttrSet(nPortionNo, PORATTR_GRAY);
-}
-
-
sal_Bool SwAccessiblePortionData::IsGrayPortionType( USHORT nType ) const
{
// gray portions?
diff --git a/sw/source/core/access/accportions.hxx b/sw/source/core/access/accportions.hxx
index f27d11617d..1fff00dd1a 100644
--- a/sw/source/core/access/accportions.hxx
+++ b/sw/source/core/access/accportions.hxx
@@ -90,7 +90,6 @@ class SwAccessiblePortionData : public SwPortionHandler
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 IsGrayPortion( size_t nPortionNo ) const;
sal_Bool IsGrayPortionType( USHORT nType ) const;
// helper method for GetEditableRange(...):
diff --git a/sw/source/core/access/accselectionhelper.cxx b/sw/source/core/access/accselectionhelper.cxx
index bb0bc084f9..93fac143e8 100644
--- a/sw/source/core/access/accselectionhelper.cxx
+++ b/sw/source/core/access/accselectionhelper.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -32,15 +32,14 @@
#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
#include <accselectionhelper.hxx>
-#ifndef _ACCCONTEXT_HXX
#include <acccontext.hxx>
-#endif
#include <accmap.hxx>
#include <svx/AccessibleShape.hxx>
#include <viewsh.hxx>
-#include "fesh.hxx"
+#include <fesh.hxx>
#include <vcl/svapp.hxx> // for SolarMutex
#include <tools/debug.hxx>
+#include <flyfrm.hxx>
using namespace ::com::sun::star;
@@ -50,7 +49,7 @@ 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 ) :
@@ -100,7 +99,8 @@ void SwAccessibleSelectionHelper::selectAccessibleChild(
vos::OGuard aGuard(Application::GetSolarMutex());
// Get the respective child as SwFrm (also do index checking), ...
- const SwFrmOrObj aChild = rContext.GetChild( nChildIndex );
+ const SwAccessibleChild aChild = rContext.GetChild( *(rContext.GetMap()),
+ nChildIndex );
if( !aChild.IsValid() )
throwIndexOutOfBoundsException();
@@ -110,7 +110,7 @@ void SwAccessibleSelectionHelper::selectAccessibleChild(
SwFEShell* pFEShell = GetFEShell();
if( pFEShell != NULL )
{
- const SdrObject *pObj = aChild.GetSdrObject();
+ const SdrObject *pObj = aChild.GetDrawObject();
if( pObj )
{
bRet = rContext.Select( const_cast< SdrObject *>( pObj ), 0==aChild.GetSwFrm());
@@ -129,7 +129,8 @@ sal_Bool SwAccessibleSelectionHelper::isAccessibleChildSelected(
vos::OGuard aGuard(Application::GetSolarMutex());
// Get the respective child as SwFrm (also do index checking), ...
- const SwFrmOrObj aChild = rContext.GetChild( nChildIndex );
+ const SwAccessibleChild aChild = rContext.GetChild( *(rContext.GetMap()),
+ nChildIndex );
if( !aChild.IsValid() )
throwIndexOutOfBoundsException();
@@ -138,13 +139,13 @@ sal_Bool SwAccessibleSelectionHelper::isAccessibleChildSelected(
SwFEShell* pFEShell = GetFEShell();
if( pFEShell )
{
- if( aChild.GetSwFrm() != 0 )
+ if ( aChild.GetSwFrm() != 0 )
{
bRet = (pFEShell->GetCurrFlyFrm() == aChild.GetSwFrm());
}
- else
+ else if ( aChild.GetDrawObject() )
{
- bRet = pFEShell->IsObjSelected( *aChild.GetSdrObject() );
+ bRet = pFEShell->IsObjSelected( *aChild.GetDrawObject() );
}
}
@@ -168,15 +169,15 @@ void SwAccessibleSelectionHelper::selectAllAccessibleChildren( )
SwFEShell* pFEShell = GetFEShell();
if( pFEShell )
{
- ::std::list< SwFrmOrObj > aChildren;
- rContext.GetChildren( aChildren );
+ ::std::list< SwAccessibleChild > aChildren;
+ rContext.GetChildren( *(rContext.GetMap()), aChildren );
- ::std::list< SwFrmOrObj >::const_iterator aIter = aChildren.begin();
- ::std::list< SwFrmOrObj >::const_iterator aEndIter = aChildren.end();
+ ::std::list< SwAccessibleChild >::const_iterator aIter = aChildren.begin();
+ ::std::list< SwAccessibleChild >::const_iterator aEndIter = aChildren.end();
while( aIter != aEndIter )
{
- const SwFrmOrObj& rChild = *aIter;
- const SdrObject *pObj = rChild.GetSdrObject();
+ const SwAccessibleChild& rChild = *aIter;
+ const SdrObject* pObj = rChild.GetDrawObject();
const SwFrm* pFrm = rChild.GetSwFrm();
if( pObj && !(pFrm != 0 && pFEShell->IsObjSelected()) )
{
@@ -200,11 +201,11 @@ sal_Int32 SwAccessibleSelectionHelper::getSelectedAccessibleChildCount( )
SwFEShell* pFEShell = GetFEShell();
if( pFEShell != 0 )
{
- const SwFlyFrm *pFlyFrm = pFEShell->GetCurrFlyFrm();
+ const SwFlyFrm* pFlyFrm = pFEShell->GetCurrFlyFrm();
if( pFlyFrm )
{
- if( rContext.GetParent(pFlyFrm, rContext.IsInPagePreview()) ==
- rContext.GetFrm() )
+ if( rContext.GetParent( SwAccessibleChild(pFlyFrm), rContext.IsInPagePreview()) ==
+ rContext.GetFrm() )
{
nCount = 1;
}
@@ -214,20 +215,20 @@ sal_Int32 SwAccessibleSelectionHelper::getSelectedAccessibleChildCount( )
sal_uInt16 nSelObjs = pFEShell->IsObjSelected();
if( nSelObjs > 0 )
{
- ::std::list< SwFrmOrObj > aChildren;
- rContext.GetChildren( aChildren );
+ ::std::list< SwAccessibleChild > aChildren;
+ rContext.GetChildren( *(rContext.GetMap()), aChildren );
- ::std::list< SwFrmOrObj >::const_iterator aIter =
+ ::std::list< SwAccessibleChild >::const_iterator aIter =
aChildren.begin();
- ::std::list< SwFrmOrObj >::const_iterator aEndIter =
+ ::std::list< SwAccessibleChild >::const_iterator aEndIter =
aChildren.end();
while( aIter != aEndIter && nCount < nSelObjs )
{
- const SwFrmOrObj& rChild = *aIter;
- if( rChild.GetSdrObject() && !rChild.GetSwFrm() &&
+ const SwAccessibleChild& rChild = *aIter;
+ if( rChild.GetDrawObject() && !rChild.GetSwFrm() &&
rContext.GetParent(rChild, rContext.IsInPagePreview())
== rContext.GetFrm() &&
- pFEShell->IsObjSelected( *rChild.GetSdrObject() ) )
+ pFEShell->IsObjSelected( *rChild.GetDrawObject() ) )
{
nCount++;
}
@@ -254,12 +255,12 @@ Reference<XAccessible> SwAccessibleSelectionHelper::getSelectedAccessibleChild(
if( 0 == pFEShell )
throwIndexOutOfBoundsException();
- SwFrmOrObj aChild;
+ SwAccessibleChild aChild;
const SwFlyFrm *pFlyFrm = pFEShell->GetCurrFlyFrm();
if( pFlyFrm )
{
if( 0 == nSelectedChildIndex &&
- rContext.GetParent(pFlyFrm, rContext.IsInPagePreview()) ==
+ rContext.GetParent( SwAccessibleChild(pFlyFrm), rContext.IsInPagePreview()) ==
rContext.GetFrm() )
{
aChild = pFlyFrm;
@@ -271,18 +272,18 @@ Reference<XAccessible> SwAccessibleSelectionHelper::getSelectedAccessibleChild(
if( 0 == nSelObjs || nSelectedChildIndex >= nSelObjs )
throwIndexOutOfBoundsException();
- ::std::list< SwFrmOrObj > aChildren;
- rContext.GetChildren( aChildren );
+ ::std::list< SwAccessibleChild > aChildren;
+ rContext.GetChildren( *(rContext.GetMap()), aChildren );
- ::std::list< SwFrmOrObj >::const_iterator aIter = aChildren.begin();
- ::std::list< SwFrmOrObj >::const_iterator aEndIter = aChildren.end();
+ ::std::list< SwAccessibleChild >::const_iterator aIter = aChildren.begin();
+ ::std::list< SwAccessibleChild >::const_iterator aEndIter = aChildren.end();
while( aIter != aEndIter && !aChild.IsValid() )
{
- const SwFrmOrObj& rChild = *aIter;
- if( rChild.GetSdrObject() && !rChild.GetSwFrm() &&
+ const SwAccessibleChild& rChild = *aIter;
+ if( rChild.GetDrawObject() && !rChild.GetSwFrm() &&
rContext.GetParent(rChild, rContext.IsInPagePreview()) ==
rContext.GetFrm() &&
- pFEShell->IsObjSelected( *rChild.GetSdrObject() ) )
+ pFEShell->IsObjSelected( *rChild.GetDrawObject() ) )
{
if( 0 == nSelectedChildIndex )
aChild = rChild;
@@ -309,10 +310,10 @@ Reference<XAccessible> SwAccessibleSelectionHelper::getSelectedAccessibleChild(
xChild = xChildImpl.getBodyPtr();
}
}
- else
+ else if ( aChild.GetDrawObject() )
{
::vos::ORef < ::accessibility::AccessibleShape > xChildImpl(
- rContext.GetMap()->GetContextImpl( aChild.GetSdrObject(),
+ rContext.GetMap()->GetContextImpl( aChild.GetDrawObject(),
&rContext, sal_True ) );
if( xChildImpl.isValid() )
xChild = xChildImpl.getBodyPtr();
@@ -328,6 +329,6 @@ void SwAccessibleSelectionHelper::deselectAccessibleChild(
{
// return sal_False // we can't deselect
if( nChildIndex < 0 ||
- nChildIndex >= rContext.GetChildCount() )
+ nChildIndex >= rContext.GetChildCount( *(rContext.GetMap()) ) )
throwIndexOutOfBoundsException();
}
diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx
index e3908d6741..3b4eaab066 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,26 +42,25 @@
#include <vcl/svapp.hxx>
#include <frmfmt.hxx>
#include <tabfrm.hxx>
-// --> OD 2007-06-27 #i77106#
#include <rowfrm.hxx>
-// <--
#include <cellfrm.hxx>
#include <swtable.hxx>
-#include "crsrsh.hxx"
-#include "viscrs.hxx"
+#include <crsrsh.hxx>
+#include <viscrs.hxx>
#include <hints.hxx>
-#include "fesh.hxx"
+#include <fesh.hxx>
#include <accfrmobjslist.hxx>
-#include "accmap.hxx"
-#ifndef _ACCESS_HRC
-#include "access.hrc"
-#endif
+#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";
@@ -83,15 +82,14 @@ public:
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;
- // --> OD 2007-06-27 #i77106#
bool mbOnlyTableColumnHeader;
- // <--
void CollectData( const SwFrm *pFrm );
void CollectExtents( const SwFrm *pFrm );
@@ -114,7 +112,8 @@ class SwAccessibleTableData_Impl
public:
// --> OD 2007-06-27 #i77106#
// add third optional parameter <bOnlyTableColumnHeader>, default value <false>
- SwAccessibleTableData_Impl( const SwTabFrm *pTabFrm,
+ SwAccessibleTableData_Impl( SwAccessibleMap& rAccMap,
+ const SwTabFrm *pTabFrm,
sal_Bool bIsInPagePreview,
bool bOnlyTableColumnHeader = false );
// <--
@@ -154,12 +153,12 @@ public:
void SwAccessibleTableData_Impl::CollectData( const SwFrm *pFrm )
{
- const SwFrmOrObjSList aList( pFrm );
- SwFrmOrObjSList::const_iterator aIter( aList.begin() );
- SwFrmOrObjSList::const_iterator aEndIter( aList.end() );
+ const SwAccessibleChildSList aList( *pFrm, mrAccMap );
+ SwAccessibleChildSList::const_iterator aIter( aList.begin() );
+ SwAccessibleChildSList::const_iterator aEndIter( aList.end() );
while( aIter != aEndIter )
{
- const SwFrmOrObj& rLower = *aIter;
+ const SwAccessibleChild& rLower = *aIter;
const SwFrm *pLower = rLower.GetSwFrm();
if( pLower )
{
@@ -189,12 +188,12 @@ void SwAccessibleTableData_Impl::CollectData( const SwFrm *pFrm )
void SwAccessibleTableData_Impl::CollectExtents( const SwFrm *pFrm )
{
- const SwFrmOrObjSList aList( pFrm );
- SwFrmOrObjSList::const_iterator aIter( aList.begin() );
- SwFrmOrObjSList::const_iterator aEndIter( aList.end() );
+ const SwAccessibleChildSList aList( *pFrm, mrAccMap );
+ SwAccessibleChildSList::const_iterator aIter( aList.begin() );
+ SwAccessibleChildSList::const_iterator aEndIter( aList.end() );
while( aIter != aEndIter )
{
- const SwFrmOrObj& rLower = *aIter;
+ const SwAccessibleChild& rLower = *aIter;
const SwFrm *pLower = rLower.GetSwFrm();
if( pLower )
{
@@ -230,12 +229,12 @@ sal_Bool SwAccessibleTableData_Impl::FindCell(
{
sal_Bool bFound = sal_False;
- const SwFrmOrObjSList aList( pFrm );
- SwFrmOrObjSList::const_iterator aIter( aList.begin() );
- SwFrmOrObjSList::const_iterator aEndIter( aList.end() );
+ const SwAccessibleChildSList aList( *pFrm, mrAccMap );
+ SwAccessibleChildSList::const_iterator aIter( aList.begin() );
+ SwAccessibleChildSList::const_iterator aEndIter( aList.end() );
while( !bFound && aIter != aEndIter )
{
- const SwFrmOrObj& rLower = *aIter;
+ const SwAccessibleChild& rLower = *aIter;
const SwFrm *pLower = rLower.GetSwFrm();
ASSERT( pLower, "child should be a frame" );
if( pLower )
@@ -282,15 +281,15 @@ void SwAccessibleTableData_Impl::GetSelection(
SwAccTableSelHander_Impl& rSelHdl,
sal_Bool bColumns ) const
{
- const SwFrmOrObjSList aList( pFrm );
- SwFrmOrObjSList::const_iterator aIter( aList.begin() );
- SwFrmOrObjSList::const_iterator aEndIter( aList.end() );
+ const SwAccessibleChildSList aList( *pFrm, mrAccMap );
+ SwAccessibleChildSList::const_iterator aIter( aList.begin() );
+ SwAccessibleChildSList::const_iterator aEndIter( aList.end() );
while( aIter != aEndIter )
{
- const SwFrmOrObj& rLower = *aIter;
+ const SwAccessibleChild& rLower = *aIter;
const SwFrm *pLower = rLower.GetSwFrm();
ASSERT( pLower, "child should be a frame" );
- const SwRect& rBox = rLower.GetBox();
+ const SwRect& rBox = rLower.GetBox( mrAccMap );
if( pLower && rBox.IsOver( rArea ) )
{
if( rLower.IsAccessible( mbIsInPagePreview ) )
@@ -430,15 +429,15 @@ sal_Bool SwAccessibleTableData_Impl::CompareExtents(
return sal_True;
}
-SwAccessibleTableData_Impl::SwAccessibleTableData_Impl( const SwTabFrm *pTabFrm,
+SwAccessibleTableData_Impl::SwAccessibleTableData_Impl( SwAccessibleMap& rAccMap,
+ const SwTabFrm *pTabFrm,
sal_Bool bIsInPagePreview,
bool bOnlyTableColumnHeader )
- : maTabFrmPos( pTabFrm->Frm().Pos() ),
- mpTabFrm( pTabFrm ),
- mbIsInPagePreview( bIsInPagePreview ),
- // --> OD 2007-06-27 #i77106#
- mbOnlyTableColumnHeader( bOnlyTableColumnHeader )
- // <--
+ : mrAccMap( rAccMap )
+ , maTabFrmPos( pTabFrm->Frm().Pos() )
+ , mpTabFrm( pTabFrm )
+ , mbIsInPagePreview( bIsInPagePreview )
+ , mbOnlyTableColumnHeader( bOnlyTableColumnHeader )
{
CollectData( mpTabFrm );
CollectExtents( mpTabFrm );
@@ -641,7 +640,7 @@ const SwTableBox* SwAccessibleTable::GetTableBox( sal_Int32 nChildIndex ) const
const SwTableBox* pBox = NULL;
// get table box for 'our' table cell
- SwFrmOrObj aCell( GetChild( nChildIndex ) );
+ SwAccessibleChild aCell( GetChild( *(const_cast<SwAccessibleMap*>(GetMap())), nChildIndex ) );
if( aCell.GetSwFrm() )
{
const SwFrm* pChildFrm = aCell.GetSwFrm();
@@ -855,7 +854,7 @@ uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleTable::getImplementationId()
SwAccessibleTableData_Impl* SwAccessibleTable::CreateNewTableData()
{
const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>( GetFrm() );
- return new SwAccessibleTableData_Impl( pTabFrm, IsInPagePreview() );
+ return new SwAccessibleTableData_Impl( *GetMap(), pTabFrm, IsInPagePreview() );
}
// <--
@@ -907,24 +906,72 @@ OUString SAL_CALL SwAccessibleTable::getAccessibleRowDescription(
sal_Int32 nRow )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- // TODO: Is there any reasonable we can do here?
- OUString sTmpDesc;
+ // --> 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);
- return sTmpDesc;
+ 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)
{
- // TODO: Is there any reasonable we can do here?
- OUString sTmpDesc;
+ // --> 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);
- return sTmpDesc;
+ 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(
@@ -1001,9 +1048,18 @@ uno::Reference< XAccessibleTable > SAL_CALL
SwAccessibleTable::getAccessibleColumnHeaders( )
throw (uno::RuntimeException)
{
- // --> OD 2007-06-29 #i77106#
- return new SwAccessibleTableColHeaders(
- GetMap(), static_cast< const SwTabFrm *>( GetFrm() ) );
+ // --> 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()
@@ -1176,9 +1232,11 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleIndex(
CHECK_FOR_DEFUNC( XAccessibleTable )
- SwFrmOrObj aCell( GetTableData().GetCell( nRow, nColumn, sal_False, this ));
- if( aCell.IsValid() )
- nRet = GetChildIndex( aCell );
+ SwAccessibleChild aCell( GetTableData().GetCell( nRow, nColumn, sal_False, this ));
+ if ( aCell.IsValid() )
+ {
+ nRet = GetChildIndex( *(GetMap()), aCell );
+ }
return nRet;
}
@@ -1200,8 +1258,8 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleRow( sal_Int32 nChildIndex )
}
// <--
- SwFrmOrObj aCell( GetChild( nChildIndex ) );
- if( aCell.GetSwFrm() )
+ SwAccessibleChild aCell( GetChild( *(GetMap()), nChildIndex ) );
+ if ( aCell.GetSwFrm() )
{
sal_Int32 nTop = aCell.GetSwFrm()->Frm().Top();
nTop -= GetFrm()->Frm().Top();
@@ -1239,8 +1297,8 @@ sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleColumn(
}
// <--
- SwFrmOrObj aCell( GetChild( nChildIndex ) );
- if( aCell.GetSwFrm() )
+ SwAccessibleChild aCell( GetChild( *(GetMap()), nChildIndex ) );
+ if ( aCell.GetSwFrm() )
{
sal_Int32 nLeft = aCell.GetSwFrm()->Frm().Left();
nLeft -= GetFrm()->Frm().Left();
@@ -1307,8 +1365,8 @@ void SwAccessibleTable::Dispose( sal_Bool bRecursive )
SwAccessibleContext::Dispose( bRecursive );
}
-void SwAccessibleTable::DisposeChild( const SwFrmOrObj& rChildFrmOrObj,
- sal_Bool bRecursive )
+void SwAccessibleTable::DisposeChild( const SwAccessibleChild& rChildFrmOrObj,
+ sal_Bool bRecursive )
{
vos::OGuard aGuard(Application::GetSolarMutex());
@@ -1330,7 +1388,7 @@ void SwAccessibleTable::DisposeChild( const SwFrmOrObj& rChildFrmOrObj,
SwAccessibleContext::DisposeChild( rChildFrmOrObj, bRecursive );
}
-void SwAccessibleTable::InvalidateChildPosOrSize( const SwFrmOrObj& rChildFrmOrObj,
+void SwAccessibleTable::InvalidateChildPosOrSize( const SwAccessibleChild& rChildFrmOrObj,
const SwRect& rOldBox )
{
vos::OGuard aGuard(Application::GetSolarMutex());
@@ -1358,15 +1416,9 @@ void SwAccessibleTable::InvalidateChildPosOrSize( const SwFrmOrObj& rChildFrmOrO
}
}
- // 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
- ASSERT( rChildFrmOrObj.GetSwFrm(), "frame expected" );
- uno::Reference< XAccessible > xAcc( GetMap()->GetContext( rChildFrmOrObj.GetSwFrm(), sal_False ) );
- if( !xAcc.is() )
- SwAccessibleContext::InvalidateChildPosOrSize( rChildFrmOrObj, rOldBox );
+ // --> OD 2010-02-18 #i013961# - always call super class method
+ SwAccessibleContext::InvalidateChildPosOrSize( rChildFrmOrObj, rOldBox );
+ // <--
}
@@ -1661,7 +1713,7 @@ SwAccessibleTableColHeaders::SwAccessibleTableColHeaders( SwAccessibleMap *pMap2
SwAccessibleTableData_Impl* SwAccessibleTableColHeaders::CreateNewTableData()
{
const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>( GetFrm() );
- return new SwAccessibleTableData_Impl( pTabFrm, IsInPagePreview(), true );
+ return new SwAccessibleTableData_Impl( *(GetMap()), pTabFrm, IsInPagePreview(), true );
}
@@ -1687,11 +1739,11 @@ sal_Int32 SAL_CALL SwAccessibleTableColHeaders::getAccessibleChildCount(void)
sal_Int32 nCount = 0;
const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>( GetFrm() );
- const SwFrmOrObjSList aVisList( GetVisArea(), pTabFrm );
- SwFrmOrObjSList::const_iterator aIter( aVisList.begin() );
+ const SwAccessibleChildSList aVisList( GetVisArea(), *pTabFrm, *(GetMap()) );
+ SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
while( aIter != aVisList.end() )
{
- const SwFrmOrObj& rLower = *aIter;
+ const SwAccessibleChild& rLower = *aIter;
if( rLower.IsAccessible( IsInPagePreview() ) )
{
nCount++;
@@ -1702,7 +1754,8 @@ sal_Int32 SAL_CALL SwAccessibleTableColHeaders::getAccessibleChildCount(void)
if ( !rLower.GetSwFrm()->IsRowFrm() ||
pTabFrm->IsInHeadline( *(rLower.GetSwFrm()) ) )
{
- nCount += SwAccessibleFrame::GetChildCount( GetVisArea(),
+ nCount += SwAccessibleFrame::GetChildCount( *(GetMap()),
+ GetVisArea(),
rLower.GetSwFrm(),
IsInPagePreview() );
}
diff --git a/sw/source/core/access/acctable.hxx b/sw/source/core/access/acctable.hxx
index 93c0725ae1..8a0acc24ba 100644
--- a/sw/source/core/access/acctable.hxx
+++ b/sw/source/core/access/acctable.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -29,13 +29,16 @@
#include <com/sun/star/accessibility/XAccessibleTable.hpp>
#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
-#ifndef _ACCCONTEXT_HXX
-#include "acccontext.hxx"
-#endif
+#include <acccontext.hxx>
class SwTabFrm;
class SwAccessibleTableData_Impl;
class SwTableBox;
+class SwSelBoxes;
+
+namespace sw { namespace access {
+ class SwAccessibleChild;
+} }
class SwAccessibleTable :
public SwAccessibleContext,
@@ -218,9 +221,10 @@ public:
// The object is not visible an longer and should be destroyed
virtual void Dispose( sal_Bool bRecursive = sal_False );
- virtual void DisposeChild( const SwFrmOrObj& rFrmOrObj, sal_Bool bRecursive );
- virtual void InvalidateChildPosOrSize( const SwFrmOrObj& rFrmOrObj,
- const SwRect& rFrm );
+ virtual void DisposeChild( const sw::access::SwAccessibleChild& rFrmOrObj,
+ sal_Bool bRecursive );
+ virtual void InvalidateChildPosOrSize( const sw::access::SwAccessibleChild& rFrmOrObj,
+ const SwRect& rFrm );
//===== XAccessibleSelection ============================================
diff --git a/sw/source/core/access/makefile.mk b/sw/source/core/access/makefile.mk
index 20ffdad321..72871314f7 100644
--- a/sw/source/core/access/makefile.mk
+++ b/sw/source/core/access/makefile.mk
@@ -63,7 +63,8 @@ SLOFILES = \
$(SLO)$/accselectionhelper.obj \
$(SLO)$/acctable.obj \
$(SLO)$/acctextframe.obj \
- $(SLO)$/textmarkuphelper.obj
+ $(SLO)$/textmarkuphelper.obj \
+ $(SLO)$/parachangetrackinginfo.obj
EXCEPTIONSFILES= \
$(SLO)$/acccell.obj \
@@ -89,7 +90,8 @@ EXCEPTIONSFILES= \
$(SLO)$/accselectionhelper.obj \
$(SLO)$/acctable.obj \
$(SLO)$/acctextframe.obj \
- $(SLO)$/textmarkuphelper.obj
+ $(SLO)$/textmarkuphelper.obj \
+ $(SLO)$/parachangetrackinginfo.obj
# --- Targets -------------------------------------------------------
diff --git a/sw/source/core/access/parachangetrackinginfo.cxx b/sw/source/core/access/parachangetrackinginfo.cxx
new file mode 100644
index 0000000000..7c1e25f05c
--- /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 USHORT 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 0000000000..91131f37b7
--- /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
index da1d334975..b2d3a78efc 100644
--- a/sw/source/core/access/textmarkuphelper.cxx
+++ b/sw/source/core/access/textmarkuphelper.cxx
@@ -34,7 +34,7 @@
#include <algorithm>
#include <comphelper/stlunosequence.hxx>
-#include "errhdl.hxx"
+#include <errhdl.hxx>
#include <com/sun/star/text/TextMarkupType.hpp>
#include <com/sun/star/accessibility/TextSegment.hpp>
@@ -81,22 +81,39 @@ namespace {
}
}
-// implementation of calss <SwTextMarkupoHelper>
-SwTextMarkupHelper::SwTextMarkupHelper( const SwTxtNode& rTxtNode,
- const SwAccessiblePortionData& rPortionData )
- : mrTxtNode( rTxtNode ),
- mrPortionData( rPortionData )
+// implementation of class <SwTextMarkupoHelper>
+SwTextMarkupHelper::SwTextMarkupHelper( const SwAccessiblePortionData& rPortionData,
+ const SwTxtNode& rTxtNode )
+ : mrPortionData( rPortionData )
+ // --> OD 2010-02-19 #i108125#
+ , mpTxtNode( &rTxtNode )
+ , mpTextMarkupList( 0 )
+ // <--
{
}
-sal_Int32 SwTextMarkupHelper::getTextMarkupCount( sal_Int32 nTextMarkupType )
+// --> 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 =
- getTextMarkupList( mrTxtNode, nTextMarkupType );
+ mpTextMarkupList
+ ? mpTextMarkupList
+ : getTextMarkupList( *mpTxtNode, nTextMarkupType );
+ // <--
if ( pTextMarkupList )
{
nTextMarkupCount = pTextMarkupList->Count();
@@ -105,8 +122,8 @@ sal_Int32 SwTextMarkupHelper::getTextMarkupCount( sal_Int32 nTextMarkupType )
return nTextMarkupCount;
}
::com::sun::star::accessibility::TextSegment
- SwTextMarkupHelper::getTextMarkup( sal_Int32 nTextMarkupIndex,
- sal_Int32 nTextMarkupType )
+ 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)
@@ -121,8 +138,12 @@ sal_Int32 SwTextMarkupHelper::getTextMarkupCount( sal_Int32 nTextMarkupType )
aTextMarkupSegment.SegmentStart = -1;
aTextMarkupSegment.SegmentEnd = -1;
+ // --> OD 2010-02-19 #i108125#
const SwWrongList* pTextMarkupList =
- getTextMarkupList( mrTxtNode, nTextMarkupType );
+ mpTextMarkupList
+ ? mpTextMarkupList
+ : getTextMarkupList( *mpTxtNode, nTextMarkupType );
+ // <--
if ( pTextMarkupList )
{
const SwWrongArea* pTextMarkup =
@@ -149,8 +170,8 @@ sal_Int32 SwTextMarkupHelper::getTextMarkupCount( sal_Int32 nTextMarkupType )
}
::com::sun::star::uno::Sequence< ::com::sun::star::accessibility::TextSegment >
- SwTextMarkupHelper::getTextMarkupAtIndex( sal_Int32 nCharIndex,
- sal_Int32 nTextMarkupType )
+ 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)
@@ -166,9 +187,13 @@ sal_Int32 SwTextMarkupHelper::getTextMarkupCount( sal_Int32 nTextMarkupType )
return uno::Sequence< ::com::sun::star::accessibility::TextSegment >();
}
- ::std::vector< ::com::sun::star::accessibility::TextSegment > aTmpTextMarkups;
+ // --> OD 2010-02-19 #i108125#
const SwWrongList* pTextMarkupList =
- getTextMarkupList( mrTxtNode, nTextMarkupType );
+ mpTextMarkupList
+ ? mpTextMarkupList
+ : getTextMarkupList( *mpTxtNode, nTextMarkupType );
+ // <--
+ ::std::vector< ::com::sun::star::accessibility::TextSegment > aTmpTextMarkups;
if ( pTextMarkupList )
{
const ::rtl::OUString rText = mrPortionData.GetAccessibleString();
diff --git a/sw/source/core/access/textmarkuphelper.hxx b/sw/source/core/access/textmarkuphelper.hxx
index 8456a5828d..dec7efd551 100644
--- a/sw/source/core/access/textmarkuphelper.hxx
+++ b/sw/source/core/access/textmarkuphelper.hxx
@@ -37,30 +37,37 @@ namespace com { namespace sun { namespace star { namespace accessibility {
struct TextSegment;
} } } }
-class SwTxtNode;
class SwAccessiblePortionData;
+class SwTxtNode;
+// --> OD 2010-02-19 #i108125#
+class SwWrongList;
+// <--
class SwTextMarkupHelper
{
public:
- SwTextMarkupHelper( const SwTxtNode& rTxtNode,
- const SwAccessiblePortionData& rPortionData );
+ SwTextMarkupHelper( const SwAccessiblePortionData& rPortionData,
+ const SwTxtNode& rTxtNode );
+ // --> OD 2010-02-19 #i108125#
+ SwTextMarkupHelper( const SwAccessiblePortionData& rPortionData,
+ const SwWrongList& rTextMarkupList );
+ // <--
~SwTextMarkupHelper() {}
- sal_Int32 getTextMarkupCount( sal_Int32 nTextMarkupType )
+ sal_Int32 getTextMarkupCount( const sal_Int32 nTextMarkupType )
throw (::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::uno::RuntimeException);
::com::sun::star::accessibility::TextSegment getTextMarkup(
- sal_Int32 nTextMarkupIndex,
- sal_Int32 nTextMarkupType )
+ 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( sal_Int32 nCharIndex,
- sal_Int32 nTextMarkupType )
+ 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);
@@ -69,8 +76,12 @@ class SwTextMarkupHelper
SwTextMarkupHelper( const SwTextMarkupHelper& );
SwTextMarkupHelper& operator=( const SwTextMarkupHelper& );
- const SwTxtNode& mrTxtNode;
const SwAccessiblePortionData& mrPortionData;
+
+ // --> OD 2010-02-19 #i108125#
+ const SwTxtNode* mpTxtNode;
+ const SwWrongList* mpTextMarkupList;
+ // <--
};
#endif
diff --git a/sw/source/core/bastyp/index.cxx b/sw/source/core/bastyp/index.cxx
index a42023beff..473d60a1ae 100644
--- a/sw/source/core/bastyp/index.cxx
+++ b/sw/source/core/bastyp/index.cxx
@@ -84,7 +84,7 @@ void SwIndexReg::ChkArr()
-SwIndex::SwIndex( SwIndexReg* pArr, xub_StrLen nIdx )
+SwIndex::SwIndex(SwIndexReg *const pArr, xub_StrLen const nIdx)
: nIndex( nIdx ), pArray( pArr ), pNext( 0 ), pPrev( 0 )
{
if( !pArray )
diff --git a/sw/source/core/bastyp/swrect.cxx b/sw/source/core/bastyp/swrect.cxx
index 4593888ff4..c7f0bd70e7 100644
--- a/sw/source/core/bastyp/swrect.cxx
+++ b/sw/source/core/bastyp/swrect.cxx
@@ -242,7 +242,7 @@ void SwRect::Justify()
}
if ( m_Size.getWidth() < 0 )
{
- m_Point.Y() += m_Size.getWidth() + 1;
+ m_Point.X() += m_Size.getWidth() + 1;
m_Size.setWidth(-m_Size.getWidth());
}
}
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 5a032d6021..63a1021b92 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -3303,19 +3303,6 @@ String SwCrsrShell::GetCrsrDescr() const
return aResult;
}
-SwRect SwCrsrShell::GetRectOfCurrentChar()
-{
- SwCntntFrm* pFrm = pCurCrsr->GetCntntNode()->GetFrm( 0, pCurCrsr->GetPoint(), FALSE );
- SwRect aRet;
- SwCrsrMoveState aTmpState( MV_NONE );
- aTmpState.bRealHeight = TRUE;
- pFrm->GetCharRect( aRet, *pCurCrsr->GetPoint(), &aTmpState );
- //const SwTwips nRealHeight = aTmpState.aRealHeight.Y();
- if (aTmpState.aRealHeight.X() != 0)
- aRet.Top(aRet.Top() + aTmpState.aRealHeight.X());
- return aRet;
-}
-
// SMARTTAGS
void lcl_FillRecognizerData( uno::Sequence< rtl::OUString >& rSmartTagTypes,
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 681dd7a04c..fce9273ef3 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -34,9 +34,7 @@
#include <editeng/lrspitem.hxx>
#include <editeng/adjitem.hxx>
#include <editeng/brkitem.hxx>
-#ifndef _SVX_SVDOBJ_HXX
#include <svx/svdobj.hxx>
-#endif
#include <crsrsh.hxx>
#include <doc.hxx>
#include <pagefrm.hxx>
@@ -710,15 +708,17 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext,
SwTxtNode* pTNd = rPos.nNode.GetNode().GetTxtNode();
ASSERT( pTNd, "Wo ist mein CntntNode?" );
- SwTxtFld* pTxtFld = (SwTxtFld*)pTNd->GetTxtAttr( rPos.nContent,
- RES_TXTATR_FIELD );
+ SwTxtFld * pTxtFld = static_cast<SwTxtFld *>(
+ pTNd->GetTxtAttrForCharAt(rPos.nContent.GetIndex(),
+ RES_TXTATR_FIELD));
BOOL bDelFld = 0 == pTxtFld;
if( bDelFld )
{
SwFmtFld* pFmtFld = new SwFmtFld( SwDateTimeField(
(SwDateTimeFieldType*)pDoc->GetSysFldType( RES_DATETIMEFLD ) ) );
- pTxtFld = new SwTxtFld( *pFmtFld, rPos.nContent.GetIndex() );
+ pTxtFld = new SwTxtFld( *pFmtFld, rPos.nContent.GetIndex(),
+ pDoc->IsClipBoard() );
pTxtFld->ChgTxtNode( pTNd );
}
@@ -1242,13 +1242,27 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
{
pTxtAttr = 0;
if( SwContentAtPos::SW_TOXMARK & rCntntAtPos.eCntntAtPos )
- pTxtAttr = pTxtNd->GetTxtAttr( aPos.nContent,
- RES_TXTATR_TOXMARK );
+ {
+ ::std::vector<SwTxtAttr *> const marks(
+ pTxtNd->GetTxtAttrsAt(
+ aPos.nContent.GetIndex(), RES_TXTATR_TOXMARK));
+ if (marks.size())
+ { // hmm... can only return 1 here
+ pTxtAttr = *marks.begin();
+ }
+ }
if( !pTxtAttr &&
SwContentAtPos::SW_REFMARK & rCntntAtPos.eCntntAtPos )
- pTxtAttr = pTxtNd->GetTxtAttr( aPos.nContent,
- RES_TXTATR_REFMARK );
+ {
+ ::std::vector<SwTxtAttr *> const marks(
+ pTxtNd->GetTxtAttrsAt(
+ aPos.nContent.GetIndex(), RES_TXTATR_REFMARK));
+ if (marks.size())
+ { // hmm... can only return 1 here
+ pTxtAttr = *marks.begin();
+ }
+ }
if( pTxtAttr )
{
@@ -1293,8 +1307,8 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
if( !bRet && SwContentAtPos::SW_INETATTR & rCntntAtPos.eCntntAtPos
&& !aTmpState.bFtnNoInfo )
{
- pTxtAttr = pTxtNd->GetTxtAttr( aPos.nContent,
- RES_TXTATR_INETFMT );
+ pTxtAttr = pTxtNd->GetTxtAttrAt(
+ aPos.nContent.GetIndex(), RES_TXTATR_INETFMT);
// nur INetAttrs mit URLs "erkennen"
if( pTxtAttr && pTxtAttr->GetINetFmt().GetValue().Len() )
{
@@ -1629,8 +1643,11 @@ BOOL SwCrsrShell::SelectTxtAttr( USHORT nWhich, BOOL bExpand,
if( !pTxtAttr )
{
SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode();
- pTxtAttr = pTxtNd ? pTxtNd->GetTxtAttr( rPos.nContent,
- nWhich, bExpand ) : 0;
+ pTxtAttr = (pTxtNd)
+ ? pTxtNd->GetTxtAttrAt(rPos.nContent.GetIndex(),
+ static_cast<RES_TXTATR>(nWhich),
+ (bExpand) ? SwTxtNode::EXPAND : SwTxtNode::DEFAULT)
+ : 0;
}
if( pTxtAttr )
diff --git a/sw/source/core/crsr/crstrvl1.cxx b/sw/source/core/crsr/crstrvl1.cxx
index b240921998..45feaf02f2 100644
--- a/sw/source/core/crsr/crstrvl1.cxx
+++ b/sw/source/core/crsr/crstrvl1.cxx
@@ -33,26 +33,30 @@
#include <viscrs.hxx>
#include <callnk.hxx>
-BOOL SwCrsrShell::IsStartWord() const
+BOOL SwCrsrShell::IsStartWord( sal_Int16 nWordType ) const
{
- return pCurCrsr->IsStartWord();
+ return pCurCrsr->IsStartWord( nWordType );
}
-BOOL SwCrsrShell::IsEndWord() const
+
+BOOL SwCrsrShell::IsEndWord( sal_Int16 nWordType ) const
{
- return pCurCrsr->IsEndWord();
+ return pCurCrsr->IsEndWord( nWordType );
}
+
+BOOL SwCrsrShell::IsInWord( sal_Int16 nWordType ) const
+{
+ return pCurCrsr->IsInWord( nWordType );
+}
+
BOOL SwCrsrShell::IsStartSentence() const
{
return pCurCrsr->IsStartEndSentence( false );
}
+
BOOL SwCrsrShell::IsEndSentence() const
{
return pCurCrsr->IsStartEndSentence( true );
}
-BOOL SwCrsrShell::IsInWord() const
-{
- return pCurCrsr->IsInWord();
-}
BOOL SwCrsrShell::GoStartWord()
@@ -94,4 +98,8 @@ BOOL SwCrsrShell::SelectWord( const Point* pPt )
return pCurCrsr->SelectWord( pPt );
}
+BOOL SwCrsrShell::ExpandToSentenceBorders()
+{
+ return pCurCrsr->ExpandToSentenceBorders();
+}
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 7001dd5ca4..0097c225ae 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -48,7 +48,6 @@
#include <swundo.hxx>
#include <breakit.hxx>
-/*testarea*/
#include <docsh.hxx>
#include <PostItMgr.hxx>
#include <viewsh.hxx>
@@ -87,7 +86,7 @@ String& lcl_CleanStr( const SwTxtNode& rNd, xub_StrLen nStart,
STRING_LEN;
if ( bNewSoftHyphen )
- nSoftHyphen = bRemoveSoftHyphen ?
+ nSoftHyphen = bRemoveSoftHyphen ?
rNd.GetTxt().Search( CHAR_SOFTHYPHEN, nSoftHyphen ) :
STRING_LEN;
@@ -145,7 +144,9 @@ String& lcl_CleanStr( const SwTxtNode& rNd, xub_StrLen nStart,
// Fuer das Ende merken wir uns die Ersetzungen und entferenen
// hinterher alle am Stringende (koenten ja 'normale' 0x7f drinstehen
BOOL bEmpty = RES_TXTATR_FIELD != pHt->Which() ||
- !((SwTxtFld*)pHt)->GetFld().GetFld()->Expand().Len();
+ !(static_cast<SwTxtFld const*>(pHt)
+ ->GetFld().GetFld()->ExpandField(
+ rNd.GetDoc()->IsClipBoard()).Len());
if ( bEmpty && nStart == nAkt )
{
rArr.Insert( nAkt, rArr.Count() );
@@ -202,7 +203,7 @@ xub_StrLen GetPostIt(xub_StrLen aCount,const SwpHints *pHts)
{
aIndex++;
const SwTxtAttr* pTxtAttr = (*pHts)[i];
- if ( (pTxtAttr->Which()==RES_TXTATR_FIELD) &&
+ if ( (pTxtAttr->Which()==RES_TXTATR_FIELD) &&
(pTxtAttr->GetFld().GetFld()->Which()==RES_POSTITFLD))
{
aCount--;
@@ -215,12 +216,12 @@ xub_StrLen GetPostIt(xub_StrLen aCount,const SwpHints *pHts)
for (xub_StrLen i = aIndex; i <pHts->Count();i++)
{
const SwTxtAttr* pTxtAttr = (*pHts)[i];
- if ( (pTxtAttr->Which()==RES_TXTATR_FIELD) &&
+ if ( (pTxtAttr->Which()==RES_TXTATR_FIELD) &&
(pTxtAttr->GetFld().GetFld()->Which()==RES_POSTITFLD))
break;
else
aIndex++;
- }
+ }
return aIndex;
}
@@ -305,12 +306,12 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te
nEnde = nStart;
nStart = swap;
}
-
+
for (xub_StrLen i = 0; i <pHts->Count();i++)
{
xub_StrLen aPos = *(*pHts)[i]->GetStart();
const SwTxtAttr* pTxtAttr = (*pHts)[i];
- if ( (pTxtAttr->Which()==RES_TXTATR_FIELD) &&
+ if ( (pTxtAttr->Which()==RES_TXTATR_FIELD) &&
(pTxtAttr->GetFld().GetFld()->Which()==RES_POSTITFLD))
{
if ( (aPos >= nStart) && (aPos <= nEnde) )
@@ -322,7 +323,7 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te
}
}
}
-
+
if (!bSrchForward)
{
xub_StrLen swap = nEnde;
@@ -331,10 +332,10 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te
}
}
-
+
xub_StrLen aStart = 0;
- // do we need to finish a note?
- if (POSTITMGR->GetActivePostIt())
+ // do we need to finish a note?
+ if (POSTITMGR->HasActiveSidebarWin())
{
if (bSearchInNotes)
{
@@ -354,7 +355,7 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te
}
else
{
- POSTITMGR->SetActivePostIt(0);
+ POSTITMGR->SetActiveSidebarWin(0);
}
}
@@ -364,9 +365,9 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te
xub_StrLen nStartInside = 0;
xub_StrLen nEndeInside = 0;
sal_Int16 aLoop= bSrchForward ? aStart : aNumberPostits;
-
+
while ( (aLoop>=0) && (aLoop<=aNumberPostits))
- {
+ {
if (bSrchForward)
{
nStartInside = aLoop==0 ? nStart : *(*pHts)[GetPostIt(aLoop+aIgnore-1,pHts)]->GetStart()+1;
@@ -397,7 +398,7 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te
}
}
}
- aLoop = bSrchForward ? aLoop+1 : aLoop-1;
+ aLoop = bSrchForward ? aLoop+1 : aLoop-1;
}
}
else
@@ -438,8 +439,8 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
if ( 1 == rSearchOpt.searchString.getLength() &&
CHAR_SOFTHYPHEN == rSearchOpt.searchString.toChar() )
bRemoveSoftHyphens = false;
- }
-
+ }
+
if( bSrchForward )
lcl_CleanStr( *(SwTxtNode*)pNode, nStart, nEnde,
aFltArr, sCleanStr, bRemoveSoftHyphens );
@@ -593,7 +594,7 @@ int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove,
SwIndex& rSttCntIdx = pCrsr->Start()->nContent;
xub_StrLen nSttCnt = rSttCntIdx.GetIndex();
// damit die Region auch verschoben wird, in den Shell-Cursr-Ring
- // mit aufnehmen !!
+ // mit aufnehmen !!
Ring *pPrev(0);
if( bRegExp )
{
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 0c782643f1..3dc0ff9e40 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -1141,19 +1141,19 @@ short SwCursor::MaxReplaceArived()
}
-BOOL SwCursor::IsStartWord() const
+BOOL SwCursor::IsStartWord( sal_Int16 nWordType ) const
{
- return IsStartWordWT( WordType::ANYWORD_IGNOREWHITESPACES );
+ return IsStartWordWT( nWordType );
}
-BOOL SwCursor::IsEndWord() const
+BOOL SwCursor::IsEndWord( sal_Int16 nWordType ) const
{
- return IsEndWordWT( WordType::ANYWORD_IGNOREWHITESPACES );
+ return IsEndWordWT( nWordType );
}
-BOOL SwCursor::IsInWord() const
+BOOL SwCursor::IsInWord( sal_Int16 nWordType ) const
{
- return IsInWordWT( WordType::ANYWORD_IGNOREWHITESPACES );
+ return IsInWordWT( nWordType );
}
BOOL SwCursor::GoStartWord()
@@ -1401,11 +1401,11 @@ BOOL SwCursor::SelectWordWT( sal_Int16 nWordType, const Point* pPt )
}
//-----------------------------------------------------------------------------
-BOOL SwCursor::GoSentence( SentenceMoveType eMoveType )
+
+static String lcl_MaskDeletedRedlines( const SwTxtNode* pTxtNd )
{
- BOOL bRet = FALSE;
- const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
- if( pTxtNd && pBreakIt->GetBreakIter().is() )
+ String aRes;
+ if (pTxtNd)
{
//mask deleted redlines
String sNodeText(pTxtNd->GetTxt());
@@ -1430,11 +1430,30 @@ BOOL SwCursor::GoSentence( SentenceMoveType eMoveType )
}
}
}
+ aRes = sNodeText;
+ }
+ return aRes;
+}
+
+BOOL SwCursor::GoSentence( SentenceMoveType eMoveType )
+{
+ BOOL bRet = FALSE;
+ const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
+ if( pTxtNd && pBreakIt->GetBreakIter().is() )
+ {
+ String sNodeText( lcl_MaskDeletedRedlines( pTxtNd ) );
+
SwCrsrSaveState aSave( *this );
xub_StrLen nPtPos = GetPoint()->nContent.GetIndex();
switch ( eMoveType )
{
- case END_SENT:
+ case START_SENT: /* when modifying: see also ExpandToSentenceBorders below! */
+ nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfSentence(
+ sNodeText,
+ nPtPos, pBreakIt->GetLocale(
+ pTxtNd->GetLang( nPtPos ) ));
+ break;
+ case END_SENT: /* when modifying: see also ExpandToSentenceBorders below! */
nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfSentence(
sNodeText,
nPtPos, pBreakIt->GetLocale(
@@ -1451,12 +1470,6 @@ BOOL SwCursor::GoSentence( SentenceMoveType eMoveType )
;
break;
}
- case START_SENT:
- nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfSentence(
- sNodeText,
- nPtPos, pBreakIt->GetLocale(
- pTxtNd->GetLang( nPtPos ) ));
- break;
case PREV_SENT:
nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfSentence(
sNodeText,
@@ -1484,6 +1497,51 @@ BOOL SwCursor::GoSentence( SentenceMoveType eMoveType )
return bRet;
}
+
+BOOL SwCursor::ExpandToSentenceBorders()
+{
+ BOOL bRes = FALSE;
+ const SwTxtNode* pStartNd = Start()->nNode.GetNode().GetTxtNode();
+ const SwTxtNode* pEndNd = End()->nNode.GetNode().GetTxtNode();
+ if (pStartNd && pEndNd && pBreakIt->GetBreakIter().is())
+ {
+ if (!HasMark())
+ SetMark();
+
+ String sStartText( lcl_MaskDeletedRedlines( pStartNd ) );
+ String sEndText( pStartNd == pEndNd? sStartText : lcl_MaskDeletedRedlines( pEndNd ) );
+
+ SwCrsrSaveState aSave( *this );
+ xub_StrLen nStartPos = Start()->nContent.GetIndex();
+ xub_StrLen nEndPos = End()->nContent.GetIndex();
+
+ nStartPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfSentence(
+ sStartText, nStartPos,
+ pBreakIt->GetLocale( pStartNd->GetLang( nStartPos ) ) );
+ nEndPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfSentence(
+ sEndText, nEndPos,
+ pBreakIt->GetLocale( pEndNd->GetLang( nEndPos ) ) );
+
+ // it is allowed to place the PaM just behind the last
+ // character in the text thus <= ...Len
+ bool bChanged = false;
+ if (nStartPos <= pStartNd->GetTxt().Len())
+ {
+ GetMark()->nContent = nStartPos;
+ bChanged = true;
+ }
+ if (nEndPos <= pEndNd->GetTxt().Len())
+ {
+ GetPoint()->nContent = nEndPos;
+ bChanged = true;
+ }
+ if (bChanged && !IsSelOvr())
+ bRes = TRUE;
+ }
+ return bRes;
+}
+
+
BOOL SwTableCursor::LeftRight( BOOL bLeft, USHORT nCnt, USHORT /*nMode*/,
BOOL /*bVisualAllowed*/, BOOL /*bSkipHidden*/, BOOL /*bInsertCrsr*/ )
{
diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx
index c75ea7b4fc..0d324b0217 100644
--- a/sw/source/core/crsr/trvlfnfl.cxx
+++ b/sw/source/core/crsr/trvlfnfl.cxx
@@ -62,11 +62,13 @@ BOOL SwCursor::GotoFtnTxt()
{
// springe aus dem Content zur Fussnote
BOOL bRet = FALSE;
- SwTxtAttr *pFtn;
SwTxtNode* pTxtNd = GetPoint()->nNode.GetNode().GetTxtNode();
- if( pTxtNd && 0 != (
- pFtn = pTxtNd->GetTxtAttr( GetPoint()->nContent, RES_TXTATR_FTN ) ))
+ SwTxtAttr *const pFtn( (pTxtNd)
+ ? pTxtNd->GetTxtAttrForCharAt(
+ GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN)
+ : 0);
+ if (pFtn)
{
SwCrsrSaveState aSaveState( *this );
GetPoint()->nNode = *((SwTxtFtn*)pFtn)->GetStartNode();
diff --git a/sw/source/core/crsr/trvlreg.cxx b/sw/source/core/crsr/trvlreg.cxx
index f239ab2806..e339623d7a 100644
--- a/sw/source/core/crsr/trvlreg.cxx
+++ b/sw/source/core/crsr/trvlreg.cxx
@@ -262,7 +262,7 @@ BOOL SwCursor::GotoRegion( const String& rName )
const SwNodeIndex* pIdx;
const SwSection* pSect;
if( 0 != ( pSect = pFmt->GetSection() ) &&
- pSect->GetName() == rName &&
+ pSect->GetSectionName() == rName &&
0 != ( pIdx = pFmt->GetCntnt().GetCntntIdx() ) &&
pIdx->GetNode().GetNodes().IsDocNodes() )
{
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 2875018d4a..8e0ee58839 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -666,16 +666,6 @@ void SwSelPaintRects::Paint( const Rectangle& /*rRect*/ )
// nothing to do with overlays
}
-/*
- * Rectangle ist in Dokument-Koordianten !!
- * pWin != 0 -> auch wirklich malen
- * == 0 -> nur testen, ob es gemalt werden kann
- */
-
-void SwSelPaintRects::Paint( const SwRect& /*rRect*/ )
-{
- // nothing to do with overlays
-}
// check current MapMode of the shell and set possibly the static members.
// Optional set the parameters pX, pY
diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index 2bfb6b8d98..e7dd04c80d 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -52,6 +52,7 @@
#include <dbgoutsw.hxx>
#include <SwRewriter.hxx>
#include <iostream>
+#include <cstdio>
using namespace std;
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 3fbf10e186..d25e4bd169 100755
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -477,6 +477,16 @@ void SwDoc::setPrinter(/*[in]*/ SfxPrinter *pP,/*[in]*/ bool bDeleteOld,/*[in]*/
delete pPrt;
pPrt = pP;
+ // our printer should always use TWIP. Don't rely on this being set in ViewShell::InitPrt, there
+ // are situations where this isn't called.
+ // #i108712# / 2010-02-26 / frank.schoenheit@sun.com
+ if ( pPrt )
+ {
+ MapMode aMapMode( pPrt->GetMapMode() );
+ aMapMode.SetMapUnit( MAP_TWIP );
+ pPrt->SetMapMode( aMapMode );
+ }
+
if ( pDrawModel && !get( IDocumentSettingAccess::USE_VIRTUAL_DEVICE ) )
pDrawModel->SetRefDevice( pPrt );
}
@@ -2323,11 +2333,10 @@ BOOL SwDoc::RemoveInvisibleContent()
}
if( pSect->GetCondition().Len() )
{
- SwSection aSect( pSect->GetType(), pSect->GetName() );
- aSect = *pSect;
- aSect.SetCondition( aEmptyStr );
- aSect.SetHidden( FALSE );
- ChgSection( n, aSect );
+ SwSectionData aSectionData( *pSect );
+ aSectionData.SetCondition( aEmptyStr );
+ aSectionData.SetHidden( false );
+ UpdateSection( n, aSectionData );
}
}
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index e3a71adcae..23ecd3feb5 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -1023,9 +1023,8 @@ SaveBookmark::SaveBookmark(
m_aShortName = pBookmark->GetShortName();
m_aCode = pBookmark->GetKeyCode();
- ::sfx2::Metadatable * const pMetadatable(
- const_cast< ::sfx2::Metadatable * >( // CreateUndo should be const?
- dynamic_cast< ::sfx2::Metadatable const* >(pBookmark)));
+ ::sfx2::Metadatable const*const pMetadatable(
+ dynamic_cast< ::sfx2::Metadatable const* >(pBookmark));
if (pMetadatable)
{
m_pMetadataUndo = pMetadatable->CreateUndo();
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index 5b301c61ba..f929eb4989 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -1412,7 +1412,7 @@ void SwCompareData::ShowDelete( const CompareData& rData, ULONG nStt,
if( *pCorr->GetPoint() == *pTmp->GetPoint() )
{
SwNodeIndex aTmpPos( pTmp->GetMark()->nNode, -1 );
- *pCorr->GetPoint() = SwPosition( aTmpPos, 0 );
+ *pCorr->GetPoint() = SwPosition( aTmpPos );
}
}
}
@@ -1480,6 +1480,17 @@ void SwCompareData::SetRedlinesToDoc( BOOL bUseDocInfo )
pTmp->GetPoint()->nNode++;
pTmp->GetPoint()->nContent.Assign( pTmp->GetCntntNode(), 0 );
}
+ // --> mst 2010-05-17 #i101009#
+ // prevent redlines that end on structural end node
+ if (& rDoc.GetNodes().GetEndOfContent() ==
+ & pTmp->GetPoint()->nNode.GetNode())
+ {
+ pTmp->GetPoint()->nNode--;
+ SwCntntNode *const pContentNode( pTmp->GetCntntNode() );
+ pTmp->GetPoint()->nContent.Assign( pContentNode,
+ (pContentNode) ? pContentNode->Len() : 0 );
+ }
+ // <--
rDoc.DeleteRedline( *pTmp, false, USHRT_MAX );
@@ -1499,6 +1510,17 @@ void SwCompareData::SetRedlinesToDoc( BOOL bUseDocInfo )
pTmp->GetPoint()->nNode++;
pTmp->GetPoint()->nContent.Assign( pTmp->GetCntntNode(), 0 );
}
+ // --> mst 2010-05-17 #i101009#
+ // prevent redlines that end on structural end node
+ if (& rDoc.GetNodes().GetEndOfContent() ==
+ & pTmp->GetPoint()->nNode.GetNode())
+ {
+ pTmp->GetPoint()->nNode--;
+ SwCntntNode *const pContentNode( pTmp->GetCntntNode() );
+ pTmp->GetPoint()->nContent.Assign( pContentNode,
+ (pContentNode) ? pContentNode->Len() : 0 );
+ }
+ // <--
} while( pInsRing != ( pTmp = (SwPaM*)pTmp->GetNext() ));
SwRedlineData aRedlnData( nsRedlineType_t::REDLINE_INSERT, nAuthor, aTimeStamp,
aEmptyStr, 0, 0 );
diff --git a/sw/source/core/doc/docdde.cxx b/sw/source/core/doc/docdde.cxx
index c23a1d39cb..6d4daf8972 100644
--- a/sw/source/core/doc/docdde.cxx
+++ b/sw/source/core/doc/docdde.cxx
@@ -99,7 +99,9 @@ BOOL lcl_FindSection( const SwSectionFmtPtr& rpSectFmt, void* pArgs, bool bCaseS
SwSection* pSect = rpSectFmt->GetSection();
if( pSect )
{
- String sNm( bCaseSensitive ? pSect->GetName() : GetAppCharClass().lower( pSect->GetName() ));
+ String sNm( (bCaseSensitive)
+ ? pSect->GetSectionName()
+ : GetAppCharClass().lower( pSect->GetSectionName() ));
String sCompare( (bCaseSensitive)
? pItem->m_Item
: GetAppCharClass().lower( pItem->m_Item ) );
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 8f6fe89a59..08fc9681bf 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -1604,17 +1604,9 @@ bool SwDoc::DeleteAndJoinImpl( SwPaM & rPam,
}
// <--
{
- // dann eine Kopie vom Cursor erzeugen um alle Pams aus den
- // anderen Sichten aus dem Loeschbereich zu verschieben
- // ABER NICHT SICH SELBST !!
- SwPaM aDelPam( *rPam.GetMark(), *rPam.GetPoint() );
- ::PaMCorrAbs( aDelPam, *aDelPam.GetPoint() );
-
- const bool bSuccess( DeleteRangeImpl( aDelPam ) );
+ bool const bSuccess( DeleteRangeImpl( rPam ) );
if (!bSuccess)
return false;
-
- *rPam.GetPoint() = *aDelPam.GetPoint();
}
if( bJoinTxt )
@@ -1625,7 +1617,24 @@ bool SwDoc::DeleteAndJoinImpl( SwPaM & rPam,
return true;
}
-bool SwDoc::DeleteRangeImpl( SwPaM & rPam, const bool )
+bool SwDoc::DeleteRangeImpl(SwPaM & rPam, const bool)
+{
+ // move all cursors out of the deleted range.
+ // but first copy the given PaM, because it could be a cursor that
+ // would be moved!
+ SwPaM aDelPam( *rPam.GetMark(), *rPam.GetPoint() );
+ ::PaMCorrAbs( aDelPam, *aDelPam.GetPoint() );
+
+ bool const bSuccess( DeleteRangeImplImpl( aDelPam ) );
+ if (bSuccess)
+ { // now copy position from temp copy to given PaM
+ *rPam.GetPoint() = *aDelPam.GetPoint();
+ }
+
+ return bSuccess;
+}
+
+bool SwDoc::DeleteRangeImplImpl(SwPaM & rPam)
{
SwPosition *pStt = (SwPosition*)rPam.Start(), *pEnd = (SwPosition*)rPam.End();
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 54cb12e9db..9d907b9896 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -1241,13 +1241,18 @@ void SwDoc::FldsToExpand( SwHash**& ppHashTbl, USHORT& rTblSize,
// Eintrag in den HashTable eintragen
// Eintrag vorhanden ?
pFnd = Find( rName, ppHashTbl, rTblSize, &nPos );
+ String const value(pFld->ExpandField(IsClipBoard()));
if( pFnd )
+ {
// Eintrag in der HashTabelle aendern
- ((_HashStr*)pFnd)->aSetStr = pFld->Expand();
+ static_cast<_HashStr*>(pFnd)->aSetStr = value;
+ }
else
+ {
// neuen Eintrag einfuegen
*(ppHashTbl + nPos ) = new _HashStr( rName,
- pFld->Expand(), (_HashStr*)*(ppHashTbl + nPos));
+ value, static_cast<_HashStr *>(*(ppHashTbl + nPos)));
+ }
}
break;
}
@@ -1413,13 +1418,18 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
// Eintrag vorhanden ?
USHORT nPos;
SwHash* pFnd = Find( rName, pHashStrTbl, nStrFmtCnt, &nPos );
+ String const value(pFld->ExpandField(IsClipBoard()));
if( pFnd )
+ {
// Eintrag in der HashTabelle aendern
- ((_HashStr*)pFnd)->aSetStr = pFld->Expand();
+ static_cast<_HashStr*>(pFnd)->aSetStr = value;
+ }
else
+ {
// neuen Eintrag einfuegen
*(pHashStrTbl + nPos ) = new _HashStr( rName,
- pFld->Expand(), (_HashStr*)*(pHashStrTbl + nPos));
+ value, static_cast<_HashStr *>(*(pHashStrTbl + nPos)));
+ }
}
break;
case RES_GETEXPFLD:
@@ -2724,7 +2734,7 @@ bool SwDoc::UpdateFld(SwTxtFld * pDstTxtFld, SwField & rSrcFld,
//pDstFld->ChangeFormat( rSrcFld.GetFormat() );
//pDstFld->SetLanguage( rSrcFld.GetLanguage() );
- SwField * pNewFld = rSrcFld.Copy();
+ SwField * pNewFld = rSrcFld.CopyField();
pDstFmtFld->SetFld(pNewFld);
switch( nFldWhich )
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 28eeb72247..2afa2fa9e9 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -397,10 +397,9 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
// JP 22.08.96: Sonderfall: steht der Crsr in einem URL-Attribut
// dann wird dessen Bereich genommen
- const SwTxtAttr* pURLAttr;
- if( pTxtNd->HasHints() &&
- 0 != ( pURLAttr = pTxtNd->GetTxtAttr( rSt, RES_TXTATR_INETFMT ))
- && pURLAttr->GetINetFmt().GetValue().Len() )
+ SwTxtAttr const*const pURLAttr(
+ pTxtNd->GetTxtAttrAt(rSt.GetIndex(), RES_TXTATR_INETFMT));
+ if (pURLAttr && pURLAttr->GetINetFmt().GetValue().Len())
{
nMkPos = *pURLAttr->GetStart();
nPtPos = *pURLAttr->GetEnd();
@@ -902,10 +901,9 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
// JP 22.08.96: Sonderfall: steht der Crsr in einem URL-Attribut
// dann wird dessen Bereich genommen
- const SwTxtAttr* pURLAttr;
- if( pTxtNd->HasHints() &&
- 0 != ( pURLAttr = pTxtNd->GetTxtAttr( rSt, RES_TXTATR_INETFMT ))
- && pURLAttr->GetINetFmt().GetValue().Len() )
+ SwTxtAttr const*const pURLAttr(
+ pTxtNd->GetTxtAttrAt(rSt.GetIndex(), RES_TXTATR_INETFMT));
+ if (pURLAttr && pURLAttr->GetINetFmt().GetValue().Len())
{
nMkPos = *pURLAttr->GetStart();
nPtPos = *pURLAttr->GetEnd();
diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx
index e8b397ee98..ef72c98ce7 100644
--- a/sw/source/core/doc/docglbl.cxx
+++ b/sw/source/core/doc/docglbl.cxx
@@ -400,11 +400,11 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
default:
{
String sNm( INetURLObject( sFileName ).GetName() );
- SwSection aSect( FILE_LINK_SECTION,
+ SwSectionData aSectData( FILE_LINK_SECTION,
GetUniqueSectionName( &sNm ));
SwSectionFmt* pFmt = MakeSectionFmt( 0 );
- aSect.SetLinkFileName(sFileName );
- aSect.SetProtect();
+ aSectData.SetLinkFileName(sFileName);
+ aSectData.SetProtectFlag(true);
aEndIdx--; // im InsertSection ist Ende inclusive
while( aEndIdx.GetNode().IsStartNode() )
@@ -456,11 +456,15 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
SwNodeIndex aStartIdx(*pSttNd);
if (aEndIdx >= aStartIdx)
- pSectNd = GetNodes().InsertSection
- (aStartIdx, *pFmt, aSect, &aEndIdx, FALSE );
+ {
+ pSectNd = GetNodes().InsertTextSection(aStartIdx,
+ *pFmt, aSectData, 0, &aEndIdx, false);
+ }
else
- pSectNd = GetNodes().InsertSection
- (aEndIdx, *pFmt, aSect, &aStartIdx, FALSE );
+ {
+ pSectNd = GetNodes().InsertTextSection(aEndIdx,
+ *pFmt, aSectData, 0, &aStartIdx, false);
+ }
// <- #i26762#
pSectNd->GetSection().CreateLink( CREATE_CONNECT );
@@ -747,11 +751,11 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel )
default:
{
String sNm( INetURLObject( sFileName ).GetName() );
- SwSection aSect( FILE_LINK_SECTION,
+ SwSectionData aSectData( FILE_LINK_SECTION,
GetUniqueSectionName( &sNm ));
SwSectionFmt* pFmt = MakeSectionFmt( 0 );
- aSect.SetLinkFileName(sFileName );
- aSect.SetProtect();
+ aSectData.SetLinkFileName(sFileName);
+ aSectData.SetProtectFlag(true);
aEndIdx--; // im InsertSection ist Ende inclusive
while( aEndIdx.GetNode().IsStartNode() )
@@ -799,11 +803,15 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel )
SwNodeIndex aStartIdx(*pSttNd);
if (aEndIdx >= aStartIdx)
- pSectNd = GetNodes().InsertSection
- (aStartIdx, *pFmt, aSect, &aEndIdx, FALSE );
+ {
+ pSectNd = GetNodes().InsertTextSection(aStartIdx,
+ *pFmt, aSectData, 0, &aEndIdx, false);
+ }
else
- pSectNd = GetNodes().InsertSection
- (aEndIdx, *pFmt, aSect, &aStartIdx, FALSE );
+ {
+ pSectNd = GetNodes().InsertTextSection(aEndIdx,
+ *pFmt, aSectData, 0, &aStartIdx, false);
+ }
pSectNd->GetSection().CreateLink( CREATE_CONNECT );
}
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 98cb4114ce..b42b5f808e 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -947,8 +947,6 @@ SwDrawFrmFmt* SwDoc::Insert( const SwPaM &rRg,
// Anker noch nicht gesetzt ?
// DrawObjecte duerfen niemals in Kopf-/Fusszeilen landen.
const bool bIsAtCntnt = (FLY_AT_PAGE != eAnchorId);
-// FLY_AT_CNTNT == eAnchorId || FLY_IN_CNTNT == eAnchorId ||
-// FLY_AT_FLY == eAnchorId || FLY_AUTO_CNTNT == eAnchorId;
const SwNodeIndex* pChkIdx = 0;
if( !pAnchor )
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 89171fae9b..3b81863ea5 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -1084,14 +1084,10 @@ void SwDoc::InitTOXTypes()
/*-- 08.05.2009 10:07:57---------------------------------------------------
-----------------------------------------------------------------------*/
-SwDoc* SwDoc::CreateCopy() const
+SfxObjectShell* SwDoc::CreateCopy(bool bCallInitNew ) const
{
SwDoc* pRet = new SwDoc;
//copy settings
-/*
- //aNodes( this ),
- //aUndoNodes( this ),
- mpAttrPool(new SwAttrPool(this)),*/
USHORT __FAR_DATA aRangeOfDefaults[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
@@ -1120,143 +1116,8 @@ SwDoc* SwDoc::CreateCopy() const
if( aNewDefaults.Count() )
pRet->SetDefault( aNewDefaults );
- /*
- pDfltFrmFmt( new SwFrmFmt( GetAttrPool(), sFrmFmtStr, 0 ) ),
- pEmptyPageFmt( new SwFrmFmt( GetAttrPool(), sEmptyPageStr, pDfltFrmFmt ) ),
- pColumnContFmt( new SwFrmFmt( GetAttrPool(), sColumnCntStr, pDfltFrmFmt ) ),
- pDfltCharFmt( new SwCharFmt( GetAttrPool(), sCharFmtStr, 0 ) ),
- pDfltTxtFmtColl( new SwTxtFmtColl( GetAttrPool(), sTxtCollStr ) ),
- pDfltGrfFmtColl( new SwGrfFmtColl( GetAttrPool(), sGrfCollStr ) ),
- pFrmFmtTbl( new SwFrmFmts() ),
- pCharFmtTbl( new SwCharFmts() ),
- pSpzFrmFmtTbl( new SwSpzFrmFmts() ),
- pSectionFmtTbl( new SwSectionFmts() ),
- pTblFrmFmtTbl( new SwFrmFmts() ),
- pTxtFmtCollTbl( new SwTxtFmtColls() ),
- pGrfFmtCollTbl( new SwGrfFmtColls() ),
- pBookmarkTbl( new SwBookmarks( 0, 16 ) ),
- pTOXTypes( new SwTOXTypes() ),
- pDefTOXBases( new SwDefTOXBase_Impl() ),
- pLayout( 0 ), // Rootframe des spezifischen Layouts.
- pDrawModel( 0 ),
- pUndos( new SwUndos( 0, 20 ) ),
- pUpdtFlds( new SwDocUpdtFld() ),
- pFldTypes( new SwFldTypes() ),
- pVirDev( 0 ),
- pPrt( 0 ),
- pPrtData( 0 ),
- pGlossaryDoc( 0 ),
- pOutlineRule( 0 ),
- pFtnInfo( new SwFtnInfo ),
- pEndNoteInfo( new SwEndNoteInfo ),
- pLineNumberInfo( new SwLineNumberInfo ),
- pFtnIdxs( new SwFtnIdxs ),
- pDocStat( new SwDocStat ),
- pDocShell( 0 ),
- pDocShRef( 0 ),
- pLinkMgr( new sfx2::LinkManager( 0 ) ),
- pACEWord( 0 ),
- pURLStateChgd( 0 ),
- pNumberFormatter( 0 ),
- pNumRuleTbl( new SwNumRuleTbl ),
- // --> OD 2008-03-26 #refactorlists#
- maLists(),
- maListStyleLists(),
- // <--
- pRedlineTbl( new SwRedlineTbl ),
- pAutoFmtRedlnComment( 0 ),
- pUnoCrsrTbl( new SwUnoCrsrTbl( 0, 16 ) ),
- pPgPViewPrtData( 0 ),
- pExtInputRing( 0 ),
- pLayouter( 0 ),
- // --> OD 2008-03-07 #refactorlists#
- pStyleAccess( 0 ),
- // <--
- pLayoutCache( 0 ),
- pUnoCallBack(new SwUnoCallBack(0)),
- mpGrammarContact( 0 ),
- aChartDataProviderImplRef(),
- pChartControllerHelper( 0 ),
- // --> OD 2007-10-31 #i83479#
- mpListItemsList( new tImplSortedNodeNumList() ),
- // <--
- nUndoPos( 0 ),
- nUndoSavePos( 0 ),
- nUndoCnt( 0 ),
- nUndoSttEnd( 0 ),
- nAutoFmtRedlnCommentNo( 0 ),
- nLinkUpdMode( GLOBALSETTING ),
- eFldUpdMode( AUTOUPD_GLOBALSETTING ),
- eRedlineMode((RedlineMode_t)(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE)),
- eChrCmprType( CHARCOMPRESS_NONE ),
- mReferenceCount(0),
- mIdleBlockCount(0),
- nLockExpFld( 0 ),
- mbReadlineChecked(false),
- mbWinEncryption(sal_False),
- // --> OD 2005-02-11 #i38810#
- mbLinksUpdated( sal_False ),
- mbClipBoard( false ),
- mbColumnSelection( false ),
- // i#78591#
- mbProtectForm(false),*/
pRet->n32DummyCompatabilityOptions1 = n32DummyCompatabilityOptions1;
pRet->n32DummyCompatabilityOptions2 = n32DummyCompatabilityOptions2;
- /*
- mbStartIdleTimer(sal_False)
-{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDoc::SwDoc" );
-
- mbGlossDoc =
- mbModified =
- mbDtor =
- mbUndo =
- mbPageNums =
- mbLoaded =
- mbUpdateExpFld =
- mbNewDoc =
- mbCopyIsMove =
- mbNoDrawUndoObj =
- mbBrowseMode =
- mbInReading =
- mbInXMLImport =
- mbUpdateTOX =
- mbInLoadAsynchron =
- mbHTMLMode =
- mbInCallModified =
- mbIsGlobalDoc =
- mbGlblDocSaveLinks =
- mbIsLabelDoc =
- mbIsAutoFmtRedline =
- mbOLEPrtNotifyPending =
- mbAllOLENotify =
- mbIsRedlineMove =
- mbInsOnlyTxtGlssry =
- mbContains_MSVBasic =
- mbKernAsianPunctuation =
-#ifndef PRODUCT
- mbXMLExport =
-#endif
- // --> OD 2006-03-21 #b6375613#
- mbApplyWorkaroundForB6375613 =
- // <--
- false;
-
- mbGroupUndo =
- mbNewFldLst =
- mbVisibleLinks =
- mbPurgeOLE =
- true;
-
- //
- // COMPATIBILITY FLAGS START
- //
-
- // Note: Any non-hidden compatibility flag should obtain its default
- // by asking SvtCompatibilityOptions, see below.
- //
- const SvtCompatibilityOptions aOptions;
- */
pRet->mbParaSpaceMax = mbParaSpaceMax ;
pRet->mbParaSpaceMaxAtPages = mbParaSpaceMaxAtPages ;
pRet->mbTabCompat = mbTabCompat ;
@@ -1286,92 +1147,16 @@ SwDoc* SwDoc::CreateCopy() const
//
// COMPATIBILITY FLAGS END
//
- /*
- pMacroTable = new SvxMacroTableDtor;
-
- mpGrammarContact = ::createGrammarContact();
-
- // Formate
- pFrmFmtTbl->Insert(pDfltFrmFmt, 0 );
- pCharFmtTbl->Insert(pDfltCharFmt, 0 );
-
- // FmtColls
- // TXT
- pTxtFmtCollTbl->Insert(pDfltTxtFmtColl, 0 );
- // GRF
- pGrfFmtCollTbl->Insert(pDfltGrfFmtColl, 0 );
-
- // PageDesc, EmptyPageFmt und ColumnFmt anlegen
- if ( !aPageDescs.Count() )
- GetPageDescFromPool( RES_POOLPAGE_STANDARD );
-
- //Leere Seite Einstellen.
- pEmptyPageFmt->SetFmtAttr( SwFmtFrmSize( ATT_FIX_SIZE ) );
- //BodyFmt fuer Spalten Einstellen.
- pColumnContFmt->SetFmtAttr( SwFmtFillOrder( ATT_LEFT_TO_RIGHT ) );
-
- _InitFieldTypes();
-
- // lege (fuer die Filter) eine Default-OutlineNumRule an
- // --> OD 2008-02-11 #newlistlevelattrs#
- pOutlineRule = new SwNumRule( String::CreateFromAscii( SwNumRule::GetOutlineRuleName() ),
- // --> OD 2008-06-06 #i89178#
- numfunc::GetDefaultPositionAndSpaceMode(),
- // <--
- OUTLINE_RULE );
- // <--
- // #115901#
- AddNumRule(pOutlineRule);
- // --> OD 2005-10-21 - counting of phantoms depends on <IsOldNumbering()>
- pOutlineRule->SetCountPhantoms( !get(IDocumentSettingAccess::OLD_NUMBERING) );
- // <--
-
- new SwTxtNode( SwNodeIndex( aUndoNodes.GetEndOfContent() ), pDfltTxtFmtColl );
- new SwTxtNode( SwNodeIndex( aNodes.GetEndOfContent() ),
- GetTxtCollFromPool( RES_POOLCOLL_STANDARD ));
-
- // den eigenen IdleTimer setzen
- aIdleTimer.SetTimeout( 600 );
- aIdleTimer.SetTimeoutHdl( LINK(this, SwDoc, DoIdleJobs) );
-
- aOLEModifiedTimer.SetTimeout( 1000 );
- aOLEModifiedTimer.SetTimeoutHdl( LINK( this, SwDoc, DoUpdateModifiedOLE ));
-
- // DBMgr anlegen
- pNewDBMgr = new SwNewDBMgr;
-
- // create TOXTypes
- ShellResource* pShellRes = ViewShell::GetShellRes();
-
- SwTOXType * pNew = new SwTOXType(TOX_CONTENT, pShellRes->aTOXContentName );
- pTOXTypes->Insert( pNew, pTOXTypes->Count() );
- pNew = new SwTOXType(TOX_INDEX, pShellRes->aTOXIndexName );
- pTOXTypes->Insert( pNew, pTOXTypes->Count() );
- pNew = new SwTOXType(TOX_USER, pShellRes->aTOXUserName );
- pTOXTypes->Insert( pNew, pTOXTypes->Count() );
- pNew = new SwTOXType(TOX_ILLUSTRATIONS, pShellRes->aTOXIllustrationsName );
- pTOXTypes->Insert( pNew, pTOXTypes->Count() );
- pNew = new SwTOXType(TOX_OBJECTS, pShellRes->aTOXObjectsName );
- pTOXTypes->Insert( pNew, pTOXTypes->Count() );
- pNew = new SwTOXType(TOX_TABLES, pShellRes->aTOXTablesName );
- pTOXTypes->Insert( pNew, pTOXTypes->Count() );
- pNew = new SwTOXType(TOX_AUTHORITIES, pShellRes->aTOXAuthoritiesName );
- pTOXTypes->Insert( pNew, pTOXTypes->Count() );
-
- {
- SfxItemSet aIgnorableParagraphItems( GetAttrPool(),
- RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1,
- 0 );
- pStyleAccess = createStyleManager( &aIgnorableParagraphItems );
- }
-
- ResetModified();
-
-*/
- pRet->ReplaceStyles( *(SwDoc*)this );
+ pRet->ReplaceStyles( * const_cast< SwDoc*>( this ));
+ SfxObjectShellRef aDocShellRef = const_cast< SwDocShell* >( GetDocShell() );
+ pRet->SetRefForDocShell( boost::addressof(aDocShellRef) );
+ SfxObjectShellRef xRetShell = new SwDocShell( pRet, SFX_CREATE_MODE_STANDARD );
+ if( bCallInitNew )
+ xRetShell->DoInitNew();
//copy content
pRet->Paste( *this );
- return pRet;
+ pRet->SetRefForDocShell( 0 );
+ return xRetShell;
}
/*-- 08.05.2009 10:52:40---------------------------------------------------
copy document content - code from SwFEShell::Paste( SwDoc* , BOOL )
@@ -1407,8 +1192,8 @@ void SwDoc::Paste( const SwDoc& rSource )
{
aIndexBefore++;
- SwPaM aPaM(SwPosition(aIndexBefore, 0),
- SwPosition(rInsPos.nNode, 0));
+ SwPaM aPaM(SwPosition(aIndexBefore),
+ SwPosition(rInsPos.nNode));
MakeUniqueNumRules(aPaM);
}
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index db13779ad4..9615aa6869 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -914,17 +914,24 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
case POS_INSIDE:
{
- pNewRedl->PushData( *pRedl, FALSE );
if( *pRStt == *pStt )
{
- pRedl->SetStart( *pEnd, pRStt );
- // neu einsortieren
- pRedlineTbl->Remove( n );
- pRedlineTbl->Insert( pRedl, n );
- bDec = true;
+ // --> mst 2010-05-17 #i97421#
+ // redline w/out extent loops
+ if (*pStt != *pEnd)
+ // <--
+ {
+ pNewRedl->PushData( *pRedl, FALSE );
+ pRedl->SetStart( *pEnd, pRStt );
+ // re-insert
+ pRedlineTbl->Remove( n );
+ pRedlineTbl->Insert( pRedl, n );
+ bDec = true;
+ }
}
else
{
+ pNewRedl->PushData( *pRedl, FALSE );
if( *pREnd != *pEnd )
{
pNew = new SwRedline( *pRedl );
@@ -1109,8 +1116,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
case POS_EQUAL:
case POS_INSIDE:
- // TODO Check if there is any side effect
- //delete pNewRedl, pNewRedl = 0;
+ delete pNewRedl, pNewRedl = 0;
break;
case POS_OUTSIDE:
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index fde92f6f85..4eda348cd3 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -366,26 +366,23 @@ const SwTOXBaseSection* SwDoc::InsertTableOf( const SwPosition& rPos,
{
StartUndo( UNDO_INSTOX, NULL );
- SwTOXBaseSection* pNew = new SwTOXBaseSection( rTOX );
String sSectNm( rTOX.GetTOXName() );
sSectNm = GetUniqueTOXBaseName( *rTOX.GetTOXType(), &sSectNm );
- pNew->SetTOXName(sSectNm);
- pNew->SwSection::SetName(sSectNm);
SwPaM aPam( rPos );
- SwSection* pSect = InsertSwSection( aPam, *pNew, pSet, false );
- if( pSect )
+ SwSectionData aSectionData( TOX_CONTENT_SECTION, sSectNm );
+ SwTOXBaseSection *const pNewSection = dynamic_cast<SwTOXBaseSection *>(
+ InsertSwSection( aPam, aSectionData, & rTOX, pSet, false ));
+ if (pNewSection)
{
- SwSectionNode* pSectNd = pSect->GetFmt()->GetSectionNode();
- SwSection* pCl = pNew;
- pSect->GetFmt()->Add( pCl );
- pSectNd->SetNewSection( pNew );
+ SwSectionNode *const pSectNd = pNewSection->GetFmt()->GetSectionNode();
+ pNewSection->SetTOXName(sSectNm); // rTOX may have had no name...
if( bExpand )
{
// OD 19.03.2003 #106329# - add value for 2nd parameter = true to
// indicate, that a creation of a new table of content has to be performed.
// Value of 1st parameter = default value.
- pNew->Update( 0, true );
+ pNewSection->Update( 0, true );
}
else if( 1 == rTOX.GetTitle().Len() && IsInReading() )
// insert title of TOX
@@ -396,24 +393,22 @@ const SwTOXBaseSection* SwDoc::InsertTableOf( const SwPosition& rPos,
SwTxtNode* pHeadNd = GetNodes().MakeTxtNode( aIdx,
GetTxtCollFromPool( RES_POOLCOLL_STANDARD ) );
- String sNm( pNew->GetTOXName() );
+ String sNm( pNewSection->GetTOXName() );
// ??Resource
sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "_Head" ));
- SwSection aSect( TOX_HEADER_SECTION, sNm );
+ SwSectionData headerData( TOX_HEADER_SECTION, sNm );
SwNodeIndex aStt( *pHeadNd ); aIdx--;
SwSectionFmt* pSectFmt = MakeSectionFmt( 0 );
- GetNodes().InsertSection( aStt, *pSectFmt, aSect, &aIdx,
- TRUE, FALSE );
+ GetNodes().InsertTextSection(
+ aStt, *pSectFmt, headerData, 0, &aIdx, true, false);
}
}
- else
- delete pNew, pNew = 0;
EndUndo( UNDO_INSTOX, NULL );
- return pNew;
+ return pNewSection;
}
@@ -433,13 +428,10 @@ const SwTOXBaseSection* SwDoc::InsertTableOf( ULONG nSttNd, ULONG nEndNd,
pSectNd = pSectNd->StartOfSectionNode()->FindSectionNode();
}
- // create SectionNode around the Nodes
- SwTOXBaseSection* pNew = new SwTOXBaseSection( rTOX );
-
String sSectNm( rTOX.GetTOXName() );
sSectNm = GetUniqueTOXBaseName(*rTOX.GetTOXType(), &sSectNm);
- pNew->SetTOXName(sSectNm);
- pNew->SwSection::SetName(sSectNm);
+
+ SwSectionData aSectionData( TOX_CONTENT_SECTION, sSectNm );
SwNodeIndex aStt( GetNodes(), nSttNd ), aEnd( GetNodes(), nEndNd );
SwSectionFmt* pFmt = MakeSectionFmt( 0 );
@@ -448,20 +440,18 @@ const SwTOXBaseSection* SwDoc::InsertTableOf( ULONG nSttNd, ULONG nEndNd,
// --aEnd; // im InsertSection ist Ende inclusive
- pSectNd = GetNodes().InsertSection( aStt, *pFmt, *pNew, &aEnd );
- if( pSectNd )
+ SwSectionNode *const pNewSectionNode =
+ GetNodes().InsertTextSection(aStt, *pFmt, aSectionData, &rTOX, &aEnd);
+ if (!pNewSectionNode)
{
- SwSection* pCl = pNew;
- pFmt->Add( pCl );
- pSectNd->SetNewSection( pNew );
- }
- else
- {
- delete pNew, pNew = 0;
DelSectionFmt( pFmt );
+ return 0;
}
- return pNew;
+ SwTOXBaseSection *const pNewSection(
+ dynamic_cast<SwTOXBaseSection*>(& pNewSectionNode->GetSection()));
+ pNewSection->SetTOXName(sSectNm); // rTOX may have had no name...
+ return pNewSection;
}
/*--------------------------------------------------------------------
@@ -578,7 +568,7 @@ BOOL SwDoc::DeleteTOX( const SwTOXBase& rTOXBase, BOOL bDelNodes )
aSearchPam will contain the point where to move the cursors
to. */
SwPaM aSearchPam(*pMyNode->EndOfSectionNode());
- SwPosition aEndPos(*pStartNd->EndOfSectionNode(), 0);
+ SwPosition aEndPos(*pStartNd->EndOfSectionNode());
if (! aSearchPam.Move() /* no content node found */
|| *aSearchPam.GetPoint() >= aEndPos /* content node found
outside surrounding */
@@ -588,7 +578,7 @@ BOOL SwDoc::DeleteTOX( const SwTOXBase& rTOXBase, BOOL bDelNodes )
content node */
SwPaM aTmpPam(*pMyNode);
aSearchPam = aTmpPam;
- SwPosition aStartPos(*pStartNd, 0);
+ SwPosition aStartPos(*pStartNd);
if ( ! aSearchPam.Move(fnMoveBackward) /* no content node found */
|| *aSearchPam.GetPoint() <= aStartPos /* content node
@@ -599,7 +589,7 @@ BOOL SwDoc::DeleteTOX( const SwTOXBase& rTOXBase, BOOL bDelNodes )
/* There is no content node in the surrounding of
TOX'. Append text node behind TOX' section. */
- SwPosition aInsPos(*pMyNode->EndOfSectionNode(), 0);
+ SwPosition aInsPos(*pMyNode->EndOfSectionNode());
AppendTxtNode(aInsPos);
SwPaM aTmpPam1(aInsPos);
@@ -697,7 +687,7 @@ String SwDoc::GetUniqueTOXBaseName( const SwTOXType& rType,
if( 0 != ( pSectNd = (*pSectionFmtTbl)[ n ]->GetSectionNode( FALSE ) )&&
TOX_CONTENT_SECTION == (pSect = &pSectNd->GetSection())->GetType())
{
- const String& rNm = pSect->GetName();
+ const String& rNm = pSect->GetSectionName();
if( rNm.Match( aName ) == nNmLen )
{
// Nummer bestimmen und das Flag setzen
@@ -743,7 +733,7 @@ BOOL SwDoc::SetTOXBaseName(const SwTOXBase& rTOXBase, const String& rName)
if(bRet)
{
pTOX->SetTOXName(rName);
- pTOX->SwTOXBaseSection::SetName(rName);
+ pTOX->SetSectionName(rName);
SetModified();
}
return bRet;
@@ -776,11 +766,12 @@ const SwTxtNode* lcl_FindChapterNode( const SwNode& rNd, BYTE nLvl = 0 )
Beschreibung: Verzeichnis-Klasse
--------------------------------------------------------------------*/
-SwTOXBaseSection::SwTOXBaseSection( const SwTOXBase& rBase )
- : SwTOXBase( rBase ), SwSection( TOX_CONTENT_SECTION, aEmptyStr )
+SwTOXBaseSection::SwTOXBaseSection(SwTOXBase const& rBase, SwSectionFmt & rFmt)
+ : SwTOXBase( rBase )
+ , SwSection( TOX_CONTENT_SECTION, aEmptyStr, rFmt )
{
SetProtect( rBase.IsProtected() );
- SwSection::SetName( GetTOXName() );
+ SetSectionName( GetTOXName() );
}
@@ -962,12 +953,12 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
// ??Resource
sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "_Head" ));
- SwSection aSect( TOX_HEADER_SECTION, sNm );
+ SwSectionData headerData( TOX_HEADER_SECTION, sNm );
SwNodeIndex aStt( *pHeadNd ); aIdx--;
SwSectionFmt* pSectFmt = pDoc->MakeSectionFmt( 0 );
- pDoc->GetNodes().InsertSection( aStt, *pSectFmt, aSect, &aIdx,
- TRUE, FALSE );
+ pDoc->GetNodes().InsertTextSection(
+ aStt, *pSectFmt, headerData, 0, &aIdx, true, false);
}
// jetzt waere ein prima Zeitpunkt, um die Numerierung zu updaten
diff --git a/sw/source/core/doc/extinput.cxx b/sw/source/core/doc/extinput.cxx
index 0ab4fdd659..6d036fb5e8 100644
--- a/sw/source/core/doc/extinput.cxx
+++ b/sw/source/core/doc/extinput.cxx
@@ -54,6 +54,9 @@ SwExtTextInput::SwExtTextInput( const SwPaM& rPam, Ring* pRing )
SwExtTextInput::~SwExtTextInput()
{
+ SwDoc *const pDoc = GetDoc();
+ if (pDoc->IsInDtor()) { return; /* #i58606# */ }
+
SwTxtNode* pTNd = GetPoint()->nNode.GetNode().GetTxtNode();
if( pTNd )
{
@@ -69,7 +72,6 @@ SwExtTextInput::~SwExtTextInput()
// damit Undo / Redlining usw. richtig funktioniert,
// muss ueber die Doc-Schnittstellen gegangen werden !!!
- SwDoc* pDoc = GetDoc();
if(eInputLanguage != LANGUAGE_DONTKNOW)
{
// --> FME 2005-02-11 #i41974# Only set language attribute
diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx
index ad29e27474..d3c8d7f30c 100644
--- a/sw/source/core/doc/htmltbl.cxx
+++ b/sw/source/core/doc/htmltbl.cxx
@@ -377,32 +377,12 @@ USHORT SwHTMLTableLayout::GetBrowseWidth( const SwDoc& rDoc )
return (USHORT)pPageFrm->Prt().Width();
}
- // Sonst versuchen wir es ueber die ViewShell
- USHORT nWidth = GetBrowseWidthByVisArea( rDoc );
- if( !nWidth )
- {
- // Und wenn das auch nicht geht, gibt es noch die ActualSize an der
- // DocShell.
- if( rDoc.GetDocShell() && GetpApp() && GetpApp()->GetDefaultDevice() )
- {
- // this case shouldn't happen because the filter always waits until
- // a view has been created
-/*
- nWidth = (USHORT)Application::GetDefaultDevice()
- ->PixelToLogic( rDoc.GetDocShell()->GetActualSize(),
- MapMode( MAP_TWIP ) ).Width();
-*/
- ASSERT( nWidth, "No browse width available" );
- }
-#ifdef DBG_UTIL
- else
- {
- // und wenn das auch nicht klappt, gibt es zur Zeit keine Breite
- ASSERT( nWidth, "No browse width available" );
- }
-#endif
- }
- return nWidth;
+ // --> OD 2010-05-12 #i91658#
+ // Assertion removed which state that no browse width is available.
+ // Investigation reveals that all calls can handle the case that no browse
+ // width is provided.
+ return GetBrowseWidthByVisArea( rDoc );
+ // <--
}
USHORT SwHTMLTableLayout::GetBrowseWidthByTabFrm(
@@ -1859,7 +1839,7 @@ BOOL SwHTMLTableLayout::Resize( USHORT nAbsAvail, BOOL bRecalc,
// weil sond die Umschaltung von relativ nach absolut nicht funktioniert.
if( pDoc->GetRootFrm() && pDoc->get(IDocumentSettingAccess::BROWSE_MODE) )
{
- USHORT nVisAreaWidth = GetBrowseWidthByVisArea( *pDoc );
+ const USHORT nVisAreaWidth = GetBrowseWidthByVisArea( *pDoc );
if( nVisAreaWidth < nAbsAvail && !FindFlyFrmFmt() )
nAbsAvail = nVisAreaWidth;
}
diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx
index 4fcd2d9e4f..ef65d7dbfb 100644
--- a/sw/source/core/docnode/ndcopy.cxx
+++ b/sw/source/core/docnode/ndcopy.cxx
@@ -919,6 +919,12 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
bool bCopyBookmarks = true;
BOOL bStartIsTxtNode = 0 != pSttTxtNd;
+ // #i104585# copy outline num rule to clipboard (for ASCII filter)
+ if (pDoc->IsClipBoard() && GetOutlineNumRule())
+ {
+ pDoc->SetOutlineNumRule(*GetOutlineNumRule());
+ }
+
// --> OD 2009-08-25 #i86492#
// Correct the search for a previous list:
// First search for non-outline numbering list. Then search for non-outline
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index 1538b0a29c..fc8c431f52 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -137,7 +137,7 @@ bool lcl_IsInSameTblBox( SwNodes& _rNds,
return true;
}
-void lcl_CheckEmptyLayFrm( SwNodes& rNds, SwSection& rSect,
+void lcl_CheckEmptyLayFrm( SwNodes& rNds, SwSectionData& rSectionData,
const SwNode& rStt, const SwNode& rEnd )
{
SwNodeIndex aIdx( rStt );
@@ -151,12 +151,16 @@ void lcl_CheckEmptyLayFrm( SwNodes& rNds, SwSection& rSect,
!CheckNodesRange( rEnd, aIdx, TRUE ) ||
// OD 04.11.2003 #i21457#
!lcl_IsInSameTblBox( rNds, rEnd, false ))
- rSect.SetHidden( FALSE );
+ {
+ rSectionData.SetHidden( false );
+ }
}
}
-SwSection* SwDoc::InsertSwSection( const SwPaM& rRange, const SwSection& rNew,
- const SfxItemSet* pAttr, bool bUpdate )
+SwSection *
+SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
+ SwTOXBase const*const pTOXBase,
+ SfxItemSet const*const pAttr, bool const bUpdate)
{
const SwNode* pPrvNd = 0;
USHORT nRegionRet = 0;
@@ -169,14 +173,15 @@ SwSection* SwDoc::InsertSwSection( const SwPaM& rRange, const SwSection& rNew,
// Teste ob das gesamte Dokument versteckt werden soll,
// koennen wir zur Zeit nicht !!!!
- if( rNew.IsHidden() && rRange.HasMark() )
+ if (rNewData.IsHidden() && rRange.HasMark())
{
const SwPosition *pStt = rRange.Start(), *pEnd = rRange.End();
if( !pStt->nContent.GetIndex() &&
pEnd->nNode.GetNode().GetCntntNode()->Len() ==
pEnd->nContent.GetIndex() )
{
- ::lcl_CheckEmptyLayFrm( GetNodes(), const_cast<SwSection&>(rNew),
+ ::lcl_CheckEmptyLayFrm( GetNodes(),
+ rNewData,
pStt->nNode.GetNode(),
pEnd->nNode.GetNode() );
}
@@ -186,7 +191,7 @@ SwSection* SwDoc::InsertSwSection( const SwPaM& rRange, const SwSection& rNew,
if( DoesUndo() )
{
ClearRedo();
- pUndoInsSect = new SwUndoInsSection( rRange, rNew, pAttr );
+ pUndoInsSect = new SwUndoInsSection(rRange, rNewData, pAttr, pTOXBase);
AppendUndo( pUndoInsSect );
DoUndo( FALSE );
}
@@ -216,7 +221,8 @@ SwSection* SwDoc::InsertSwSection( const SwPaM& rRange, const SwSection& rNew,
aEnd++;
--aEnd; // im InsertSection ist Ende inclusive
- pNewSectNode = GetNodes().InsertSection( aStt, *pFmt, rNew, &aEnd );
+ pNewSectNode = GetNodes().InsertTextSection(
+ aStt, *pFmt, rNewData, pTOXBase, & aEnd);
}
else
{
@@ -287,8 +293,8 @@ SwSection* SwDoc::InsertSwSection( const SwPaM& rRange, const SwSection& rNew,
pEndPos->nContent.Assign( pTNd, nCntnt );
}
}
- pNewSectNode = GetNodes().InsertSection( pSttPos->nNode, *pFmt, rNew,
- &pEndPos->nNode );
+ pNewSectNode = GetNodes().InsertTextSection(
+ pSttPos->nNode, *pFmt, rNewData, pTOXBase, &pEndPos->nNode);
}
}
else
@@ -297,11 +303,13 @@ SwSection* SwDoc::InsertSwSection( const SwPaM& rRange, const SwSection& rNew,
const SwCntntNode* pCNd = pPos->nNode.GetNode().GetCntntNode();
if( !pPos->nContent.GetIndex() )
{
- pNewSectNode = GetNodes().InsertSection( pPos->nNode, *pFmt, rNew, 0, TRUE );
+ pNewSectNode = GetNodes().InsertTextSection(
+ pPos->nNode, *pFmt, rNewData, pTOXBase, 0, true);
}
else if( pPos->nContent.GetIndex() == pCNd->Len() )
{
- pNewSectNode = GetNodes().InsertSection( pPos->nNode, *pFmt, rNew, 0, FALSE );
+ pNewSectNode = GetNodes().InsertTextSection(
+ pPos->nNode, *pFmt, rNewData, pTOXBase, 0, false);
}
else
{
@@ -310,7 +318,8 @@ SwSection* SwDoc::InsertSwSection( const SwPaM& rRange, const SwSection& rNew,
pUndoInsSect->SaveSplitNode( (SwTxtNode*)pCNd, TRUE );
}
SplitNode( *pPos, false );
- pNewSectNode = GetNodes().InsertSection( pPos->nNode, *pFmt, rNew, 0, TRUE );
+ pNewSectNode = GetNodes().InsertTextSection(
+ pPos->nNode, *pFmt, rNewData, pTOXBase, 0, true);
}
}
@@ -334,7 +343,7 @@ SwSection* SwDoc::InsertSwSection( const SwPaM& rRange, const SwSection& rNew,
}
// ist eine Condition gesetzt
- if( rNew.IsHidden() && rNew.GetCondition().Len() )
+ if (rNewData.IsHidden() && rNewData.GetCondition().Len())
{
// dann berechne bis zu dieser Position
SwCalc aCalc( *this );
@@ -368,7 +377,7 @@ SwSection* SwDoc::InsertSwSection( const SwPaM& rRange, const SwSection& rNew,
DoUndo( TRUE );
}
- if( rNew.IsLinkType() )
+ if (rNewData.IsLinkType())
{
pNewSectNode->GetSection().CreateLink( bUpdate ? CREATE_UPDATE : CREATE_CONNECT );
}
@@ -549,7 +558,7 @@ void SwDoc::DelSectionFmt( SwSectionFmt *pFmt, BOOL bDelNodes )
EndUndo(UNDO_DELSECTION, NULL);
return ;
}
- AppendUndo( new SwUndoDelSection( *pFmt ) );
+ AppendUndo( MakeUndoDelSection( *pFmt ) );
}
else if( bDelNodes && pIdx && &GetNodes() == &pIdx->GetNodes() &&
0 != (pSectNd = pIdx->GetNode().GetSectionNode() ))
@@ -609,9 +618,8 @@ void SwDoc::DelSectionFmt( SwSectionFmt *pFmt, BOOL bDelNodes )
SetModified();
}
-void SwDoc::ChgSection( USHORT nPos, const SwSection& rSect,
- const SfxItemSet* pAttr,
- sal_Bool bPreventLinkUpdate )
+void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
+ SfxItemSet const*const pAttr, bool const bPreventLinkUpdate)
{
SwSectionFmt* pFmt = (*pSectionFmtTbl)[ nPos ];
SwSection* pSection = pFmt->GetSection();
@@ -619,7 +627,7 @@ void SwDoc::ChgSection( USHORT nPos, const SwSection& rSect,
/// remember hidden condition flag of SwSection before changes
bool bOldCondHidden = pSection->IsCondHidden() ? true : false;
- if( *pSection == rSect )
+ if (pSection->DataEquals(rNewData))
{
// die Attribute ueberpruefen
BOOL bOnlyAttrChg = FALSE;
@@ -647,7 +655,7 @@ void SwDoc::ChgSection( USHORT nPos, const SwSection& rSect,
if( DoesUndo() )
{
ClearRedo();
- AppendUndo( new SwUndoChgSection( *pFmt, TRUE ) );
+ AppendUndo( MakeUndoUpdateSection( *pFmt, true ) );
// --> FME 2004-10-13 #i32968#
// Inserting columns in the section causes MakeFrmFmt to put two
// objects of type SwUndoFrmFmt on the undo stack. We don't want them.
@@ -668,12 +676,19 @@ void SwDoc::ChgSection( USHORT nPos, const SwSection& rSect,
// versteckt werden soll, koennen wir zur Zeit nicht !!!!
const SwNodeIndex* pIdx = 0;
{
- const SwSectionNode* pSectNd;
- if( rSect.IsHidden() && 0 != (pIdx = pFmt->GetCntnt().GetCntntIdx() )
- && 0 != (pSectNd = pIdx->GetNode().GetSectionNode() ) )
+ if (rNewData.IsHidden())
{
- ::lcl_CheckEmptyLayFrm( GetNodes(), (SwSection&)rSect,
+ pIdx = pFmt->GetCntnt().GetCntntIdx();
+ if (pIdx)
+ {
+ const SwSectionNode* pSectNd =
+ pIdx->GetNode().GetSectionNode();
+ if (pSectNd)
+ {
+ ::lcl_CheckEmptyLayFrm( GetNodes(), rNewData,
*pSectNd, *pSectNd->EndOfSectionNode() );
+ }
+ }
}
}
@@ -681,7 +696,7 @@ void SwDoc::ChgSection( USHORT nPos, const SwSection& rSect,
if( DoesUndo() )
{
ClearRedo();
- AppendUndo( new SwUndoChgSection( *pFmt, FALSE ) );
+ AppendUndo( MakeUndoUpdateSection( *pFmt, false ) );
// --> FME 2004-10-13 #i32968#
// Inserting columns in the section causes MakeFrmFmt to put two
// objects of type SwUndoFrmFmt on the undo stack. We don't want them.
@@ -692,14 +707,14 @@ void SwDoc::ChgSection( USHORT nPos, const SwSection& rSect,
// #56167# Der LinkFileName koennte auch nur aus Separatoren bestehen
String sCompareString = sfx2::cTokenSeperator;
sCompareString += sfx2::cTokenSeperator;
- BOOL bUpdate = ( !pSection->IsLinkType() && rSect.IsLinkType() ) ||
- ( rSect.GetLinkFileName().Len() &&
- rSect.GetLinkFileName() != sCompareString &&
- rSect.GetLinkFileName() !=
- pSection->GetLinkFileName());
-
- String sSectName( rSect.GetName() );
- if( sSectName != pSection->GetName() )
+ const bool bUpdate =
+ (!pSection->IsLinkType() && rNewData.IsLinkType())
+ || ( rNewData.GetLinkFileName().Len()
+ && (rNewData.GetLinkFileName() != sCompareString)
+ && (rNewData.GetLinkFileName() != pSection->GetLinkFileName()));
+
+ String sSectName( rNewData.GetSectionName() );
+ if (sSectName != pSection->GetSectionName())
GetUniqueSectionName( &sSectName );
else
sSectName.Erase();
@@ -711,13 +726,15 @@ void SwDoc::ChgSection( USHORT nPos, const SwSection& rSect,
/// or it is set to the value of SwSection which is assigned to it.
/// Discussion with AMA results that the adjustment to the assignment operator
/// could be very risky -> see notes in bug #102894#.
- *pSection = rSect;
+ pSection->SetSectionData(rNewData);
if( pAttr )
pSection->GetFmt()->SetFmtAttr( *pAttr );
if( sSectName.Len() )
- pSection->SetName( sSectName );
+ {
+ pSection->SetSectionName( sSectName );
+ }
// ist eine Condition gesetzt
if( pSection->IsHidden() && pSection->GetCondition().Len() )
@@ -729,7 +746,7 @@ void SwDoc::ChgSection( USHORT nPos, const SwSection& rSect,
FldsToCalc( aCalc, pIdx->GetIndex(), USHRT_MAX );
/// OD 04.10.2002 #102894#
/// Because on using SwSection::operator=() to set up <pSection>
- /// with <rSect> and the above given note, the hidden condition flag
+ /// with <rNewData> and the above given note, the hidden condition flag
/// has to be set to FALSE, if hidden condition flag of <pFmt->GetSection()>
/// (SwSection before the changes) is FALSE (already saved in <bOldCondHidden>)
/// and new calculated condition is TRUE.
@@ -800,17 +817,18 @@ void lcl_DeleteFtn( SwSectionNode *pNd, ULONG nStt, ULONG nEnd )
}
}
-inline BOOL lcl_IsTOXSection( const SwSection& rSection )
+static inline bool lcl_IsTOXSection(SwSectionData const& rSectionData)
{
- return TOX_CONTENT_SECTION == rSection.GetType() ||
- TOX_HEADER_SECTION == rSection.GetType();
+ return (TOX_CONTENT_SECTION == rSectionData.GetType())
+ || (TOX_HEADER_SECTION == rSectionData.GetType());
}
-SwSectionNode* SwNodes::InsertSection( const SwNodeIndex& rNdIdx,
+SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx,
SwSectionFmt& rSectionFmt,
- const SwSection& rSection,
- const SwNodeIndex* pEnde,
- BOOL bInsAtStart, BOOL bCreateFrms )
+ SwSectionData const& rSectionData,
+ SwTOXBase const*const pTOXBase,
+ SwNodeIndex const*const pEnde,
+ bool const bInsAtStart, bool const bCreateFrms)
{
SwNodeIndex aInsPos( rNdIdx );
if( !pEnde ) // kein Bereich also neue Section davor/hinter anlegen
@@ -821,7 +839,7 @@ SwSectionNode* SwNodes::InsertSection( const SwNodeIndex& rNdIdx,
if( bInsAtStart )
{
- if( !lcl_IsTOXSection( rSection ))
+ if (!lcl_IsTOXSection(rSectionData))
{
do {
aInsPos--;
@@ -833,15 +851,20 @@ SwSectionNode* SwNodes::InsertSection( const SwNodeIndex& rNdIdx,
{
SwNode* pNd;
aInsPos++;
- if( !lcl_IsTOXSection( rSection ))
+ if (!lcl_IsTOXSection(rSectionData))
+ {
while( aInsPos.GetIndex() < Count() - 1 &&
( pNd = &aInsPos.GetNode())->IsEndNode() &&
pNd->StartOfSectionNode()->IsSectionNode())
+ {
aInsPos++;
+ }
+ }
}
}
- SwSectionNode* pSectNd = new SwSectionNode( aInsPos, rSectionFmt );
+ SwSectionNode *const pSectNd =
+ new SwSectionNode(aInsPos, rSectionFmt, pTOXBase);
if( pEnde )
{
// Sonderfall fuer die Reader/Writer
@@ -908,7 +931,7 @@ SwSectionNode* SwNodes::InsertSection( const SwNodeIndex& rNdIdx,
}
new SwEndNode( aInsPos, *pSectNd );
- pSectNd->GetSection() = rSection;
+ pSectNd->GetSection().SetSectionData(rSectionData);
SwSectionFmt* pSectFmt = pSectNd->GetSection().GetFmt();
// Hier bietet sich als Optimierung an, vorhandene Frames nicht zu
@@ -998,17 +1021,28 @@ SwSectionNode* SwNode::FindSectionNode()
// SwSectionNode
//---------
-SwSectionNode::SwSectionNode( const SwNodeIndex& rIdx, SwSectionFmt& rFmt )
- : SwStartNode( rIdx, ND_SECTIONNODE )
+// ugly hack to make m_pSection const
+static SwSectionFmt &
+lcl_initParent(SwSectionNode & rThis, SwSectionFmt & rFmt)
{
- SwSectionNode* pParent = StartOfSectionNode()->FindSectionNode();
+ SwSectionNode *const pParent =
+ rThis.StartOfSectionNode()->FindSectionNode();
if( pParent )
{
// das Format beim richtigen Parent anmelden.
rFmt.SetDerivedFrom( pParent->GetSection().GetFmt() );
}
- pSection = new SwSection( CONTENT_SECTION, rFmt.GetName(), &rFmt );
+ return rFmt;
+}
+SwSectionNode::SwSectionNode(SwNodeIndex const& rIdx,
+ SwSectionFmt & rFmt, SwTOXBase const*const pTOXBase)
+ : SwStartNode( rIdx, ND_SECTIONNODE )
+ , m_pSection( (pTOXBase)
+ ? new SwTOXBaseSection(*pTOXBase, lcl_initParent(*this, rFmt))
+ : new SwSection( CONTENT_SECTION, rFmt.GetName(),
+ lcl_initParent(*this, rFmt) ) )
+{
// jetzt noch die Verbindung von Format zum Node setzen
// Modify unterdruecken, interresiert keinen
rFmt.LockModify();
@@ -1049,7 +1083,7 @@ SwFrm* SwClearDummies( SwFrm* pFrm )
SwSectionNode::~SwSectionNode()
{
{
- SwClientIter aIter( *(pSection->GetFmt()) );
+ SwClientIter aIter( *(m_pSection->GetFmt()) );
SwClient *pLast = aIter.GoStart();
while ( pLast )
{
@@ -1065,7 +1099,7 @@ SwSectionNode::~SwSectionNode()
}
SwDoc* pDoc = GetDoc();
- SwSectionFmt* pFmt = pSection->GetFmt();
+ SwSectionFmt* pFmt = m_pSection->GetFmt();
if( pFmt )
{
// das Attribut entfernen, weil die Section ihr Format loescht
@@ -1079,41 +1113,14 @@ SwSectionNode::~SwSectionNode()
// verhinder beim Loeschen aus der Undo/Redo-History einen rekursiven Aufruf
if( bUndo && &pDoc->GetNodes() != &GetNodes() )
pDoc->DoUndo( FALSE );
- DELETEZ( pSection );
pDoc->DoUndo( bUndo );
}
-// setze ein neues SectionObject. Erstmal nur gedacht fuer die
-// neuen VerzeichnisSections. Der geht ueber in den Besitz des Nodes!
-void SwSectionNode::SetNewSection( SwSection* pNewSection )
-{
- ASSERT( pNewSection, "ohne Pointer geht hier nichts" );
- if( pNewSection )
- {
- SwNode2Layout aN2L( *this );
-
- // einige Flags sollten ueber nommen werden!
- pNewSection->bProtectFlag = pSection->bProtectFlag;
- pNewSection->bHiddenFlag = pSection->bHiddenFlag;
- pNewSection->bHidden = pSection->bHidden;
- pNewSection->bCondHiddenFlag = pSection->bCondHiddenFlag;
-
- // The section frame contains a pointer to the section. That for,
- // the frame must be destroyed before deleting the section.
- DelFrms();
-
- delete pSection;
- pSection = pNewSection;
-
- ULONG nIdx = GetIndex();
- aN2L.RestoreUpperFrms( GetNodes(), nIdx, nIdx + 1 );
- }
-}
SwFrm *SwSectionNode::MakeFrm()
{
- pSection->bHiddenFlag = FALSE;
- return new SwSectionFrm( *pSection );
+ m_pSection->m_Data.SetHiddenFlag(false);
+ return new SwSectionFrm( *m_pSection );
}
//Methode erzeugt fuer den vorhergehenden Node alle Ansichten vom
@@ -1240,7 +1247,7 @@ void SwSectionNode::MakeFrms( SwNodeIndex* pIdxBehind, SwNodeIndex* pEndIdx )
*pIdxBehind = *this;
- pSection->bHiddenFlag = TRUE;
+ m_pSection->m_Data.SetHiddenFlag(true);
if( rNds.IsDocNodes() )
{
@@ -1264,10 +1271,10 @@ void SwSectionNode::DelFrms()
}
SwNodes& rNds = GetNodes();
- pSection->GetFmt()->DelFrms();
+ m_pSection->GetFmt()->DelFrms();
// unser Flag muessen wir noch aktualisieren
- pSection->bHiddenFlag = TRUE;
+ m_pSection->m_Data.SetHiddenFlag(true);
// Bug 30582: falls der Bereich in Fly oder TabellenBox ist, dann
// kann er nur "gehiddet" werden, wenn weiterer Content
@@ -1285,7 +1292,9 @@ void SwSectionNode::DelFrms()
!CheckNodesRange( *EndOfSectionNode(), aIdx, TRUE ) ||
// OD 04.11.2003 #i21457#
!lcl_IsInSameTblBox( rNds, *EndOfSectionNode(), false ))
- pSection->bHiddenFlag = FALSE;
+ {
+ m_pSection->m_Data.SetHiddenFlag(false);
+ }
}
}
}
@@ -1299,37 +1308,35 @@ SwSectionNode* SwSectionNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) c
SwSectionFmt* pSectFmt = pDoc->MakeSectionFmt( 0 );
pSectFmt->CopyAttrs( *GetSection().GetFmt() );
- SwSectionNode* pSectNd = new SwSectionNode( rIdx, *pSectFmt );
+ ::std::auto_ptr<SwTOXBase> pTOXBase;
+ if (TOX_CONTENT_SECTION == GetSection().GetType())
+ {
+ ASSERT( GetSection().ISA( SwTOXBaseSection ), "no TOXBaseSection!" );
+ SwTOXBaseSection const& rTBS(
+ dynamic_cast<SwTOXBaseSection const&>(GetSection()));
+ pTOXBase.reset( new SwTOXBase(rTBS, pDoc) );
+ }
+
+ SwSectionNode *const pSectNd =
+ new SwSectionNode(rIdx, *pSectFmt, pTOXBase.get());
SwEndNode* pEndNd = new SwEndNode( rIdx, *pSectNd );
SwNodeIndex aInsPos( *pEndNd );
// Werte uebertragen
- SwSection* pNewSect = pSectNd->pSection;
+ SwSection *const pNewSect = pSectNd->m_pSection.get();
- switch( GetSection().GetType() )
+ if (TOX_CONTENT_SECTION != GetSection().GetType())
{
- case TOX_CONTENT_SECTION:
- {
- ASSERT( GetSection().ISA( SwTOXBaseSection ), "keine TOXBaseSection!" );
- SwTOXBaseSection& rTOXSect = (SwTOXBaseSection&)GetSection();
- SwTOXBase aTmp( rTOXSect, pDoc );
-
- SwTOXBaseSection* pNew = new SwTOXBaseSection( aTmp );
-
- pNewSect = pNew;
- pSectFmt->Add( pNewSect );
- pSectNd->SetNewSection( pNew );
- }
- break;
-
- default:
// beim Move den Namen beibehalten
if( rNds.GetDoc() == pDoc && pDoc->IsCopyIsMove() )
- pNewSect->SetName( GetSection().GetName() );
+ {
+ pNewSect->SetSectionName( GetSection().GetSectionName() );
+ }
else
- pNewSect->SetName( pDoc->GetUniqueSectionName(
- &GetSection().GetName() ) );
- break;
+ {
+ pNewSect->SetSectionName(
+ pDoc->GetUniqueSectionName( &GetSection().GetSectionName() ));
+ }
}
@@ -1358,18 +1365,22 @@ SwSectionNode* SwSectionNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) c
: CREATE_NONE );
// falls als Server aus dem Undo kopiert wird, wieder eintragen
- if( pSection->IsServer() && pDoc->GetUndoNds() == &rNds )
+ if (m_pSection->IsServer() && (pDoc->GetUndoNds() == &rNds))
{
- pNewSect->SetRefObject( pSection->GetObject() );
+ pNewSect->SetRefObject( m_pSection->GetObject() );
pDoc->GetLinkManager().InsertServer( pNewSect->GetObject() );
}
+ // METADATA: copy xml:id; must be done after insertion of node
+ pSectFmt->RegisterAsCopyOf(*GetSection().GetFmt());
+
return pSectNd;
}
BOOL SwSectionNode::IsCntntHidden() const
{
- ASSERT( !pSection->IsHidden(), "That's simple: Hidden Section => Hidden Content" );
+ ASSERT( !m_pSection->IsHidden(),
+ "That's simple: Hidden Section => Hidden Content" );
SwNodeIndex aTmp( *this, 1 );
ULONG nEnd = EndOfSectionIndex();
while( aTmp < nEnd )
@@ -1395,7 +1406,7 @@ BOOL SwSectionNode::IsCntntHidden() const
void SwSectionNode::NodesArrChgd()
{
- SwSectionFmt* pFmt = pSection->GetFmt();
+ SwSectionFmt *const pFmt = m_pSection->GetFmt();
if( pFmt )
{
SwNodes& rNds = GetNodes();
@@ -1431,20 +1442,28 @@ void SwSectionNode::NodesArrChgd()
{
ASSERT( pDoc == GetDoc(),
"verschieben in unterschiedliche Documente?" );
- if( pSection->IsLinkType() ) // den Link austragen
- pSection->CreateLink( pDoc->GetRootFrm() ? CREATE_CONNECT
+ if (m_pSection->IsLinkType())
+ {
+ m_pSection->CreateLink( pDoc->GetRootFrm() ? CREATE_CONNECT
: CREATE_NONE );
+ }
- if( pSection->IsServer() ) // als Server austragen
- pDoc->GetLinkManager().InsertServer( pSection->GetObject() );
+ if (m_pSection->IsServer())
+ {
+ pDoc->GetLinkManager().InsertServer( m_pSection->GetObject() );
+ }
}
else
{
- if( CONTENT_SECTION != pSection->GetType() ) // den Link austragen
- pDoc->GetLinkManager().Remove( &pSection->GetBaseLink() );
+ if (CONTENT_SECTION != m_pSection->GetType())
+ {
+ pDoc->GetLinkManager().Remove( &m_pSection->GetBaseLink() );
+ }
- if( pSection->IsServer() ) // als Server austragen
- pDoc->GetLinkManager().RemoveServer( pSection->GetObject() );
+ if (m_pSection->IsServer())
+ {
+ pDoc->GetLinkManager().RemoveServer( m_pSection->GetObject() );
+ }
}
}
}
@@ -1467,7 +1486,7 @@ String SwDoc::GetUniqueSectionName( const String* pChkStr ) const
for( n = 0; n < pSectionFmtTbl->Count(); ++n )
if( 0 != ( pSectNd = (*pSectionFmtTbl)[ n ]->GetSectionNode( FALSE ) ))
{
- const String& rNm = pSectNd->GetSection().GetName();
+ const String& rNm = pSectNd->GetSection().GetSectionName();
if( rNm.Match( aName ) == nNmLen )
{
// Nummer bestimmen und das Flag setzen
diff --git a/sw/source/core/docnode/node2lay.cxx b/sw/source/core/docnode/node2lay.cxx
index 8f19d3b1e4..3c6d85ba39 100644
--- a/sw/source/core/docnode/node2lay.cxx
+++ b/sw/source/core/docnode/node2lay.cxx
@@ -233,8 +233,8 @@ SwLayoutFrm* SwNode2LayImpl::UpperFrm( SwFrm* &rpFrm, const SwNode &rNode )
{
// #137684#: pFrm could be a "dummy"-section
if( ((SwSectionFrm*)pFrm)->GetSection() &&
- ((SwSectionNode*)pNode)->GetSection() ==
- *((SwSectionFrm*)pFrm)->GetSection() )
+ (&((SwSectionNode*)pNode)->GetSection() ==
+ ((SwSectionFrm*)pFrm)->GetSection()) )
{
// OD 2004-06-02 #i22922# - consider columned sections
// 'Go down' the section frame as long as the layout frame
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index e46b7a47f9..600aa73f1c 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -2061,11 +2061,19 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange,
// falls aEnd-1 auf keinem ContentNode steht, dann suche den vorherigen
aRg.aEnd--;
- while( (( pAktNode = (*this)[ aRg.aEnd ])->GetStartNode() &&
- !pAktNode->IsSectionNode() ) ||
- ( pAktNode->IsEndNode() &&
- ND_STARTNODE == pAktNode->pStartOfSection->GetNodeType()) )
- aRg.aEnd--;
+ // #i107142#: if aEnd is start node of a special section, do nothing.
+ // Otherwise this could lead to crash: going through all previous
+ // special section nodes and then one before the first.
+ if (aRg.aEnd.GetNode().StartOfSectionIndex() != 0)
+ {
+ while( (( pAktNode = (*this)[ aRg.aEnd ])->GetStartNode() &&
+ !pAktNode->IsSectionNode() ) ||
+ ( pAktNode->IsEndNode() &&
+ ND_STARTNODE == pAktNode->pStartOfSection->GetNodeType()) )
+ {
+ aRg.aEnd--;
+ }
+ }
aRg.aEnd++;
// wird im selben Array's verschoben, dann ueberpruefe die Einfuegepos.
diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx
index 491cb661dc..34e4f88874 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -51,9 +51,7 @@
#include <frmtool.hxx>
#include <editsh.hxx>
#include <hints.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <ndtxt.hxx>
#include <section.hxx>
#include <swserv.hxx>
@@ -70,6 +68,7 @@
#include <fmteiro.hxx>
// <--
#include <swerror.h>
+#include <unosection.hxx>
using namespace ::com::sun::star;
@@ -115,39 +114,126 @@ SV_IMPL_PTRARR( SwSections, SwSection*)
SV_IMPL_PTRARR(SwSectionFmts,SwSectionFmt*)
+SwSectionData::SwSectionData(SectionType const eType, String const& rName)
+ : m_eType(eType)
+ , m_sSectionName(rName)
+ , m_bHiddenFlag(false)
+ , m_bProtectFlag(false)
+ // --> FME 2004-06-22 #114856# edit in readonly sections
+ , m_bEditInReadonlyFlag(false)
+ // <--
+ , m_bHidden(false)
+ , m_bCondHiddenFlag(true)
+ , m_bConnectFlag(true)
+{
+}
-SwSection::SwSection( SectionType eTyp, const String& rName,
- SwSectionFmt* pFmt )
- : SwClient( pFmt ), sSectionNm( rName ),
- eType( eTyp )
+// this must have the same semantics as operator=()
+SwSectionData::SwSectionData(SwSection const& rSection)
+ : m_eType(rSection.GetType())
+ , m_sSectionName(rSection.GetSectionName())
+ , m_sCondition(rSection.GetCondition())
+ , m_sLinkFileName(rSection.GetLinkFileName())
+ , m_sLinkFilePassword(rSection.GetLinkFilePassword())
+ , m_Password(rSection.GetPassword())
+ , m_bHiddenFlag(rSection.IsHiddenFlag())
+ , m_bProtectFlag(rSection.IsProtect())
+ // --> FME 2004-06-22 #114856# edit in readonly sections
+ , m_bEditInReadonlyFlag(rSection.IsEditInReadonly())
+ // <--
+ , m_bHidden(rSection.IsHidden())
+ , m_bCondHiddenFlag(true)
+ , m_bConnectFlag(rSection.IsConnectFlag())
{
- bHidden = FALSE;
- bHiddenFlag = FALSE;
- bProtectFlag = FALSE;
+}
+
+// this must have the same semantics as operator=()
+SwSectionData::SwSectionData(SwSectionData const& rOther)
+ : m_eType(rOther.m_eType)
+ , m_sSectionName(rOther.m_sSectionName)
+ , m_sCondition(rOther.m_sCondition)
+ , m_sLinkFileName(rOther.m_sLinkFileName)
+ , m_sLinkFilePassword(rOther.m_sLinkFilePassword)
+ , m_Password(rOther.m_Password)
+ , m_bHiddenFlag(rOther.m_bHiddenFlag)
+ , m_bProtectFlag(rOther.m_bProtectFlag)
// --> FME 2004-06-22 #114856# edit in readonly sections
- bEditInReadonlyFlag = FALSE;
+ , m_bEditInReadonlyFlag(rOther.m_bEditInReadonlyFlag)
// <--
- bCondHiddenFlag = TRUE;
- bConnectFlag = TRUE;
+ , m_bHidden(rOther.m_bHidden)
+ , m_bCondHiddenFlag(true)
+ , m_bConnectFlag(rOther.m_bConnectFlag)
+{
+}
+
+// the semantics here are weird for reasons of backward compatibility
+SwSectionData & SwSectionData::operator= (SwSectionData const& rOther)
+{
+ m_eType = rOther.m_eType;
+ m_sSectionName = rOther.m_sSectionName;
+ m_sCondition = rOther.m_sCondition;
+ m_sLinkFileName = rOther.m_sLinkFileName;
+ m_sLinkFilePassword = rOther.m_sLinkFilePassword;
+ m_bConnectFlag = rOther.m_bConnectFlag;
+ m_Password = rOther.m_Password;
+
+ m_bEditInReadonlyFlag = rOther.m_bEditInReadonlyFlag;
+ m_bProtectFlag = rOther.m_bProtectFlag;
+
+ m_bHidden = rOther.m_bHidden;
+ // FIXME: old code did not assign m_bHiddenFlag ?
+ // FIXME: why should m_bCondHiddenFlag always default to true?
+ m_bCondHiddenFlag = true;
- SwSectionPtr pParentSect = GetParent();
+ return *this;
+}
+
+// the semantics here are weird for reasons of backward compatibility
+bool SwSectionData::operator==(SwSectionData const& rOther) const
+{
+ return (m_eType == rOther.m_eType)
+ && (m_sSectionName == rOther.m_sSectionName)
+ && (m_sCondition == rOther.m_sCondition)
+ && (m_bHidden == rOther.m_bHidden)
+ && (m_bProtectFlag == rOther.m_bProtectFlag)
+ && (m_bEditInReadonlyFlag == rOther.m_bEditInReadonlyFlag)
+ && (m_sLinkFileName == rOther.m_sLinkFileName)
+ && (m_sLinkFilePassword == rOther.m_sLinkFilePassword)
+ && (m_Password == rOther.m_Password);
+ // FIXME: old code ignored m_bCondHiddenFlag m_bHiddenFlag m_bConnectFlag
+}
+
+// SwSection ===========================================================
+
+SwSection::SwSection(
+ SectionType const eType, String const& rName, SwSectionFmt & rFormat)
+ : SwClient(& rFormat)
+ , m_Data(eType, rName)
+{
+ SwSection *const pParentSect = GetParent();
if( pParentSect )
{
if( pParentSect->IsHiddenFlag() )
- SetHidden( TRUE );
+ {
+ SetHidden( true );
+ }
- _SetProtectFlag( pParentSect->IsProtectFlag() );
+ m_Data.SetProtectFlag( pParentSect->IsProtectFlag() );
// --> FME 2004-06-22 #114856# edit in readonly sections
- _SetEditInReadonlyFlag( pParentSect->IsEditInReadonlyFlag() );
+ m_Data.SetEditInReadonlyFlag( pParentSect->IsEditInReadonlyFlag() );
// <--
}
- if( pFmt && !bProtectFlag )
- _SetProtectFlag( pFmt->GetProtect().IsCntntProtected() );
+ if (!m_Data.IsProtectFlag())
+ {
+ m_Data.SetProtectFlag( rFormat.GetProtect().IsCntntProtected() );
+ }
// --> FME 2004-06-22 #114856# edit in readonly sections
- if ( pFmt && !bEditInReadonlyFlag )
- _SetEditInReadonlyFlag( pFmt->GetEditInReadonly().GetValue() );
+ if (!m_Data.IsEditInReadonlyFlag())
+ {
+ m_Data.SetEditInReadonlyFlag( rFormat.GetEditInReadonly().GetValue() );
+ }
// <--
}
@@ -170,11 +256,15 @@ SwSection::~SwSection()
{
pFmt->Remove( this ); // austragen,
- if( CONTENT_SECTION != eType ) // den Link austragen
- pDoc->GetLinkManager().Remove( refLink );
+ if (CONTENT_SECTION != m_Data.GetType())
+ {
+ pDoc->GetLinkManager().Remove( m_RefLink );
+ }
- if( refObj.Is() ) // als Server austragen
- pDoc->GetLinkManager().RemoveServer( &refObj );
+ if (m_RefObj.Is())
+ {
+ pDoc->GetLinkManager().RemoveServer( &m_RefObj );
+ }
// ist die Section der letzte Client im Format, kann dieses
// geloescht werden
@@ -190,78 +280,56 @@ SwSection::~SwSection()
pDoc->DoUndo( bUndo );
}
}
- if( refObj.Is() )
- refObj->Closed();
+ if (m_RefObj.Is())
+ {
+ m_RefObj->Closed();
+ }
}
-
-SwSection& SwSection::operator=( const SwSection& rCpy )
+void SwSection::SetSectionData(SwSectionData const& rData)
{
- sSectionNm = rCpy.sSectionNm;
- sCondition = rCpy.sCondition;
- sLinkFileName = rCpy.GetLinkFileName();
- SetLinkFilePassWd( rCpy.GetLinkFilePassWd() );
- SetConnectFlag( rCpy.IsConnectFlag() );
- SetPasswd( rCpy.GetPasswd() );
-
- eType = rCpy.eType;
-
- if( !GetFmt() )
+ bool const bOldHidden( m_Data.IsHidden() );
+ m_Data = rData;
+ // now update format and reflink with new data
+// SetLinkFileName(m_Data.GetLinkFileName()); // old code did not do this?
+ // next 2 may actually overwrite m_Data.m_b{Protect,EditInReadonly}Flag
+ // in Modify, which should result in same flag value as the old code!
+ SetProtect(m_Data.IsProtectFlag());
+ SetEditInReadonly(m_Data.IsEditInReadonlyFlag());
+ if (bOldHidden != m_Data.IsHidden()) // check if changed...
{
- SetProtect( rCpy.IsProtect() );
- // --> FME 2004-06-22 #114856# edit in readonly sections
- SetEditInReadonly( rCpy.IsEditInReadonly() );
- // <--
+ ImplSetHiddenFlag(m_Data.IsHidden(), m_Data.IsCondHidden());
}
- else if( rCpy.GetFmt() )
- {
- _SetProtectFlag( rCpy.bProtectFlag );
- // --> FME 2004-06-22 #114856# edit in readonly sections
- _SetEditInReadonlyFlag( rCpy.bEditInReadonlyFlag );
- // <--
- }
- else
- {
- SetProtect( rCpy.bProtectFlag );
- // --> FME 2004-06-22 #114856# edit in readonly sections
- SetEditInReadonly( rCpy.bEditInReadonlyFlag );
- // <--
- }
-
- bCondHiddenFlag = TRUE; // sollte immer defaultet werden
- SetHidden( rCpy.bHidden );
-
- return *this;
}
-
-BOOL SwSection::operator==( const SwSection& rCmp ) const
+bool SwSection::DataEquals(SwSectionData const& rCmp) const
{
- return sSectionNm == rCmp.sSectionNm &&
- sCondition == rCmp.sCondition &&
- eType == rCmp.eType &&
- bHidden == rCmp.bHidden &&
- IsProtect() == rCmp.IsProtect() &&
- // --> FME 2004-06-22 #114856# edit in readonly sections
- IsEditInReadonly() == rCmp.IsEditInReadonly() &&
- // <--
- GetLinkFileName() == rCmp.GetLinkFileName() &&
- GetLinkFilePassWd() == rCmp.GetLinkFilePassWd() &&
- GetPasswd() == rCmp.GetPasswd() &&
- ( !GetFmt() || !rCmp.GetFmt() || GetFmt() == rCmp.GetFmt());
+ // note that the old code compared the flags of the parameter with the
+ // format attributes of this; the following mess should do the same...
+ (void) GetLinkFileName(); // updates m_sLinkFileName
+ bool const bProtect(m_Data.IsProtectFlag());
+ bool const bEditInReadonly(m_Data.IsEditInReadonlyFlag());
+ const_cast<SwSection*>(this)->m_Data.SetProtectFlag(IsProtect());
+ const_cast<SwSection*>(this)->m_Data
+ .SetEditInReadonlyFlag(IsEditInReadonly());
+ bool const bResult( m_Data == rCmp );
+ const_cast<SwSection*>(this)->m_Data.SetProtectFlag(bProtect);
+ const_cast<SwSection*>(this)->m_Data.SetEditInReadonlyFlag(bEditInReadonly);
+ return bResult;
}
-void SwSection::_SetHiddenFlag( BOOL bTmpHidden, BOOL bCondition )
+void SwSection::ImplSetHiddenFlag(bool const bTmpHidden, bool const bCondition)
{
SwSectionFmt* pFmt = GetFmt();
+ ASSERT(pFmt, "ImplSetHiddenFlag: no format?");
if( pFmt )
{
- BOOL bHide = bTmpHidden && bCondition;
+ const bool bHide = bTmpHidden && bCondition;
- if( bHide ) // die Nodes also "verstecken"
+ if (bHide) // should be hidden
{
- if( !bHiddenFlag ) // ist nicht versteckt
+ if (!m_Data.IsHiddenFlag()) // is not hidden
{
// wie sieht es mit dem Parent aus, ist der versteckt ?
// (eigentlich muesste das vom bHiddenFlag angezeigt werden!)
@@ -274,7 +342,7 @@ void SwSection::_SetHiddenFlag( BOOL bTmpHidden, BOOL bCondition )
pFmt->DelFrms();
}
}
- else if( bHiddenFlag ) // die Nodes wieder anzeigen
+ else if (m_Data.IsHiddenFlag()) // show Nodes again
{
// alle Frames sichtbar machen ( Childs Sections werden vom
// MakeFrms beruecksichtigt). Aber nur wenn die ParentSection
@@ -304,57 +372,76 @@ BOOL SwSection::CalcHiddenFlag() const
return FALSE;
}
-BOOL SwSection::_IsProtect() const
+bool SwSection::IsProtect() const
{
- return GetFmt()->GetProtect().IsCntntProtected();
+ SwSectionFmt *const pFmt( GetFmt() );
+ ASSERT(pFmt, "SwSection::IsProtect: no format?");
+ return (pFmt)
+ ? pFmt->GetProtect().IsCntntProtected()
+ : IsProtectFlag();
}
// --> FME 2004-06-22 #114856# edit in readonly sections
-BOOL SwSection::_IsEditInReadonly() const
+bool SwSection::IsEditInReadonly() const
{
- return GetFmt()->GetEditInReadonly().GetValue();
+ SwSectionFmt *const pFmt( GetFmt() );
+ ASSERT(pFmt, "SwSection::IsEditInReadonly: no format?");
+ return (pFmt)
+ ? pFmt->GetEditInReadonly().GetValue()
+ : IsEditInReadonlyFlag();
}
// <--
-void SwSection::SetHidden( BOOL bFlag )
+void SwSection::SetHidden(bool const bFlag)
{
- if( !bHidden == !bFlag )
+ if (!m_Data.IsHidden() == !bFlag)
return;
- bHidden = bFlag;
- _SetHiddenFlag( bHidden, bCondHiddenFlag );
+ m_Data.SetHidden(bFlag);
+ ImplSetHiddenFlag(bFlag, m_Data.IsCondHidden());
}
-void SwSection::SetProtect( BOOL bFlag )
+void SwSection::SetProtect(bool const bFlag)
{
- if( GetFmt() )
+ SwSectionFmt *const pFormat( GetFmt() );
+ ASSERT(pFormat, "SwSection::SetProtect: no format?");
+ if (pFormat)
{
SvxProtectItem aItem( RES_PROTECT );
aItem.SetCntntProtect( (BOOL)bFlag );
- GetFmt()->SetFmtAttr( aItem );
+ pFormat->SetFmtAttr( aItem );
+ // note: this will call m_Data.SetProtectFlag via Modify!
}
else
- bProtectFlag = bFlag;
+ {
+ m_Data.SetProtectFlag(bFlag);
+ }
}
// --> FME 2004-06-22 #114856# edit in readonly sections
-void SwSection::SetEditInReadonly( BOOL bFlag )
+void SwSection::SetEditInReadonly(bool const bFlag)
{
- if( GetFmt() )
+ SwSectionFmt *const pFormat( GetFmt() );
+ ASSERT(pFormat, "SwSection::SetEditInReadonly: no format?");
+ if (pFormat)
{
SwFmtEditInReadonly aItem;
aItem.SetValue( (BOOL)bFlag );
- GetFmt()->SetFmtAttr( aItem );
+ pFormat->SetFmtAttr( aItem );
+ // note: this will call m_Data.SetEditInReadonlyFlag via Modify!
}
else
- bEditInReadonlyFlag = bFlag;
+ {
+ m_Data.SetEditInReadonlyFlag(bFlag);
+ }
}
// <--
void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
- BOOL bRemake = FALSE, bUpdateFtn = FALSE;
+ bool bRemake = false;
+ bool bUpdateFtn = false;
switch( pOld ? pOld->Which() : pNew ? pNew->Which() : 0 )
{
case RES_ATTRSET_CHG:
@@ -366,7 +453,8 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
if( SFX_ITEM_SET == pNewSet->GetItemState(
RES_PROTECT, FALSE, &pItem ) )
{
- _SetProtectFlag( ((SvxProtectItem*)pItem)->IsCntntProtected() );
+ m_Data.SetProtectFlag( static_cast<SvxProtectItem const*>(pItem)
+ ->IsCntntProtected() );
pNewSet->ClearItem( RES_PROTECT );
pOldSet->ClearItem( RES_PROTECT );
}
@@ -375,7 +463,8 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
if( SFX_ITEM_SET == pNewSet->GetItemState(
RES_EDIT_IN_READONLY, FALSE, &pItem ) )
{
- _SetEditInReadonlyFlag( ((SwFmtEditInReadonly*)pItem)->GetValue() );
+ m_Data.SetEditInReadonlyFlag(
+ static_cast<SwFmtEditInReadonly const*>(pItem)->GetValue());
pNewSet->ClearItem( RES_EDIT_IN_READONLY );
pOldSet->ClearItem( RES_EDIT_IN_READONLY );
}
@@ -385,7 +474,9 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
RES_FTN_AT_TXTEND, FALSE, &pItem ) ||
SFX_ITEM_SET == pNewSet->GetItemState(
RES_END_AT_TXTEND, FALSE, &pItem ))
- bUpdateFtn = TRUE;
+ {
+ bUpdateFtn = true;
+ }
if( !pNewSet->Count() )
return;
@@ -395,7 +486,8 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
case RES_PROTECT:
if( pNew )
{
- BOOL bNewFlag = ((SvxProtectItem*)pNew)->IsCntntProtected();
+ bool bNewFlag =
+ static_cast<SvxProtectItem*>(pNew)->IsCntntProtected();
if( !bNewFlag )
{
// Abschalten: teste ob nicht vielleich ueber die Parents
@@ -404,32 +496,34 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
do {
if( pSect->IsProtect() )
{
- bNewFlag = TRUE;
+ bNewFlag = true;
break;
}
- } while( 0 != ( pSect = pSect->GetParent()) );
+ pSect = pSect->GetParent();
+ } while (pSect);
}
- _SetProtectFlag( bNewFlag );
+ m_Data.SetProtectFlag( bNewFlag );
}
return;
// --> FME 2004-06-22 #114856# edit in readonly sections
case RES_EDIT_IN_READONLY:
if( pNew )
{
- BOOL bNewFlag = ((SwFmtEditInReadonly*)pNew)->GetValue();
- _SetEditInReadonlyFlag( bNewFlag );
+ const bool bNewFlag =
+ static_cast<SwFmtEditInReadonly*>(pNew)->GetValue();
+ m_Data.SetEditInReadonlyFlag( bNewFlag );
}
return;
// <--
case RES_SECTION_HIDDEN:
- bHiddenFlag = TRUE;
+ m_Data.SetHiddenFlag(true);
return;
case RES_SECTION_NOT_HIDDEN:
case RES_SECTION_RESETHIDDENFLAG:
- bHiddenFlag = bHidden && bCondHiddenFlag;
+ m_Data.SetHiddenFlag( m_Data.IsHidden() && m_Data.IsCondHidden() );
return;
case RES_COL:
@@ -438,12 +532,16 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
case RES_FTN_AT_TXTEND:
if( pNew && pOld )
- bUpdateFtn = TRUE;
+ {
+ bUpdateFtn = true;
+ }
break;
case RES_END_AT_TXTEND:
if( pNew && pOld )
- bUpdateFtn = TRUE;
+ {
+ bUpdateFtn = true;
+ }
break;
}
@@ -464,38 +562,38 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
void SwSection::SetRefObject( SwServerObject* pObj )
{
- refObj = pObj;
+ m_RefObj = pObj;
}
-void SwSection::SetCondHidden( BOOL bFlag )
+void SwSection::SetCondHidden(bool const bFlag)
{
- if( !bCondHiddenFlag == !bFlag )
+ if (!m_Data.IsCondHidden() == !bFlag)
return;
- bCondHiddenFlag = bFlag;
- _SetHiddenFlag( bHidden, bCondHiddenFlag );
+ m_Data.SetCondHidden(bFlag);
+ ImplSetHiddenFlag(m_Data.IsHidden(), bFlag);
}
// setze/erfrage den gelinkten FileNamen
const String& SwSection::GetLinkFileName() const
{
- if( refLink.Is() )
+ if (m_RefLink.Is())
{
String sTmp;
- switch( eType )
+ switch (m_Data.GetType())
{
case DDE_LINK_SECTION:
- sTmp = refLink->GetLinkSourceName();
+ sTmp = m_RefLink->GetLinkSourceName();
break;
case FILE_LINK_SECTION:
{
String sRange, sFilter;
- if( refLink->GetLinkManager() &&
- refLink->GetLinkManager()->GetDisplayNames(
- refLink, 0, &sTmp, &sRange, &sFilter ) )
+ if (m_RefLink->GetLinkManager() &&
+ m_RefLink->GetLinkManager()->GetDisplayNames(
+ m_RefLink, 0, &sTmp, &sRange, &sFilter ))
{
( sTmp += sfx2::cTokenSeperator ) += sFilter;
( sTmp += sfx2::cTokenSeperator ) += sRange;
@@ -505,26 +603,29 @@ const String& SwSection::GetLinkFileName() const
// ist die Section im UndoNodesArray, dann steht
// der Link nicht im LinkManager, kann also auch nicht
// erfragt werden. Dann returne den akt. Namen
- return sLinkFileName;
+ return m_Data.GetLinkFileName();
}
}
break;
default: break;
}
- ((SwSection*)this)->sLinkFileName = sTmp;
+ const_cast<SwSection*>(this)->m_Data.SetLinkFileName(sTmp);
}
- return sLinkFileName;
+ return m_Data.GetLinkFileName();
}
-void SwSection::SetLinkFileName( const String& rNew, const String* pPassWd )
+void SwSection::SetLinkFileName(const String& rNew, String const*const pPassWd)
{
- if( refLink.Is() )
- refLink->SetLinkSourceName( rNew );
- else
- sLinkFileName = rNew;
+ if (m_RefLink.Is())
+ {
+ m_RefLink->SetLinkSourceName( rNew );
+ }
+ m_Data.SetLinkFileName(rNew);
if( pPassWd )
- SetLinkFilePassWd( *pPassWd );
+ {
+ SetLinkFilePassword( *pPassWd );
+ }
}
// falls es ein gelinkter Bereich war, dann muessen alle
@@ -563,6 +664,8 @@ const SwTOXBase* SwSection::GetTOXBase() const
return pRet;
}
+// SwSectionFmt ========================================================
+
SwSectionFmt::SwSectionFmt( SwSectionFmt* pDrvdFrm, SwDoc *pDoc )
: SwFrmFmt( pDoc->GetAttrPool(), sSectionFmtNm, pDrvdFrm )
{
@@ -594,7 +697,7 @@ SwSectionFmt::~SwSectionFmt()
if( !pParentSect || !pParentSect->IsHiddenFlag() )
{
// Nodes wieder anzeigen
- rSect.SetHidden( FALSE );
+ rSect.SetHidden(false);
}
}
SwClientIter aIter( *this );
@@ -621,7 +724,7 @@ SwSectionFmt::~SwSectionFmt()
}
-SwSectionPtr SwSectionFmt::_GetSection() const
+SwSection * SwSectionFmt::GetSection() const
{
if( GetDepends() )
{
@@ -908,7 +1011,8 @@ extern "C" {
const SwSectionPtr pFSect = *(SwSectionPtr*)pFirst;
const SwSectionPtr pSSect = *(SwSectionPtr*)pSecond;
ASSERT( pFSect && pSSect, "ungueltige Sections" );
- StringCompare eCmp = pFSect->GetName().CompareTo( pSSect->GetName() );
+ StringCompare const eCmp =
+ pFSect->GetSectionName().CompareTo( pSSect->GetSectionName() );
return eCmp == COMPARE_EQUAL ? 0
: eCmp == COMPARE_LESS ? 1 : -1;
}
@@ -923,7 +1027,7 @@ USHORT SwSectionFmt::GetChildSections( SwSections& rArr,
if( GetDepends() )
{
- SwClientIter aIter( *(SwSectionFmt*)this );
+ SwClientIter aIter( *this );
SwClient * pLast;
const SwNodeIndex* pIdx;
for( pLast = aIter.First(TYPE(SwSectionFmt)); pLast; pLast = aIter.Next() )
@@ -979,7 +1083,7 @@ void SwSectionFmt::UpdateParent() // Parent wurde veraendert
// --> FME 2004-06-22 #114856# edit in readonly sections
const SwFmtEditInReadonly* pEditInReadonly = 0;
// <--
- int bIsHidden = FALSE;
+ bool bIsHidden = false;
SwClientIter aIter( *this );
SwClient * pLast = aIter.GoStart();
@@ -1008,16 +1112,20 @@ void SwSectionFmt::UpdateParent() // Parent wurde veraendert
bIsHidden = pSection->IsHidden();
}
}
- if( pProtect->IsCntntProtected() !=
- pSection->IsProtectFlag() )
+ if (!pProtect->IsCntntProtected() !=
+ !pSection->IsProtectFlag())
+ {
pLast->Modify( (SfxPoolItem*)pProtect,
(SfxPoolItem*)pProtect );
+ }
// --> FME 2004-06-22 #114856# edit in readonly sections
- if ( pEditInReadonly->GetValue() !=
- pSection->IsEditInReadonlyFlag() )
+ if (!pEditInReadonly->GetValue() !=
+ !pSection->IsEditInReadonlyFlag())
+ {
pLast->Modify( (SfxPoolItem*)pEditInReadonly,
(SfxPoolItem*)pEditInReadonly );
+ }
// <--
if( bIsHidden == pSection->IsHiddenFlag() )
@@ -1054,7 +1162,7 @@ void SwSectionFmt::UpdateParent() // Parent wurde veraendert
}
-SwSectionNode* SwSectionFmt::GetSectionNode( BOOL bAlways )
+SwSectionNode* SwSectionFmt::GetSectionNode(bool const bAlways)
{
const SwNodeIndex* pIdx = GetCntnt(FALSE).GetCntntIdx();
if( pIdx && ( bAlways || &pIdx->GetNodes() == &GetDoc()->GetNodes() ))
@@ -1076,6 +1184,49 @@ const SwSection* SwSectionFmt::GetGlobalDocSection() const
return 0;
}
+// sw::Metadatable
+::sfx2::IXmlIdRegistry& SwSectionFmt::GetRegistry()
+{
+ return GetDoc()->GetXmlIdRegistry();
+}
+
+bool SwSectionFmt::IsInClipboard() const
+{
+ return GetDoc()->IsClipBoard();
+}
+
+bool SwSectionFmt::IsInUndo() const
+{
+ return !IsInNodesArr();
+}
+
+bool SwSectionFmt::IsInContent() const
+{
+ SwNodeIndex const*const pIdx = GetCntnt(FALSE).GetCntntIdx();
+ OSL_ENSURE(pIdx, "SwSectionFmt::IsInContent: no index?");
+ return (pIdx) ? !GetDoc()->IsInHeaderFooter(*pIdx) : true;
+}
+
+// n.b.: if the section format represents an index, then there is both a
+// SwXDocumentIndex and a SwXTextSection instance for this single core object.
+// these two can both implement XMetadatable and forward to the same core
+// section format. but here only one UNO object can be returned,
+// so always return the text section.
+uno::Reference< rdf::XMetadatable >
+SwSectionFmt::MakeUnoObject()
+{
+ uno::Reference<rdf::XMetadatable> xMeta;
+ SwSection *const pSection( GetSection() );
+ if (pSection)
+ {
+ xMeta.set( SwXTextSection::CreateXTextSection(this,
+ TOX_HEADER_SECTION == pSection->GetType()),
+ uno::UNO_QUERY );
+ }
+ return xMeta;
+}
+
+
// --> OD 2007-02-14 #b6521322#
// Method to break section links inside a linked section
void lcl_BreakSectionLinksInSect( const SwSectionNode& rSectNd )
@@ -1330,7 +1481,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
}
SwSection& rSection = pSectNd->GetSection();
- rSection.SetConnectFlag( FALSE );
+ rSection.SetConnectFlag(false);
::rtl::OUString sNewFileName;
Reader* pRead = 0;
@@ -1362,7 +1513,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
else
{
nRet = lcl_FindDocShell( xDocSh, sFileName,
- rSection.GetLinkFilePassWd(),
+ rSection.GetLinkFilePassword(),
sFilter, 0, pDoc->GetDocShell() );
if( nRet )
{
@@ -1374,18 +1525,18 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
if( nRet )
{
- rSection.SetConnectFlag( TRUE );
+ rSection.SetConnectFlag(true);
SwNodeIndex aSave( pPam->GetPoint()->nNode, -1 );
SwNodeRange* pCpyRg = 0;
if( xDocSh->GetMedium() &&
- !rSection.GetLinkFilePassWd().Len() )
+ !rSection.GetLinkFilePassword().Len() )
{
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == xDocSh->GetMedium()->GetItemSet()->
GetItemState( SID_PASSWORD, FALSE, &pItem ) )
- rSection.SetLinkFilePassWd(
+ rSection.SetLinkFilePassword(
((SfxStringItem*)pItem)->GetValue() );
}
@@ -1518,7 +1669,9 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
SwReader aTmpReader( aStrm, aEmptyStr, pDoc->GetDocShell()->GetMedium()->GetBaseURL(), *pPam );
if( !IsError( aTmpReader.Read( *pRead ) ))
- rSection.SetConnectFlag( TRUE );
+ {
+ rSection.SetConnectFlag(true);
+ }
if( pESh )
{
@@ -1565,19 +1718,18 @@ void SwIntrnlSectRefLink::Closed()
else
pSh->StartAction();
- SwSection aSect( CONTENT_SECTION, aEmptyStr );
- aSect = *rSectFmt.GetSection();
- aSect.SetType( CONTENT_SECTION );
- aSect.SetLinkFileName( aEmptyStr );
- aSect.SetHidden( FALSE );
- aSect.SetProtect( FALSE );
+ SwSectionData aSectionData(*rSectFmt.GetSection());
+ aSectionData.SetType( CONTENT_SECTION );
+ aSectionData.SetLinkFileName( aEmptyStr );
+ aSectionData.SetHidden( false );
+ aSectionData.SetProtectFlag( false );
// --> FME 2004-06-22 #114856# edit in readonly sections
- aSect.SetEditInReadonly( FALSE );
+ aSectionData.SetEditInReadonlyFlag( false );
// <--
- aSect.SetConnectFlag( FALSE );
+ aSectionData.SetConnectFlag( false );
- pDoc->ChgSection( n, aSect );
+ pDoc->UpdateSection( n, aSectionData );
// alle in der Section liegenden Links werden sichtbar
SwSectionNode* pSectNd = rSectFmt.GetSectionNode( FALSE );
@@ -1598,21 +1750,26 @@ void SwIntrnlSectRefLink::Closed()
void SwSection::CreateLink( LinkCreateType eCreateType )
{
SwSectionFmt* pFmt = GetFmt();
- if( !pFmt || CONTENT_SECTION == eType )
+ ASSERT(pFmt, "SwSection::CreateLink: no format?");
+ if (!pFmt || (CONTENT_SECTION == m_Data.GetType()))
return ;
USHORT nUpdateType = sfx2::LINKUPDATE_ALWAYS;
- if( !refLink.Is() )
- // dann mal den BaseLink aufbauen
- refLink = new SwIntrnlSectRefLink( *pFmt, nUpdateType, FORMAT_RTF );
+ if (!m_RefLink.Is())
+ {
+ // create BaseLink
+ m_RefLink = new SwIntrnlSectRefLink( *pFmt, nUpdateType, FORMAT_RTF );
+ }
else
- // sonst aus dem Linkmanager entfernen
- pFmt->GetDoc()->GetLinkManager().Remove( refLink );
+ {
+ pFmt->GetDoc()->GetLinkManager().Remove( m_RefLink );
+ }
- SwIntrnlSectRefLink* pLnk = (SwIntrnlSectRefLink*)&refLink;
+ SwIntrnlSectRefLink *const pLnk =
+ static_cast<SwIntrnlSectRefLink*>(& m_RefLink);
- String sCmd( sLinkFileName );
+ String sCmd( m_Data.GetLinkFileName() );
xub_StrLen nPos;
while( STRING_NOTFOUND != (nPos = sCmd.SearchAscii( " " )) )
sCmd.Erase( nPos, 1 );
@@ -1620,7 +1777,7 @@ void SwSection::CreateLink( LinkCreateType eCreateType )
pLnk->SetUpdateMode( nUpdateType );
pLnk->SetVisible( pFmt->GetDoc()->IsVisibleLinks() );
- switch( eType )
+ switch (m_Data.GetType())
{
case DDE_LINK_SECTION:
pLnk->SetLinkSourceName( sCmd );
@@ -1632,7 +1789,7 @@ void SwSection::CreateLink( LinkCreateType eCreateType )
String sFltr( sCmd.GetToken( 1, sfx2::cTokenSeperator ) );
String sRange( sCmd.GetToken( 2, sfx2::cTokenSeperator ) );
pFmt->GetDoc()->GetLinkManager().InsertFileLink( *pLnk,
- static_cast<USHORT>(eType),
+ static_cast<USHORT>(m_Data.GetType()),
sCmd.GetToken( 0, sfx2::cTokenSeperator ),
( sFltr.Len() ? &sFltr : 0 ),
( sRange.Len() ? &sRange : 0 ) );
@@ -1668,19 +1825,21 @@ void SwSection::BreakLink()
}
// release link, if it exists
- if ( refLink.Is() )
+ if (m_RefLink.Is())
{
- if ( GetFmt() )
+ SwSectionFmt *const pFormat( GetFmt() );
+ ASSERT(pFormat, "SwSection::BreakLink: no format?");
+ if (pFormat)
{
- GetFmt()->GetDoc()->GetLinkManager().Remove( refLink );
+ pFormat->GetDoc()->GetLinkManager().Remove( m_RefLink );
}
- refLink.Clear();
+ m_RefLink.Clear();
}
// change type
SetType( CONTENT_SECTION );
// reset linked file data
SetLinkFileName( aEmptyStr );
- SetLinkFilePassWd( aEmptyStr );
+ SetLinkFilePassword( aEmptyStr );
}
// <--
diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx
index 6034e7de89..73ddb89553 100644
--- a/sw/source/core/docnode/swbaslnk.cxx
+++ b/sw/source/core/docnode/swbaslnk.cxx
@@ -357,17 +357,19 @@ BOOL SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* pGrfNd )
0 != (pANd = pDoc->GetNodes()[pAPos->nNode]) &&
0 != (pTblNd = pANd->FindTableNode()) )
{
- BOOL bLastGrf = !pTblNd->GetTable().DecGrfsThatResize();
+ const BOOL bLastGrf = !pTblNd->GetTable().DecGrfsThatResize();
SwHTMLTableLayout *pLayout =
pTblNd->GetTable().GetHTMLTableLayout();
if( pLayout )
{
- USHORT nBrowseWidth =
- pLayout->GetBrowseWidthByTable( *pDoc );
- if( nBrowseWidth )
+ const USHORT nBrowseWidth =
+ pLayout->GetBrowseWidthByTable( *pDoc );
+ if ( nBrowseWidth )
+ {
pLayout->Resize( nBrowseWidth, TRUE, TRUE,
bLastGrf ? HTMLTABLE_RESIZE_NOW
: 500 );
+ }
}
}
}
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index fc20aef327..f709decc3e 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -1004,10 +1004,6 @@ void SwDrawView::CheckPossibilities()
}
if ( pFrm )
bProtect = pFrm->IsProtected(); //Rahmen, Bereiche usw.
- // --> OD 2006-11-06 #130889# - make code robust
-// if ( FLY_IN_CNTNT == ::FindFrmFmt( (SdrObject*)pObj )->GetAnchor().GetAnchorId() &&
-// rMrkList.GetMarkCount() > 1 )
-// bProtect = TRUE;
{
SwFrmFmt* pFrmFmt( ::FindFrmFmt( const_cast<SdrObject*>(pObj) ) );
if ( !pFrmFmt )
@@ -1022,7 +1018,6 @@ void SwDrawView::CheckPossibilities()
bProtect = TRUE;
}
}
- // <--
}
bMoveProtect |= bProtect;
bResizeProtect |= bProtect | bSzProtect;
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index ff077f1018..b639c37a23 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -31,14 +31,10 @@
#include <hintids.hxx>
-#ifndef _SVX_TSTPITEM_HXX //autogen
#include <editeng/tstpitem.hxx>
-#endif
#include <editeng/lrspitem.hxx>
#include <editeng/scripttypeitem.hxx>
-#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
#include <com/sun/star/i18n/ScriptType.hdl>
-#endif
#include <txatbase.hxx>
#include <txtftn.hxx>
#include <fmtftn.hxx>
@@ -230,8 +226,8 @@ BOOL SwEditShell::GetCurFtn( SwFmtFtn* pFillFtn )
if( !pTxtNd )
return FALSE;
- SwTxtAttr *pFtn = pTxtNd->GetTxtAttr( pCrsr->GetPoint()->nContent,
- RES_TXTATR_FTN );
+ SwTxtAttr *const pFtn = pTxtNd->GetTxtAttrForCharAt(
+ pCrsr->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN);
if( pFtn && pFillFtn )
{
// Daten vom Attribut uebertragen
@@ -461,7 +457,7 @@ BOOL lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
const SwField* const pFld = pAttr->GetFld().GetFld();
if (pFld)
{
- sExp += pFld->Expand();
+ sExp += pFld->ExpandField(rTNd.GetDoc()->IsClipBoard());
}
}
}
diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx
index 86df811542..8c5b02794e 100644
--- a/sw/source/core/edit/edfld.cxx
+++ b/sw/source/core/edit/edfld.cxx
@@ -42,9 +42,7 @@
#include <expfld.hxx>
#include <flddat.hxx>
#include <swundo.hxx>
-#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
-#endif
#include <swddetbl.hxx>
#include <hints.hxx>
@@ -226,7 +224,8 @@ void SwEditShell::FieldToText( SwFieldType* pType )
*pFmtFld->GetTxtFld()->GetStart() );
// Feldinhalt durch Text ersetzen
- String aEntry( pFmtFld->GetFld()->Expand() );
+ String const aEntry(
+ pFmtFld->GetFld()->ExpandField(GetDoc()->IsClipBoard()) );
pPaM->SetMark();
pPaM->Move( fnMoveForward );
GetDoc()->DeleteRange( *pPaM );
diff --git a/sw/source/core/edit/edglbldc.cxx b/sw/source/core/edit/edglbldc.cxx
index 39d7b0eac9..2f932c308d 100644
--- a/sw/source/core/edit/edglbldc.cxx
+++ b/sw/source/core/edit/edglbldc.cxx
@@ -146,7 +146,7 @@ USHORT SwEditShell::GetGlobalDocContent( SwGlblDocContents& rArr ) const
}
BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
- const SwSection& rNew )
+ SwSectionData & rNew)
{
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
return FALSE;
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index d93b7b106a..e3ebcbcdf4 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -1162,8 +1162,7 @@ void SwEditShell::SetExtTextInputData( const CommandExtTextInputData& rData )
void SwEditShell::TransliterateText( sal_uInt32 nType )
{
- utl::TransliterationWrapper aTrans(
- ::comphelper::getProcessServiceFactory(), nType );
+ utl::TransliterationWrapper aTrans( ::comphelper::getProcessServiceFactory(), nType );
StartAllAction();
SET_CURR_SHELL( this );
@@ -1185,6 +1184,32 @@ void SwEditShell::TransliterateText( sal_uInt32 nType )
EndAllAction();
}
+void SwEditShell::TransliterateText( const String& rModuleName )
+{
+ utl::TransliterationWrapper aTrans(::comphelper::getProcessServiceFactory(), 0 );
+ aTrans.loadModuleByImplName( rModuleName, LANGUAGE_SYSTEM );
+ StartAllAction();
+ SET_CURR_SHELL( this );
+
+ SwPaM* pCrsr = GetCrsr();
+ if( pCrsr->GetNext() != pCrsr )
+ {
+ GetDoc()->StartUndo(UNDO_EMPTY, NULL);
+ FOREACHPAM_START( this )
+
+ if( PCURCRSR->HasMark() )
+ GetDoc()->TransliterateText( *PCURCRSR, aTrans );
+
+ FOREACHPAM_END()
+ GetDoc()->EndUndo(UNDO_EMPTY, NULL);
+ }
+ else
+ GetDoc()->TransliterateText( *pCrsr, aTrans );
+
+ EndAllAction();
+}
+
+
void SwEditShell::CountWords( SwDocStat& rStat ) const
{
FOREACHPAM_START( this )
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index 6c9f6c2f3b..d136102a2f 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -136,6 +136,7 @@ class SwSpellIter : public SwLinguIter
SpellContentPositions aLastPositions;
bool bBackToStartOfSentence;
+ bool bMoveToEndOfSentence;
void CreatePortion(uno::Reference< XSpellAlternatives > xAlt,
@@ -147,7 +148,7 @@ class SwSpellIter : public SwLinguIter
const SpellContentPositions& rDeletedRedlines);
public:
SwSpellIter() :
- bBackToStartOfSentence(false) {}
+ bBackToStartOfSentence(false), bMoveToEndOfSentence(false) {}
void Start( SwEditShell *pSh, SwDocPositions eStart, SwDocPositions eEnd );
@@ -157,6 +158,7 @@ public:
void ToSentenceStart();
const ::svx::SpellPortions GetLastPortions(){ return aLastPortions;}
SpellContentPositions GetLastPositions() {return aLastPositions;}
+ void ContinueAfterThisSentence() { bMoveToEndOfSentence = true; }
};
/*************************************************************************
@@ -693,6 +695,24 @@ void SwHyphIter::InsertSoftHyph( const xub_StrLen nHyphPos )
// --------------------- Methoden der SwEditShell ------------------------
+bool SwEditShell::HasLastSentenceGotGrammarChecked() const
+{
+ bool bTextWasGrammarChecked = false;
+ if (pSpellIter)
+ {
+ ::svx::SpellPortions aLastPortions( pSpellIter->GetLastPortions() );
+ for (size_t i = 0; i < aLastPortions.size() && !bTextWasGrammarChecked; ++i)
+ {
+ // bIsGrammarError is also true if the text was only checked but no
+ // grammar error was found. (That is if a ProofreadingResult was obtained in
+ // SwDoc::Spell and in turn bIsGrammarError was set in SwSpellIter::CreatePortion)
+ if (aLastPortions[i].bIsGrammarError)
+ bTextWasGrammarChecked = true;
+ }
+ }
+ return bTextWasGrammarChecked;
+}
+
/*************************************************************************
* SwEditShell::HasConvIter
*************************************************************************/
@@ -1283,7 +1303,20 @@ sal_uInt32 lcl_CountRedlines(
/*-- 18.09.2003 15:08:20---------------------------------------------------
-----------------------------------------------------------------------*/
-void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bIsGrammarCheck)
+
+void SwEditShell::MoveContinuationPosToEndOfCheckedSentence()
+{
+ // give hint that continuation position for spell/grammar checking is
+ // at the end of this sentence
+ if (pSpellIter)
+ {
+ pSpellIter->SetCurr( new SwPosition( *pSpellIter->GetCurrX() ) );
+ pSpellIter->ContinueAfterThisSentence();
+ }
+}
+
+
+void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bRecheck)
{
ASSERT( pSpellIter, "SpellIter missing" );
if(pSpellIter)
@@ -1300,9 +1333,14 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions,
if(!rLastPortions.size())
return;
- SwPaM *pCrsr = GetCrsr();
pDoc->StartUndo( UNDO_OVERWRITE, NULL );
StartAction();
+
+ SwPaM *pCrsr = GetCrsr();
+ // save cursor position (which should be at the end of the current sentence)
+ // for later restoration
+ Push();
+
sal_uInt32 nRedlinePortions = lcl_CountRedlines(rLastPortions);
if((rLastPortions.size() - nRedlinePortions) == rNewPortions.size())
{
@@ -1391,16 +1429,24 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions,
//set the cursor to the end of the inserted string
*pCrsr->Start() = *pCrsr->End();
++aCurrentNewPortion;
-
}
}
- //set the cursor to the end of the new sentence
+
+ // restore cursor to the end of the sentence
+ // (will work also if the sentence length has changed,
+ // since cursors get updated automatically!)
+ Pop( FALSE );
+
+ // collapse cursor to the end of the modified sentence
*pCrsr->Start() = *pCrsr->End();
- if( bIsGrammarCheck)
+ if (bRecheck)
{
//in grammar check the current sentence has to be checked again
GoStartSentence();
}
+ // set continuation position for spell/grammar checking to the end of this sentence
+ pSpellIter->SetCurr( new SwPosition( *pCrsr->Start() ) );
+
pDoc->EndUndo( UNDO_OVERWRITE, NULL );
EndAction();
}
diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx
index d0886cd145..fa1c234c0a 100644
--- a/sw/source/core/edit/edsect.cxx
+++ b/sw/source/core/edit/edsect.cxx
@@ -42,9 +42,9 @@
#include <rootfrm.hxx> // SwRootFrm
- // SS fuer Bereiche
-const SwSection* SwEditShell::InsertSection( const SwSection& rNew,
- const SfxItemSet* pAttr )
+SwSection const*
+SwEditShell::InsertSection(
+ SwSectionData & rNewData, SfxItemSet const*const pAttr)
{
const SwSection* pRet = 0;
if( !IsTableMode() )
@@ -53,8 +53,8 @@ const SwSection* SwEditShell::InsertSection( const SwSection& rNew,
GetDoc()->StartUndo( UNDO_INSSECTION, NULL );
FOREACHPAM_START(this)
- const SwSection* const pNew =
- GetDoc()->InsertSwSection( *PCURCRSR, rNew, pAttr );
+ SwSection const*const pNew =
+ GetDoc()->InsertSwSection( *PCURCRSR, rNewData, 0, pAttr );
if( !pRet )
pRet = pNew;
FOREACHPAM_END()
@@ -178,11 +178,11 @@ void SwEditShell::DelSectionFmt( USHORT nFmt )
}
-void SwEditShell::ChgSection( USHORT nSect, const SwSection& rSect,
- const SfxItemSet* pAttr )
+void SwEditShell::UpdateSection(sal_uInt16 const nSect,
+ SwSectionData & rNewData, SfxItemSet const*const pAttr)
{
StartAllAction();
- GetDoc()->ChgSection( nSect, rSect, pAttr );
+ GetDoc()->UpdateSection( nSect, rNewData, pAttr );
// rufe das AttrChangeNotify auf der UI-Seite.
CallChgLnk();
EndAllAction();
diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx
index d5bd429783..a2c5cfd363 100644
--- a/sw/source/core/edit/edtox.cxx
+++ b/sw/source/core/edit/edtox.cxx
@@ -135,10 +135,9 @@ void SwEditShell::SetTOXBaseReadonly(const SwTOXBase& rTOXBase, BOOL bReadonly)
((SwTOXBase&)rTOXBase).SetProtected(bReadonly);
ASSERT( rTOXSect.SwSection::GetType() == TOX_CONTENT_SECTION, "not a TOXContentSection" );
- SwSection aSect(TOX_CONTENT_SECTION, rTOXSect.GetName());
- aSect = rTOXSect;
- aSect.SetProtect(bReadonly);
- ChgSection( GetSectionFmtPos( *rTOXSect.GetFmt() ), aSect, 0 );
+ SwSectionData aSectionData(rTOXSect);
+ aSectionData.SetProtectFlag(bReadonly);
+ UpdateSection( GetSectionFmtPos( *rTOXSect.GetFmt() ), aSectionData, 0 );
}
/* -----------------02.09.99 07:47-------------------
diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx
index d92d8ce0e5..fb98a31c93 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -203,7 +203,8 @@ double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const
break;
default:
- nRet = rCalcPara.rCalc.Calculate( pFld->Expand() ).GetDouble();
+ String const value(pFld->ExpandField(pDoc->IsClipBoard()));
+ nRet = rCalcPara.rCalc.Calculate(value).GetDouble();
}
}
else
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index db704276ba..7abd94ebf5 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -437,6 +437,23 @@ BOOL SwField::IsFixed() const
return bRet;
}
+String SwField::ExpandField(bool const bInClipboard) const
+{
+ if (!bInClipboard) // #i85766# do not expand fields in clipboard documents
+ {
+ m_Cache = Expand();
+ }
+ return m_Cache;
+}
+
+SwField * SwField::CopyField() const
+{
+ SwField *const pNew = Copy();
+ // #i85766# cache expansion of source (for clipboard)
+ pNew->m_Cache = Expand();
+ return pNew;
+}
+
/*--------------------------------------------------------------------
Beschreibung: Numerierung expandieren
--------------------------------------------------------------------*/
diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx
index 822df75ee9..dfa750630a 100644
--- a/sw/source/core/fields/postithelper.cxx
+++ b/sw/source/core/fields/postithelper.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -32,7 +32,8 @@
#include <postithelper.hxx>
#include <PostItMgr.hxx>
-#include <postit.hxx>
+#include <AnnotationWin.hxx>
+
#include <fmtfld.hxx>
#include <txtfld.hxx>
#include <docufld.hxx>
@@ -41,12 +42,50 @@
#include <pagefrm.hxx>
#include <rootfrm.hxx>
#include <txtfrm.hxx>
+#include <tabfrm.hxx>
#include <IDocumentRedlineAccess.hxx>
#include <redline.hxx>
#include <scriptinfo.hxx>
#include <editeng/charhiddenitem.hxx>
+namespace {
+
+struct LayoutInfoOrder
+{
+ bool operator()( const SwLayoutInfo& rLayoutInfo,
+ const SwLayoutInfo& rNewLayoutInfo )
+ {
+ if ( rLayoutInfo.mnPageNumber != rNewLayoutInfo.mnPageNumber )
+ {
+ // corresponding <SwFrm> instances are on different pages
+ return rLayoutInfo.mnPageNumber < rNewLayoutInfo.mnPageNumber;
+ }
+ else
+ {
+ // corresponding <SwFrm> instances are in different repeating table header rows
+ ASSERT( rLayoutInfo.mpAnchorFrm->FindTabFrm(),
+ "<LayoutInfoOrder::operator()> - table frame not found" );
+ ASSERT( rNewLayoutInfo.mpAnchorFrm->FindTabFrm(),
+ "<LayoutInfoOrder::operator()> - table frame not found" );
+ const SwTabFrm* pLayoutInfoTabFrm( rLayoutInfo.mpAnchorFrm->FindTabFrm() );
+ const SwTabFrm* pNewLayoutInfoTabFrm( rNewLayoutInfo.mpAnchorFrm->FindTabFrm() );
+ const SwTabFrm* pTmpTabFrm( pNewLayoutInfoTabFrm );
+ while ( pTmpTabFrm && pTmpTabFrm->GetFollow() )
+ {
+ pTmpTabFrm = static_cast<const SwTabFrm*>(pTmpTabFrm->GetFollow()->GetFrm());
+ if ( pTmpTabFrm == pLayoutInfoTabFrm )
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+};
+
+} // eof anonymous namespace
+
SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos( std::vector< SwLayoutInfo >& rInfo, SwPosition& rPos )
{
SwLayoutStatus aRet = INVISIBLE;
@@ -67,11 +106,12 @@ SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos( std::vector< SwLa
{
SwLayoutInfo aInfo;
pTxtFrm->GetCharRect( aInfo.mPosition, rPos, 0 );
+ aInfo.mpAnchorFrm = pTxtFrm;
aInfo.mPageFrame = pPage->Frm();
aInfo.mPagePrtArea = pPage->Prt();
aInfo.mPagePrtArea.Pos() += aInfo.mPageFrame.Pos();
aInfo.mnPageNumber = pPage->GetPhyPageNum();
- aInfo.mbMarginSide = pPage->MarginSide();
+ aInfo.meSidebarPosition = pPage->SidebarPosition();
aInfo.mRedlineAuthor = 0;
if( aRet == INVISIBLE )
@@ -91,7 +131,14 @@ SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos( std::vector< SwLa
}
}
}
- rInfo.push_back( aInfo );
+
+ {
+ std::vector< SwLayoutInfo >::iterator aInsPosIter =
+ std::lower_bound( rInfo.begin(), rInfo.end(),
+ aInfo, LayoutInfoOrder() );
+
+ rInfo.insert( aInsPosIter, aInfo );
+ }
}
}
}
@@ -126,23 +173,7 @@ unsigned long SwPostItHelper::getPageInfo( SwRect& rPageFrm, const SwRootFrm* pR
return nRet;
}
-SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos( std::vector< SwLayoutInfo >& rInfo, SwTxtFld* pFld )
-{
- SwLayoutStatus aRet = SwPostItHelper::INVISIBLE;
- if( pFld )
- {
- SwTxtNode* pTNd = pFld->GetpTxtNode();
- if( pTNd )
- {
- SwPosition aPos( *pTNd );
- aPos.nContent.Assign( pTNd, *pFld->GetStart() );
- aRet = getLayoutInfos( rInfo, aPos );
- }
- }
- return aRet;
-}
-
-SwPosition SwPostItItem::GetPosition()
+SwPosition SwAnnotationItem::GetAnchorPosition() const
{
SwTxtFld* pFld = pFmtFld->GetTxtFld();
//if( pFld )
@@ -153,27 +184,34 @@ SwPosition SwPostItItem::GetPosition()
SwPosition aPos( *pTNd );
aPos.nContent.Assign( pTNd, *pFld->GetStart() );
return aPos;
- // }
+ // }
//}
}
-bool SwPostItItem::UseElement()
+bool SwAnnotationItem::UseElement()
{
return pFmtFld->IsFldInDoc();
}
-SwMarginWin* SwPostItItem::GetMarginWindow(Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits)
+sw::sidebarwindows::SwSidebarWin* SwAnnotationItem::GetSidebarWindow(
+ SwEditWin& rEditWin,
+ WinBits nBits,
+ SwPostItMgr& aMgr,
+ SwPostItBits aBits)
{
- return new SwPostIt(pParent,nBits,pFmtFld,aMgr,aBits);
+ return new sw::annotation::SwAnnotationWin( rEditWin, nBits,
+ aMgr, aBits,
+ *this,
+ pFmtFld );
}
/*
-SwPosition SwRedCommentItem::GetPosition()
+SwPosition SwRedCommentItem::GetAnchorPosition()
{
return *pRedline->Start();
}
-SwMarginWin* SwRedCommentItem::GetMarginWindow(Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits)
+SwSidebarWin* SwRedCommentItem::GetSidebarWindow(Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits)
{
return new SwRedComment(pParent,nBits,aMgr,aBits,pRedline);
}
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index fae8842643..19377c4e06 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -182,8 +182,9 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt )
// das kopierte TextAttribut wieder entfernt werden,
// sonst wird es als TextSelektion erkannt
const SwIndex& rIdx = pFlyFmt->GetAnchor().GetCntntAnchor()->nContent;
- SwTxtFlyCnt* pTxtFly = (SwTxtFlyCnt*)pTxtNd->GetTxtAttr(
- rIdx, RES_TXTATR_FLYCNT );
+ SwTxtFlyCnt *const pTxtFly = static_cast<SwTxtFlyCnt *>(
+ pTxtNd->GetTxtAttrForCharAt(
+ rIdx.GetIndex(), RES_TXTATR_FLYCNT));
if( pTxtFly )
{
((SwFmtFlyCnt&)pTxtFly->GetFlyCnt()).SetFlyFmt( 0 );
@@ -835,8 +836,8 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
pClpDoc->CopyRange( rCopy, rInsPos, false );
{
aIndexBefore++;
- SwPaM aPaM(SwPosition(aIndexBefore, 0),
- SwPosition(rInsPos.nNode, 0));
+ SwPaM aPaM(SwPosition(aIndexBefore),
+ SwPosition(rInsPos.nNode));
aPaM.GetDoc()->MakeUniqueNumRules(aPaM);
}
}
@@ -1065,8 +1066,8 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
{
aIndexBefore++;
- SwPaM aPaM(SwPosition(aIndexBefore, 0),
- SwPosition(rInsPos.nNode, 0));
+ SwPaM aPaM(SwPosition(aIndexBefore),
+ SwPosition(rInsPos.nNode));
aPaM.GetDoc()->MakeUniqueNumRules(aPaM);
}
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index d0011f521e..f220f409d6 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -1801,11 +1801,6 @@ ObjCntType SwFEShell::GetObjCntType( const SdrObject& rObj ) const
else
eType = OBJCNT_FLY;
}
- // --> OD 2006-11-06 #130889# - make code robust
-// else if( pInvestigatedObj->ISA( SdrObjGroup ) &&
-// FLY_IN_CNTNT !=
-// ((SwDrawContact*)GetUserCall(pInvestigatedObj))->GetFmt()->GetAnchor().GetAnchorId() )
-// eType = OBJCNT_GROUPOBJ;
else if ( pInvestigatedObj->ISA( SdrObjGroup ) )
{
SwDrawContact* pDrawContact( dynamic_cast<SwDrawContact*>(GetUserCall( pInvestigatedObj ) ) );
@@ -1830,7 +1825,6 @@ ObjCntType SwFEShell::GetObjCntType( const SdrObject& rObj ) const
}
}
}
- // <--
else
eType = OBJCNT_SIMPLE;
return eType;
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index eecb8047c2..2eb597f887 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -34,6 +34,8 @@
#define _FESHVIEW_ONLY_INLINE_NEEDED
#endif
+#include <svx/sdrobjectfilter.hxx>
+#include <svx/svditer.hxx>
#include <svx/svdobj.hxx>
#include <svx/svdouno.hxx>
#include <svx/svdoole2.hxx>
@@ -235,10 +237,7 @@ BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj )
if( bForget )
{
pDView->UnmarkAll();
- if ( pTmpObj )
- pDView->MarkObj( pTmpObj, Imp()->GetPageView(), bAddSelect, bEnterGroup );
- else
- pDView->MarkObj( rPt, MINMOVE );
+ pDView->MarkObj( pTmpObj, Imp()->GetPageView(), bAddSelect, bEnterGroup );
break;
}
}
@@ -1310,197 +1309,225 @@ BOOL lcl_IsControlGroup( const SdrObject *pObj )
return bRet;
}
-BOOL SwFEShell::GotoObj( BOOL bNext, USHORT /*GOTOOBJ_...*/ eType )
+namespace
{
- if( !Imp()->HasDrawView() )
- return FALSE;
- else
+ class MarkableObjectsOnly : public ::svx::ISdrObjectFilter
{
- const SdrObject *pBest = 0,
- *pTop = 0;
-
- const long nTmp = bNext ? LONG_MAX : 0;
- Point aBestPos( nTmp, nTmp );
- Point aTopPos( nTmp, nTmp );
- Point aCurPos;
- Point aPos;
- BOOL bRet = FALSE;
- BOOL bNoDraw = 0 == (GOTOOBJ_DRAW_ANY & eType);
- BOOL bNoFly = 0 == (GOTOOBJ_FLY_ANY & eType);
-
- if( !bNoFly && bNoDraw )
+ public:
+ MarkableObjectsOnly( SdrPageView* i_pPV )
+ :m_pPV( i_pPV )
{
- SwFlyFrm *pFly = GetCurrFrm( FALSE )->FindFlyFrm();
- if( pFly )
- pBest = pFly->GetVirtDrawObj();
}
- const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
- SdrPageView* pPV = Imp()->GetDrawView()->GetSdrPageView();
- if( !pBest || rMrkList.GetMarkCount() == 1 )
+ virtual bool includeObject( const SdrObject& i_rObject ) const
{
- // Ausgangspunkt bestimmen.
- SdrObjList* pList = NULL;
- if ( rMrkList.GetMarkCount() )
- {
- const SdrObject* pStartObj = rMrkList.GetMark(0)->GetMarkedSdrObj();
- if( pStartObj->ISA(SwVirtFlyDrawObj) )
- aPos = ((SwVirtFlyDrawObj*)pStartObj)->GetFlyFrm()->Frm().Pos();
- else
- aPos = pStartObj->GetSnapRect().TopLeft();
+ return m_pPV && m_pPV->GetView().IsObjMarkable( const_cast< SdrObject* >( &i_rObject ), m_pPV );
+ }
- // If an object inside a group is selected, we want to
- // iterate over the group members.
- if ( ! pStartObj->GetUserCall() )
- pList = pStartObj->GetObjList();
- }
+ private:
+ SdrPageView* m_pPV;
+ };
+}
+
+const SdrObject* SwFEShell::GetBestObject( BOOL bNext, USHORT /*GOTOOBJ_...*/ eType, BOOL bFlat, const ::svx::ISdrObjectFilter* pFilter )
+{
+ if( !Imp()->HasDrawView() )
+ return NULL;
+
+ const SdrObject *pBest = 0,
+ *pTop = 0;
+
+ const long nTmp = bNext ? LONG_MAX : 0;
+ Point aBestPos( nTmp, nTmp );
+ Point aTopPos( nTmp, nTmp );
+ Point aCurPos;
+ Point aPos;
+ BOOL bNoDraw = 0 == (GOTOOBJ_DRAW_ANY & eType);
+ BOOL bNoFly = 0 == (GOTOOBJ_FLY_ANY & eType);
+
+ if( !bNoFly && bNoDraw )
+ {
+ SwFlyFrm *pFly = GetCurrFrm( FALSE )->FindFlyFrm();
+ if( pFly )
+ pBest = pFly->GetVirtDrawObj();
+ }
+ const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
+ SdrPageView* pPV = Imp()->GetDrawView()->GetSdrPageView();
+
+ MarkableObjectsOnly aDefaultFilter( pPV );
+ if ( !pFilter )
+ pFilter = &aDefaultFilter;
+
+ if( !pBest || rMrkList.GetMarkCount() == 1 )
+ {
+ // Ausgangspunkt bestimmen.
+ SdrObjList* pList = NULL;
+ if ( rMrkList.GetMarkCount() )
+ {
+ const SdrObject* pStartObj = rMrkList.GetMark(0)->GetMarkedSdrObj();
+ if( pStartObj->ISA(SwVirtFlyDrawObj) )
+ aPos = ((SwVirtFlyDrawObj*)pStartObj)->GetFlyFrm()->Frm().Pos();
else
- {
- // If no object is selected, we check if we just entered a group.
- // In this case we want to iterate over the group members.
- aPos = GetCharRect().Center();
- const SdrObject* pStartObj = pPV ? pPV->GetAktGroup() : 0;
- if ( pStartObj && pStartObj->ISA( SdrObjGroup ) )
- pList = pStartObj->GetSubList();
- }
+ aPos = pStartObj->GetSnapRect().TopLeft();
- if ( ! pList )
- {
- // Here we are if
- // A No object has been selected and no group has been entered or
- // B An object has been selected and it is not inside a group
- pList = getIDocumentDrawModelAccess()->GetDrawModel()->GetPage( 0 );
- }
+ // If an object inside a group is selected, we want to
+ // iterate over the group members.
+ if ( ! pStartObj->GetUserCall() )
+ pList = pStartObj->GetObjList();
+ }
+ else
+ {
+ // If no object is selected, we check if we just entered a group.
+ // In this case we want to iterate over the group members.
+ aPos = GetCharRect().Center();
+ const SdrObject* pStartObj = pPV ? pPV->GetAktGroup() : 0;
+ if ( pStartObj && pStartObj->ISA( SdrObjGroup ) )
+ pList = pStartObj->GetSubList();
+ }
+
+ if ( ! pList )
+ {
+ // Here we are if
+ // A No object has been selected and no group has been entered or
+ // B An object has been selected and it is not inside a group
+ pList = getIDocumentDrawModelAccess()->GetDrawModel()->GetPage( 0 );
+ }
- ASSERT( pList, "No object list to iterate" )
+ ASSERT( pList, "No object list to iterate" )
- const ULONG nObjs = pList->GetObjCount();
- for( ULONG nObj = 0; nObj < nObjs; ++nObj )
+ SdrObjListIter aObjIter( *pList, bFlat ? IM_FLAT : IM_DEEPNOGROUPS );
+ while ( aObjIter.IsMore() )
+ {
+ SdrObject* pObj = aObjIter.Next();
+ BOOL bFlyFrm = pObj->ISA(SwVirtFlyDrawObj);
+ if( ( bNoFly && bFlyFrm ) ||
+ ( bNoDraw && !bFlyFrm ) ||
+ ( eType == GOTOOBJ_DRAW_SIMPLE && lcl_IsControlGroup( pObj ) ) ||
+ ( eType == GOTOOBJ_DRAW_CONTROL && !lcl_IsControlGroup( pObj ) ) ||
+ ( pFilter && !pFilter->includeObject( *pObj ) ) )
+ continue;
+ if( bFlyFrm )
{
- SdrObject* pObj = pList->GetObj( nObj );
- BOOL bFlyFrm = pObj->ISA(SwVirtFlyDrawObj);
- if( ( bNoFly && bFlyFrm ) ||
- ( bNoDraw && !bFlyFrm ) ||
- ( eType == GOTOOBJ_DRAW_SIMPLE && lcl_IsControlGroup( pObj ) ) ||
- ( eType == GOTOOBJ_DRAW_CONTROL && !lcl_IsControlGroup( pObj ) ) ||
- ( pPV && ! pPV->GetView().IsObjMarkable( pObj, pPV ) ) )
- continue;
- if( bFlyFrm )
+ SwVirtFlyDrawObj *pO = (SwVirtFlyDrawObj*)pObj;
+ SwFlyFrm *pFly = pO->GetFlyFrm();
+ if( GOTOOBJ_FLY_ANY != ( GOTOOBJ_FLY_ANY & eType ) )
{
- SwVirtFlyDrawObj *pO = (SwVirtFlyDrawObj*)pObj;
- SwFlyFrm *pFly = pO->GetFlyFrm();
- if( GOTOOBJ_FLY_ANY != ( GOTOOBJ_FLY_ANY & eType ) )
+ switch ( eType )
{
- switch ( eType )
- {
- case GOTOOBJ_FLY_FRM:
- if ( pFly->Lower() && pFly->Lower()->IsNoTxtFrm() )
- continue;
- break;
- case GOTOOBJ_FLY_GRF:
- if ( pFly->Lower() &&
- (pFly->Lower()->IsLayoutFrm() ||
- !((SwCntntFrm*)pFly->Lower())->GetNode()->GetGrfNode()))
- continue;
- break;
- case GOTOOBJ_FLY_OLE:
- if ( pFly->Lower() &&
- (pFly->Lower()->IsLayoutFrm() ||
- !((SwCntntFrm*)pFly->Lower())->GetNode()->GetOLENode()))
- continue;
- break;
- }
+ case GOTOOBJ_FLY_FRM:
+ if ( pFly->Lower() && pFly->Lower()->IsNoTxtFrm() )
+ continue;
+ break;
+ case GOTOOBJ_FLY_GRF:
+ if ( pFly->Lower() &&
+ (pFly->Lower()->IsLayoutFrm() ||
+ !((SwCntntFrm*)pFly->Lower())->GetNode()->GetGrfNode()))
+ continue;
+ break;
+ case GOTOOBJ_FLY_OLE:
+ if ( pFly->Lower() &&
+ (pFly->Lower()->IsLayoutFrm() ||
+ !((SwCntntFrm*)pFly->Lower())->GetNode()->GetOLENode()))
+ continue;
+ break;
}
- aCurPos = pFly->Frm().Pos();
}
- else
- aCurPos = pObj->GetCurrentBoundRect().TopLeft();
+ aCurPos = pFly->Frm().Pos();
+ }
+ else
+ aCurPos = pObj->GetCurrentBoundRect().TopLeft();
- // Sonderfall wenn ein anderes Obj auf selber Y steht.
- if( aCurPos != aPos && // nur wenn ich es nicht selber bin
- aCurPos.Y() == aPos.Y() && // ist die Y Position gleich
- (bNext? (aCurPos.X() > aPos.X()) : // liegt neben mir
- (aCurPos.X() < aPos.X())) ) // " reverse
+ // Sonderfall wenn ein anderes Obj auf selber Y steht.
+ if( aCurPos != aPos && // nur wenn ich es nicht selber bin
+ aCurPos.Y() == aPos.Y() && // ist die Y Position gleich
+ (bNext? (aCurPos.X() > aPos.X()) : // liegt neben mir
+ (aCurPos.X() < aPos.X())) ) // " reverse
+ {
+ aBestPos = Point( nTmp, nTmp );
+ SdrObjListIter aTmpIter( *pList, bFlat ? IM_FLAT : IM_DEEPNOGROUPS );
+ while ( aTmpIter.IsMore() )
{
- aBestPos = Point( nTmp, nTmp );
- for( ULONG i = 0; i < nObjs; ++i )
+ SdrObject* pTmpObj = aTmpIter.Next();
+ bFlyFrm = pTmpObj->ISA(SwVirtFlyDrawObj);
+ if( ( bNoFly && bFlyFrm ) || ( bNoDraw && !bFlyFrm ) )
+ continue;
+ if( bFlyFrm )
{
- SdrObject *pTmpObj = pList->GetObj( i );
- bFlyFrm = pTmpObj->ISA(SwVirtFlyDrawObj);
- if( ( bNoFly && bFlyFrm ) || ( bNoDraw && !bFlyFrm ) )
- continue;
- if( bFlyFrm )
- {
- SwVirtFlyDrawObj *pO = (SwVirtFlyDrawObj*)pTmpObj;
- aCurPos = pO->GetFlyFrm()->Frm().Pos();
- }
- else
- aCurPos = pTmpObj->GetCurrentBoundRect().TopLeft();
-
- if( aCurPos != aPos && aCurPos.Y() == aPos.Y() &&
- (bNext? (aCurPos.X() > aPos.X()) : // liegt neben mir
- (aCurPos.X() < aPos.X())) && // " reverse
- (bNext? (aCurPos.X() < aBestPos.X()) : // besser als Beste
- (aCurPos.X() > aBestPos.X())) ) // " reverse
- {
- aBestPos = aCurPos;
- pBest = pTmpObj;
- }
+ SwVirtFlyDrawObj *pO = (SwVirtFlyDrawObj*)pTmpObj;
+ aCurPos = pO->GetFlyFrm()->Frm().Pos();
}
- break;
- }
-
- if( (bNext? (aPos.Y() < aCurPos.Y()) : // nur unter mir
- (aPos.Y() > aCurPos.Y())) && // " reverse
- (bNext? (aBestPos.Y() > aCurPos.Y()) : // naeher drunter
- (aBestPos.Y() < aCurPos.Y())) || // " reverse
- (aBestPos.Y() == aCurPos.Y() &&
- (bNext? (aBestPos.X() > aCurPos.X()) : // weiter links
- (aBestPos.X() < aCurPos.X())))) // " reverse
-
- {
- aBestPos = aCurPos;
- pBest = pObj;
- }
+ else
+ aCurPos = pTmpObj->GetCurrentBoundRect().TopLeft();
- if( (bNext? (aTopPos.Y() > aCurPos.Y()) : // hoeher als Beste
- (aTopPos.Y() < aCurPos.Y())) || // " reverse
- (aTopPos.Y() == aCurPos.Y() &&
- (bNext? (aTopPos.X() > aCurPos.X()) : // weiter links
- (aTopPos.X() < aCurPos.X())))) // " reverse
- {
- aTopPos = aCurPos;
- pTop = pObj;
+ if( aCurPos != aPos && aCurPos.Y() == aPos.Y() &&
+ (bNext? (aCurPos.X() > aPos.X()) : // liegt neben mir
+ (aCurPos.X() < aPos.X())) && // " reverse
+ (bNext? (aCurPos.X() < aBestPos.X()) : // besser als Beste
+ (aCurPos.X() > aBestPos.X())) ) // " reverse
+ {
+ aBestPos = aCurPos;
+ pBest = pTmpObj;
+ }
}
+ break;
}
- // leider nichts gefunden
- if( (bNext? (aBestPos.X() == LONG_MAX) : (aBestPos.X() == 0)) )
- pBest = pTop;
- }
- if( pBest )
- {
- BOOL bFlyFrm = pBest->ISA(SwVirtFlyDrawObj);
- if( bFlyFrm )
+ if( (bNext? (aPos.Y() < aCurPos.Y()) : // nur unter mir
+ (aPos.Y() > aCurPos.Y())) && // " reverse
+ (bNext? (aBestPos.Y() > aCurPos.Y()) : // naeher drunter
+ (aBestPos.Y() < aCurPos.Y())) || // " reverse
+ (aBestPos.Y() == aCurPos.Y() &&
+ (bNext? (aBestPos.X() > aCurPos.X()) : // weiter links
+ (aBestPos.X() < aCurPos.X())))) // " reverse
+
{
- SwVirtFlyDrawObj *pO = (SwVirtFlyDrawObj*)pBest;
- const SwRect& rFrm = pO->GetFlyFrm()->Frm();
- SelectObj( rFrm.Pos(), 0, (SdrObject*)pBest );
- if( !ActionPend() )
- MakeVisible( rFrm );
+ aBestPos = aCurPos;
+ pBest = pObj;
}
- else
+
+ if( (bNext? (aTopPos.Y() > aCurPos.Y()) : // hoeher als Beste
+ (aTopPos.Y() < aCurPos.Y())) || // " reverse
+ (aTopPos.Y() == aCurPos.Y() &&
+ (bNext? (aTopPos.X() > aCurPos.X()) : // weiter links
+ (aTopPos.X() < aCurPos.X())))) // " reverse
{
- SelectObj( Point(), 0, (SdrObject*)pBest );
- if( !ActionPend() )
- MakeVisible( pBest->GetCurrentBoundRect() );
+ aTopPos = aCurPos;
+ pTop = pObj;
}
- CallChgLnk();
- bRet = TRUE;
}
- return bRet;
+ // leider nichts gefunden
+ if( (bNext? (aBestPos.X() == LONG_MAX) : (aBestPos.X() == 0)) )
+ pBest = pTop;
+ }
+
+ return pBest;
+}
+
+BOOL SwFEShell::GotoObj( BOOL bNext, USHORT /*GOTOOBJ_...*/ eType )
+{
+ const SdrObject* pBest = GetBestObject( bNext, eType );
+
+ if ( !pBest )
+ return FALSE;
+
+ BOOL bFlyFrm = pBest->ISA(SwVirtFlyDrawObj);
+ if( bFlyFrm )
+ {
+ SwVirtFlyDrawObj *pO = (SwVirtFlyDrawObj*)pBest;
+ const SwRect& rFrm = pO->GetFlyFrm()->Frm();
+ SelectObj( rFrm.Pos(), 0, (SdrObject*)pBest );
+ if( !ActionPend() )
+ MakeVisible( rFrm );
+ }
+ else
+ {
+ SelectObj( Point(), 0, (SdrObject*)pBest );
+ if( !ActionPend() )
+ MakeVisible( pBest->GetCurrentBoundRect() );
}
+ CallChgLnk();
+ return TRUE;
}
/*************************************************************************
@@ -2322,12 +2349,6 @@ bool SwFEShell::IsGroupAllowed() const
else
pUpGroup = pObj->GetUpGroup();
- // --> OD 2006-11-06 #130889# - make code robust
-// if ( bIsGroupAllowed &&
-// FLY_IN_CNTNT == ::FindFrmFmt( (SdrObject*)pObj )->GetAnchor().GetAnchorId() )
-// {
-// bIsGroupAllowed = false;
-// }
if ( bIsGroupAllowed )
{
SwFrmFmt* pFrmFmt( ::FindFrmFmt( const_cast<SdrObject*>(pObj) ) );
@@ -2342,7 +2363,6 @@ bool SwFEShell::IsGroupAllowed() const
bIsGroupAllowed = false;
}
}
- // <--
// OD 27.06.2003 #108784# - check, if all selected objects are in the
// same header/footer or not in header/footer.
diff --git a/sw/source/core/inc/SwGrammarMarkUp.hxx b/sw/source/core/inc/SwGrammarMarkUp.hxx
index 73d4871812..fb3334ce28 100644
--- a/sw/source/core/inc/SwGrammarMarkUp.hxx
+++ b/sw/source/core/inc/SwGrammarMarkUp.hxx
@@ -69,8 +69,6 @@ public:
/* getSentenceEnd returns the first start position of a sentence
which is greater than the given parameter */
xub_StrLen getSentenceEnd( xub_StrLen nPos );
- /* removeSentence removes all start positions in the given range */
- void removeSentence(xub_StrLen nStart, xub_StrLen nLength );
};
#endif
diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx
index b3ca5e9956..fb479fc865 100644
--- a/sw/source/core/inc/cellfrm.hxx
+++ b/sw/source/core/inc/cellfrm.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -51,6 +51,10 @@ public:
virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
virtual void CheckDirection( BOOL bVert );
+ // --> OD 2010-02-17 #i103961#
+ virtual void Cut();
+ // <--
+
const SwTableBox *GetTabBox() const { return pTabBox; }
// used for breaking table rows:
diff --git a/sw/source/core/inc/doctxm.hxx b/sw/source/core/inc/doctxm.hxx
index 1f5dde7381..99b61b9930 100644
--- a/sw/source/core/inc/doctxm.hxx
+++ b/sw/source/core/inc/doctxm.hxx
@@ -96,7 +96,7 @@ class SwTOXBaseSection : public SwTOXBase, public SwSection
SwTxtFmtColl* GetTxtFmtColl( USHORT nLevel );
public:
- SwTOXBaseSection( const SwTOXBase& rBase );
+ SwTOXBaseSection(SwTOXBase const& rBase, SwSectionFmt & rFmt);
virtual ~SwTOXBaseSection();
// OD 19.03.2003 #106329# - add parameter <_bNewTOX> in order to distinguish
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 552793dc1c..6d61b3ab08 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -250,10 +250,6 @@ class SwFrm: public SwClient
friend SwFrm *SaveCntnt( SwLayoutFrm *, SwFrm* pStart = NULL );
friend void RestoreCntnt( SwFrm *, SwLayoutFrm *, SwFrm *pSibling, bool bGrow );
- //Checkt ob sich beim MakePos die Pos des Frm aendert oder nicht
- //layact.cxx
- friend BOOL CheckPos( SwFrm *pFrm );
-
#if OSL_DEBUG_LEVEL > 1
//entfernt leere SwSectionFrms aus einer Kette
friend SwFrm* SwClearDummies( SwFrm* pFrm );
diff --git a/sw/source/core/inc/pagefrm.hxx b/sw/source/core/inc/pagefrm.hxx
index ab152f1fb4..4f0c0d8578 100644
--- a/sw/source/core/inc/pagefrm.hxx
+++ b/sw/source/core/inc/pagefrm.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,6 +33,8 @@
#include "ftnboss.hxx"
#include <tools/mempool.hxx>
+#include <SidebarWindowsTypes.hxx>
+
class SwFlyFrm;
class SwFlyFrmFmt;
class SwPageDesc;
@@ -383,7 +385,7 @@ public:
static void GetBorderAndShadowBoundRect( const SwRect& _rPageRect,
ViewShell* _pViewShell,
SwRect& _orBorderAndShadowBoundRect,
- bool bRightSidebar );
+ const bool bRightSidebar );
static void PaintNotesSidebar(const SwRect& _rPageRect, ViewShell* _pViewShell, USHORT nPageNum, bool bRight);
static void PaintNotesSidebarArrows(const Point &aMiddleFirst, const Point &aMiddleSecond, ViewShell* _pViewShell, const Color aColorUp, const Color aColorDown);
@@ -393,7 +395,7 @@ public:
asks the page on which side a margin should be shown, e.g for notes
returns true for left side, false for right side
*/
- bool MarginSide() const;
+ sw::sidebarwindows::SidebarPosition SidebarPosition() const;
virtual bool FillSelection( SwSelectionList& rList, const SwRect& rRect ) const;
@@ -535,6 +537,6 @@ inline BOOL SwPageFrm::IsInvalidFly() const
#define GETGRIDWIDTH( pGrid , pDoc ) pDoc->IsSquaredPageMode() ? \
pGrid->GetBaseHeight(): pGrid->GetBaseWidth()
-
+
#endif //_PAGEFRM_HXX
diff --git a/sw/source/core/inc/unometa.hxx b/sw/source/core/inc/unometa.hxx
index 3728925270..b57dae04f0 100755
--- a/sw/source/core/inc/unometa.hxx
+++ b/sw/source/core/inc/unometa.hxx
@@ -33,12 +33,13 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <com/sun/star/text/XTextContent.hpp>
#include <com/sun/star/text/XTextField.hpp>
#include <cppuhelper/implbase2.hxx>
-#include <cppuhelper/implbase5.hxx>
+#include <cppuhelper/implbase6.hxx>
#include <sfx2/Metadatable.hxx>
@@ -57,10 +58,11 @@ namespace sw {
class MetaField;
}
-typedef ::cppu::ImplInheritanceHelper5
+typedef ::cppu::ImplInheritanceHelper6
< ::sfx2::MetadatableMixin
, ::com::sun::star::lang::XUnoTunnel
, ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::container::XChild
, ::com::sun::star::container::XEnumerationAccess
, ::com::sun::star::text::XTextContent
, ::com::sun::star::text::XText
@@ -151,6 +153,17 @@ public:
::com::sun::star::lang::XEventListener > & xListener)
throw (::com::sun::star::uno::RuntimeException);
+ // XChild
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XInterface > SAL_CALL
+ getParent()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setParent(
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XInterface> const& xParent)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::NoSupportException);
+
// XElementAccess
virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
throw (::com::sun::star::uno::RuntimeException);
diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx
index 5403ffe89d..7b4a87a53b 100644
--- a/sw/source/core/inc/viewimp.hxx
+++ b/sw/source/core/inc/viewimp.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,8 +35,8 @@
#include <tools/string.hxx>
-#include "swtypes.hxx"
-#include "swrect.hxx"
+#include <swtypes.hxx>
+#include <swrect.hxx>
class ViewShell;
class SwFlyFrm;
@@ -54,17 +54,10 @@ class SwAccessibleMap;
class SdrObject;
class Fraction;
class SwPrtOptions;
-// OD 12.12.2002 #103492#
class SwPagePreviewLayout;
-// OD 15.01.2003 #103492#
-#ifndef _PREVWPAGE_HXX
-#include <prevwpage.hxx>
-#endif
-// OD 15.01.2003 #103492#
+struct PrevwPage;
#include <vector>
-// --> OD 2005-12-01 #i27138#
class SwTxtFrm;
-// <--
class SwViewImp
{
@@ -175,7 +168,7 @@ private:
*/
void _InvalidateAccessibleParaTextSelection();
- /** invalidate attributes for paragraphs
+ /** invalidate attributes for paragraphs and paragraph's characters
OD 2009-01-06 #i88069#
implementation for wrapper method
diff --git a/sw/source/core/inc/wrong.hxx b/sw/source/core/inc/wrong.hxx
index e4e0ba33f9..ddea82fa67 100644
--- a/sw/source/core/inc/wrong.hxx
+++ b/sw/source/core/inc/wrong.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -57,7 +57,13 @@ public:
: maType(rType), mxPropertyBag(xPropertyBag), mnPos(nPos), mnLen(nLen), mpSubList(pSubList) {}
};
-enum WrongListType { WRONGLIST_SPELL, WRONGLIST_GRAMMAR, WRONGLIST_SMARTTAG };
+enum WrongListType
+{
+ WRONGLIST_SPELL,
+ WRONGLIST_GRAMMAR,
+ WRONGLIST_SMARTTAG,
+ WRONGLIST_CHANGETRACKING
+};
class SwWrongList
{
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 32be148927..ffc647a0bf 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -1460,15 +1460,23 @@ BOOL SwLayAction::FormatLayout( SwLayoutFrm *pLay, BOOL bAddRect )
//mod #i6193# added sidebar width
const SwPostItMgr* pPostItMgr = pImp->GetShell()->GetPostItMgr();
const int nSidebarWidth = pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ? pPostItMgr->GetSidebarWidth() + pPostItMgr->GetSidebarBorderWidth() : 0;
- if (pPageFrm->MarginSide())
+ switch ( pPageFrm->SidebarPosition() )
{
- aPaint.Left( aPaint.Left() - nBorderWidth - nSidebarWidth);
- aPaint.Right( aPaint.Right() + nBorderWidth + nShadowWidth);
- }
- else
- {
- aPaint.Left( aPaint.Left() - nBorderWidth );
- aPaint.Right( aPaint.Right() + nBorderWidth + nShadowWidth + nSidebarWidth);
+ case sw::sidebarwindows::SIDEBAR_LEFT:
+ {
+ aPaint.Left( aPaint.Left() - nBorderWidth - nSidebarWidth);
+ aPaint.Right( aPaint.Right() + nBorderWidth + nShadowWidth);
+ }
+ break;
+ case sw::sidebarwindows::SIDEBAR_RIGHT:
+ {
+ aPaint.Left( aPaint.Left() - nBorderWidth );
+ aPaint.Right( aPaint.Right() + nBorderWidth + nShadowWidth + nSidebarWidth);
+ }
+ break;
+ case sw::sidebarwindows::SIDEBAR_NONE:
+ // nothing to do
+ break;
}
aPaint.Top( aPaint.Top() - nBorderWidth );
aPaint.Bottom( aPaint.Bottom() + nBorderWidth + nShadowWidth);
@@ -1662,24 +1670,6 @@ BOOL SwLayAction::FormatLayoutFly( SwFlyFrm* pFly )
}
// OD 31.10.2002 #104100#
-// NOTE: no adjustments for vertical layout support necessary
-BOOL CheckPos( SwFrm *pFrm )
-{
- if ( !pFrm->GetValidPosFlag() )
- {
- Point aOld( pFrm->Frm().Pos() );
- pFrm->MakePos();
- if ( aOld != pFrm->Frm().Pos() )
- {
- pFrm->Frm().Pos( aOld );
- pFrm->_InvalidatePos();
- return FALSE;
- }
- }
- return TRUE;
-}
-
-// OD 31.10.2002 #104100#
// Implement vertical layout support
BOOL SwLayAction::FormatLayoutTab( SwTabFrm *pTab, BOOL bAddRect )
{
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index ffb66ca020..0e50ee3e3a 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -300,7 +300,7 @@ SwPageFrm::~SwPageFrm()
pImp->GetLayAction().SetAgain();
// OD 12.02.2003 #i9719#, #105645# - retouche area of page
// including border and shadow area.
- const bool bRightSidebar = !MarginSide();
+ const bool bRightSidebar = (SidebarPosition() == sw::sidebarwindows::SIDEBAR_RIGHT);
SwRect aRetoucheRect;
SwPageFrm::GetBorderAndShadowBoundRect( Frm(), pSh, aRetoucheRect, bRightSidebar );
pSh->AddPaintRect( aRetoucheRect );
@@ -655,7 +655,7 @@ void SwPageFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
{
// OD 12.02.2003 #i9719#, #105645# - consider border and shadow of
// page frame for determine 'old' rectangle - it's used for invalidating.
- const bool bRightSidebar = !MarginSide();
+ const bool bRightSidebar = (SidebarPosition() == sw::sidebarwindows::SIDEBAR_RIGHT);
SwRect aOldRectWithBorderAndShadow;
SwPageFrm::GetBorderAndShadowBoundRect( aOldPageFrmRect, pSh, aOldRectWithBorderAndShadow, bRightSidebar );
pSh->InvalidateWindows( aOldRectWithBorderAndShadow );
@@ -1386,17 +1386,19 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, BOOL bFtn )
}
// false = right, true = left
-bool SwPageFrm::MarginSide() const
+sw::sidebarwindows::SidebarPosition SwPageFrm::SidebarPosition() const
{
if (!GetShell() || GetShell()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE))
- return false;
+ return sw::sidebarwindows::SIDEBAR_NONE;
else
{
const bool bLTR = GetUpper() ? static_cast<const SwRootFrm*>(GetUpper())->IsLeftToRightViewLayout() : true;
const bool bBookMode = GetShell()->GetViewOptions()->IsViewLayoutBookMode();
const bool bRightSidebar = bLTR ? (!bBookMode || OnRightPage()) : (bBookMode && !OnRightPage());
- return !bRightSidebar;
+ return bRightSidebar
+ ? sw::sidebarwindows::SIDEBAR_RIGHT
+ : sw::sidebarwindows::SIDEBAR_LEFT;
}
}
@@ -2310,7 +2312,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
const SwTwips nCurrentPageWidth = pFormatPage->Frm().Width() + (pFormatPage->IsEmptyPage() ? 0 : nSidebarWidth);
const Point aOldPagePos = pPageToAdjust->Frm().Pos();
- const bool bLeftSidebar = pPageToAdjust->MarginSide();
+ const bool bLeftSidebar = pPageToAdjust->SidebarPosition() == sw::sidebarwindows::SIDEBAR_LEFT;
const SwTwips nLeftPageAddOffset = bLeftSidebar ?
nSidebarWidth :
0;
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index c231312dc9..3c6d08242b 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -2838,7 +2838,7 @@ void SwRootFrm::Paint( const SwRect& rRect, const SwPrtOptions *pPrintData ) con
// <--
{
const bool bPaintRightShadow = !bBookMode || (pPage == Lower()) || (!bLTR && !pPage->OnRightPage()) || (bLTR && pPage->OnRightPage());
- const bool bRightSidebar = !pPage->MarginSide();
+ const bool bRightSidebar = pPage->SidebarPosition() == sw::sidebarwindows::SIDEBAR_RIGHT;
if ( !pPage->IsEmptyPage() )
{
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index e1ec505964..90a7c61d51 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -1680,62 +1680,6 @@ BOOL MA_FASTCALL lcl_InnerCalcLayout( SwFrm *pFrm,
return bRet;
}
-void MA_FASTCALL lcl_FirstTabCalc( SwTabFrm *pTab )
-{
- SWRECTFN( pTab )
- if ( !pTab->IsFollow() && !pTab->GetTable()->IsTblComplex() )
- {
- SwLayoutFrm* pRow = (SwLayoutFrm*)pTab->Lower();
- // --> FME 2006-07-17 #134526# TabFrm without a lower? Better we check
- // it before crashing. However, I still don't know how this can happen!
- while ( pRow )
- {
- SwLayoutFrm *pCell = (SwLayoutFrm*)pRow->Lower();
- SwFrm *pCnt = pCell->Lower();
- // --> OD 2006-11-08 #i70641# - make code robust
- if ( pCnt )
- {
- pCnt->Calc();
- const long nCellHeight = (pCell->Frm().*fnRect->fnGetHeight)();
- const long nCellY = (pCell->Frm().*fnRect->fnGetTop)()-1;
- const long nCntHeight = (pCnt->Frm().*fnRect->fnGetHeight)();
- const long nCntY = (pCnt->Frm().*fnRect->fnGetTop)()-1;
- if ( 0 != (pCell = (SwLayoutFrm*)pCell->GetNext()) )
- {
- do
- {
- (pCell->Frm().*fnRect->fnSetTopAndHeight)( nCellY, nCellHeight );
- (pCell->Prt().*fnRect->fnSetHeight)( nCellHeight );
- pCell->_InvalidateAll();
-
- pCnt = pCell->Lower();
- if ( pCnt )
- {
- (pCnt->Frm().*fnRect->fnSetTopAndHeight)(nCntY, nCntHeight);
- (pCnt->Prt().*fnRect->fnSetHeight)( nCntHeight );
- pCnt->_InvalidateAll();
- }
-
- pCell = (SwLayoutFrm*)pCell->GetNext();
- } while ( pCell );
- }
-
- SwTwips nRowTop = (pRow->Frm().*fnRect->fnGetTop)();
- SwTwips nUpBot = (pTab->GetUpper()->Frm().*fnRect->fnGetBottom)();
- if( (*fnRect->fnYDiff)( nUpBot, nRowTop ) < 0 )
- break;
- }
- // <--
- pRow = (SwLayoutFrm*)pRow->GetNext();
- }
- }
- SwFrm *pUp = pTab->GetUpper();
- long nBottom = (pUp->*fnRect->fnGetPrtBottom)();
- if ( pTab->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
- nBottom += pUp->Grow( LONG_MAX, TRUE );
- lcl_CalcLowers( (SwLayoutFrm*)pTab->Lower(), pTab, LONG_MAX, false );
-}
-
void MA_FASTCALL lcl_RecalcRow( SwRowFrm& rRow, long nBottom )
{
// --> OD 2004-10-05 #i26945# - For correct appliance of the 'straightforward
@@ -2146,17 +2090,13 @@ void SwTabFrm::MakeAll()
if ( !bValidSize || !bValidPrtArea )
{
- // HB #i101593# no optimization as it leeds to not layouting certain nested tables
- // const BOOL bOptLower = (Frm().*fnRect->fnGetHeight)() == 0;
- const BOOL bOptLower = FALSE;
-
const long nOldPrtWidth = (Prt().*fnRect->fnGetWidth)();
const long nOldFrmWidth = (Frm().*fnRect->fnGetWidth)();
const Point aOldPrtPos = (Prt().*fnRect->fnGetPos)();
Format( pAttrs );
SwHTMLTableLayout *pLayout = GetTable()->GetHTMLTableLayout();
- if ( /*!bOptLower &&*/ pLayout &&
+ if ( pLayout &&
((Prt().*fnRect->fnGetWidth)() != nOldPrtWidth ||
(Frm().*fnRect->fnGetWidth)() != nOldFrmWidth) )
{
@@ -2167,100 +2107,8 @@ void SwTabFrm::MakeAll()
pAccess= new SwBorderAttrAccess( SwFrm::GetCache(), this );
pAttrs = pAccess->Get();
}
- if ( !bOptLower && aOldPrtPos != (Prt().*fnRect->fnGetPos)() )
+ if ( aOldPrtPos != (Prt().*fnRect->fnGetPos)() )
aNotify.SetLowersComplete( FALSE );
-
- if ( bOptLower && Lower() )
- {
- //MA 24. May. 95: Optimierungsversuch!
- //Ganz nigel nagel neu das Teil. Damit wir nicht n-fach
- //MakeAll'en formatieren wir flugs den Inhalt.
- //Das erste Format mussten wir allerdings abwarten, damit
- //die Breiten Stimmen!
- //MA: Fix, Kein Calc wenn evtl. noch Seitengebunde Flys
- //an den Cntnt haengen (siehe frmtool.cxx, ~SwCntntNotify).
- SwDoc *pDoc = GetFmt()->GetDoc();
- if ( !pDoc->GetSpzFrmFmts()->Count() ||
- pDoc->IsLoaded() || pDoc->IsNewDoc() )
- {
- //MA 28. Nov. 95: Und wieder ein Trick, gleich mal sehen
- //ob ein Rueckfluss lohnt.
- if ( bMoveable && !GetPrev() )
- {
- GetLeaf( MAKEPAGE_NONE, FALSE ); //setzt das BackMoveJump
- if ( SwFlowFrm::IsMoveBwdJump() )
- {
- BOOL bDummy;
- SwFtnBossFrm *pOldBoss = bFtnsInDoc ?
- FindFtnBossFrm( TRUE ) : 0;
- const BOOL bOldPrev = GetPrev() != 0;
- if ( MoveBwd( bDummy ) )
- {
- SWREFRESHFN( this )
- bMovedBwd = TRUE;
- if ( bFtnsInDoc )
- MoveLowerFtns( 0, pOldBoss, 0, TRUE );
-
- long nOldTop = (Frm().*fnRect->fnGetTop)();
- MakePos();
- if( nOldTop != (Frm().*fnRect->fnGetTop)() )
- {
- SwHTMLTableLayout *pHTMLLayout =
- GetTable()->GetHTMLTableLayout();
- if( pHTMLLayout )
- {
- delete pAccess;
- bCalcLowers |= pHTMLLayout->Resize(
- pHTMLLayout->GetBrowseWidthByTabFrm(
- *this ), FALSE );
- pAccess= new SwBorderAttrAccess(
- SwFrm::GetCache(), this );
- pAttrs = pAccess->Get();
- }
- }
-
- if ( bOldPrev != (0 != GetPrev()) )
- {
- //Abstand nicht vergessen!
- bValidPrtArea = FALSE;
- Format( pAttrs );
- }
- if ( bKeep && KEEPTAB )
- {
- // --> OD 2005-09-28 #b6329202#
- // Consider case that table is inside another
- // table, because it has to be avoided, that
- // superior table is formatted.
- // Thus, find next content, table or section
- // and, if a section is found, get its first
- // content.
-// SwFrm *pNxt = FindNextCnt();
-// // FindNextCnt geht ggf. in einen Bereich
-// // hinein, in eine Tabelle allerdings auch
-// if( pNxt && pNxt->IsInTab() )
-// pNxt = pNxt->FindTabFrm();
-// if ( pNxt )
-// {
-// pNxt->Calc();
-// if ( !GetNext() )
-// bValidPos = FALSE;
-// }
- if ( 0 != lcl_FormatNextCntntForKeep( this ) &&
- !GetNext() )
- {
- bValidPos = FALSE;
- }
- // <--
- }
- }
- }
- }
- ::lcl_FirstTabCalc( this );
- bValidSize = bValidPrtArea = FALSE;
- Format( pAttrs );
- aNotify.SetLowersComplete( TRUE );
- }
- }
}
//Wenn ich der erste einer Kette bin koennte ich mal sehen ob
@@ -4773,6 +4621,30 @@ void SwRowFrm::Cut()
{
pTab->FindMaster()->InvalidatePos();
}
+
+ // --> OD 2010-02-17 #i103961#
+ // notification for accessibility
+ {
+ SwRootFrm *pRootFrm = FindRootFrm();
+ if( pRootFrm && pRootFrm->IsAnyShellAccessible() )
+ {
+ ViewShell* pVSh = pRootFrm->GetCurrShell();
+ if ( pVSh && pVSh->Imp() )
+ {
+ SwFrm* pCellFrm( GetLower() );
+ while ( pCellFrm )
+ {
+ ASSERT( pCellFrm->IsCellFrm(),
+ "<SwRowFrm::Cut()> - unexpected type of SwRowFrm lower." );
+ pVSh->Imp()->DisposeAccessibleFrm( pCellFrm );
+
+ pCellFrm = pCellFrm->GetNext();
+ }
+ }
+ }
+ }
+ // <--
+
SwLayoutFrm::Cut();
}
@@ -5652,15 +5524,25 @@ long SwCellFrm::GetLayoutRowSpan() const
return nRet;
}
-/*************************************************************************
-|*
-|* SwCellFrm::Modify()
-|*
-|* Ersterstellung MA 20. Dec. 96
-|* Letzte Aenderung MA 20. Dec. 96
-|*
-|*************************************************************************/
+// --> OD 2010-02-17 #i103961#
+void SwCellFrm::Cut()
+{
+ // notification for accessibility
+ {
+ SwRootFrm *pRootFrm = FindRootFrm();
+ if( pRootFrm && pRootFrm->IsAnyShellAccessible() )
+ {
+ ViewShell* pVSh = pRootFrm->GetCurrShell();
+ if ( pVSh && pVSh->Imp() )
+ {
+ pVSh->Imp()->DisposeAccessibleFrm( this );
+ }
+ }
+ }
+ SwLayoutFrm::Cut();
+}
+// <--
//
// Helper functions for repeated headlines:
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index acd09ae153..f710de93c9 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -768,28 +768,6 @@ void SwFrm::Remove()
{
ASSERT( pUpper, "Removen ohne Upper?" );
- // --> OD 2004-09-27 #114344# - inform accessibility API - dispose table the
- // frame is in - before frame is 'removed from the layout' and
- // only for cell frames and row frames.
- if ( IsInTab() && ( IsRowFrm() || IsCellFrm() ) )
- {
- SwTabFrm* pTableFrm = FindTabFrm();
- if( pTableFrm != NULL &&
- pTableFrm->IsAccessibleFrm() &&
- pTableFrm->GetFmt() != NULL )
- {
- SwRootFrm *pRootFrm = pTableFrm->FindRootFrm();
- if( pRootFrm != NULL &&
- pRootFrm->IsAnyShellAccessible() )
- {
- ViewShell* pShell = pRootFrm->GetCurrShell();
- if( pShell != NULL )
- pShell->Imp()->DisposeAccessibleFrm( pTableFrm, sal_True );
- }
- }
- }
- // <--
-
if( pPrev )
// einer aus der Mitte wird removed
pPrev->pNext = pNext;
diff --git a/sw/source/core/swg/SwXMLSectionList.cxx b/sw/source/core/swg/SwXMLSectionList.cxx
index bf167dba29..b2dd6c7dbe 100644
--- a/sw/source/core/swg/SwXMLSectionList.cxx
+++ b/sw/source/core/swg/SwXMLSectionList.cxx
@@ -68,18 +68,22 @@ SvXMLImportContext *SwXMLSectionList::CreateContext(
{
SvXMLImportContext *pContext = 0;
- if (nPrefix == XML_NAMESPACE_OFFICE && IsXMLToken ( rLocalName, XML_BODY ) ||
- nPrefix == XML_NAMESPACE_TEXT &&
- (IsXMLToken ( rLocalName, XML_P ) ||
- IsXMLToken ( rLocalName, XML_H ) ||
- IsXMLToken ( rLocalName, XML_A ) ||
- IsXMLToken ( rLocalName, XML_SPAN ) ||
- IsXMLToken ( rLocalName, XML_SECTION ) ||
- IsXMLToken ( rLocalName, XML_INDEX_BODY ) ||
- IsXMLToken ( rLocalName, XML_INDEX_TITLE )||
- IsXMLToken ( rLocalName, XML_INSERTION ) ||
- IsXMLToken ( rLocalName, XML_DELETION ) ) )
+ if(( nPrefix == XML_NAMESPACE_OFFICE && IsXMLToken ( rLocalName, XML_BODY )) ||
+ ( nPrefix == XML_NAMESPACE_TEXT &&
+ (IsXMLToken ( rLocalName, XML_P ) ||
+ IsXMLToken ( rLocalName, XML_H ) ||
+ IsXMLToken ( rLocalName, XML_A ) ||
+ IsXMLToken ( rLocalName, XML_SPAN ) ||
+ IsXMLToken ( rLocalName, XML_SECTION ) ||
+ IsXMLToken ( rLocalName, XML_INDEX_BODY ) ||
+ IsXMLToken ( rLocalName, XML_INDEX_TITLE )||
+ IsXMLToken ( rLocalName, XML_INSERTION ) ||
+ IsXMLToken ( rLocalName, XML_DELETION ) )
+ )
+ )
+ {
pContext = new SvXMLSectionListContext (*this, nPrefix, rLocalName, xAttrList);
+ }
else
pContext = SvXMLImport::CreateContext( nPrefix, rLocalName, xAttrList );
return pContext;
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index a755dd59e3..9144738a68 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -2726,3 +2726,160 @@ void SwTableBox_Impl::SetNewCol( Color** ppCol, const Color* pNewCol )
}
}
+struct SwTableCellInfo::Impl
+{
+ const SwTable * m_pTable;
+ const SwCellFrm * m_pCellFrm;
+ const SwTabFrm * m_pTabFrm;
+ typedef ::std::set<const SwTableBox *> TableBoxes_t;
+ TableBoxes_t m_HandledTableBoxes;
+
+public:
+ Impl()
+ : m_pTable(NULL), m_pCellFrm(NULL), m_pTabFrm(NULL)
+ {
+ }
+
+ ~Impl() {}
+
+ void setTable(const SwTable * pTable) {
+ m_pTable = pTable;
+ SwFrmFmt * pFrmFmt = m_pTable->GetFrmFmt();
+ SwClientIter aIter(*pFrmFmt);
+
+ m_pTabFrm =
+ static_cast<const SwTabFrm *>(aIter.First(TYPE(SwTabFrm)));
+
+ if (m_pTabFrm->IsFollow())
+ m_pTabFrm = m_pTabFrm->FindMaster(true);
+ }
+ const SwTable * getTable() const { return m_pTable; }
+
+ const SwCellFrm * getCellFrm() const { return m_pCellFrm; }
+
+ const SwFrm * getNextFrmInTable(const SwFrm * pFrm);
+ const SwCellFrm * getNextCellFrm(const SwFrm * pFrm);
+ const SwCellFrm * getNextTableBoxsCellFrm(const SwFrm * pFrm);
+ bool getNext();
+};
+
+const SwFrm * SwTableCellInfo::Impl::getNextFrmInTable(const SwFrm * pFrm)
+{
+ const SwFrm * pResult = NULL;
+
+ if (((! pFrm->IsTabFrm()) || pFrm == m_pTabFrm) && pFrm->GetLower())
+ pResult = pFrm->GetLower();
+ else if (pFrm->GetNext())
+ pResult = pFrm->GetNext();
+ else
+ {
+ while (pFrm->GetUpper() != NULL)
+ {
+ pFrm = pFrm->GetUpper();
+
+ if (pFrm->IsTabFrm())
+ {
+ m_pTabFrm = static_cast<const SwTabFrm *>(pFrm)->GetFollow();
+ pResult = m_pTabFrm;
+ break;
+ }
+ else if (pFrm->GetNext())
+ {
+ pResult = pFrm->GetNext();
+ break;
+ }
+ }
+ }
+
+ return pResult;
+}
+
+const SwCellFrm * SwTableCellInfo::Impl::getNextCellFrm(const SwFrm * pFrm)
+{
+ const SwCellFrm * pResult = NULL;
+
+ while ((pFrm = getNextFrmInTable(pFrm)) != NULL)
+ {
+ if (pFrm->IsCellFrm())
+ {
+ pResult = static_cast<const SwCellFrm *>(pFrm);
+ break;
+ }
+ }
+
+ return pResult;
+}
+
+const SwCellFrm * SwTableCellInfo::Impl::getNextTableBoxsCellFrm(const SwFrm * pFrm)
+{
+ const SwCellFrm * pResult = NULL;
+
+ while ((pFrm = getNextCellFrm(pFrm)) != NULL)
+ {
+ const SwCellFrm * pCellFrm = static_cast<const SwCellFrm *>(pFrm);
+ const SwTableBox * pTabBox = pCellFrm->GetTabBox();
+ TableBoxes_t::const_iterator aIt = m_HandledTableBoxes.find(pTabBox);
+
+ if (aIt == m_HandledTableBoxes.end())
+ {
+ pResult = pCellFrm;
+ m_HandledTableBoxes.insert(pTabBox);
+ break;
+ }
+ }
+
+ return pResult;
+}
+
+const SwCellFrm * SwTableCellInfo::getCellFrm() const
+{
+ return m_pImpl->getCellFrm();
+}
+
+bool SwTableCellInfo::Impl::getNext()
+{
+ if (m_pCellFrm == NULL)
+ {
+ if (m_pTabFrm != NULL)
+ m_pCellFrm = Impl::getNextTableBoxsCellFrm(m_pTabFrm);
+ }
+ else
+ m_pCellFrm = Impl::getNextTableBoxsCellFrm(m_pCellFrm);
+
+ return m_pCellFrm != NULL;
+}
+
+SwTableCellInfo::SwTableCellInfo(const SwTable * pTable)
+{
+ m_pImpl.reset(new Impl());
+ m_pImpl->setTable(pTable);
+}
+
+SwTableCellInfo::~SwTableCellInfo()
+{
+}
+
+bool SwTableCellInfo::getNext()
+{
+ return m_pImpl->getNext();
+}
+
+SwRect SwTableCellInfo::getRect() const
+{
+ SwRect aRet;
+
+ if (getCellFrm() != NULL)
+ aRet = getCellFrm()->Frm();
+
+ return aRet;
+}
+
+const SwTableBox * SwTableCellInfo::getTableBox() const
+{
+ const SwTableBox * pRet = NULL;
+
+ if (getCellFrm() != NULL)
+ pRet = getCellFrm()->GetTabBox();
+
+ return pRet;
+}
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index f21b74f92b..6d7ba700a6 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -1392,14 +1392,17 @@ void SwTaggedPDFHelper::BeginInlineStructureElements()
case POR_PARA :
{
SwTxtNode* pNd = (SwTxtNode*)pFrm->GetTxtNode();
- SwIndex aIndex( pNd, rInf.GetIdx() );
- const SwTxtAttr* pInetFmtAttr = pNd->GetTxtAttr( aIndex, RES_TXTATR_INETFMT );
+ SwTxtAttr const*const pInetFmtAttr =
+ pNd->GetTxtAttrAt(rInf.GetIdx(), RES_TXTATR_INETFMT);
String sStyleName;
if ( !pInetFmtAttr )
{
- const SwTxtAttr* pCharFmtAttr = pNd->GetTxtAttr( aIndex, RES_TXTATR_CHARFMT );
- const SwCharFmt* pCharFmt = pCharFmtAttr ? pCharFmtAttr->GetCharFmt().GetCharFmt() : 0;
+ ::std::vector<SwTxtAttr *> const charAttrs(
+ pNd->GetTxtAttrsAt(rInf.GetIdx(), RES_TXTATR_CHARFMT));
+ // TODO: handle more than 1 char style?
+ const SwCharFmt* pCharFmt = (charAttrs.size())
+ ? (*charAttrs.begin())->GetCharFmt().GetCharFmt() : 0;
if ( pCharFmt )
SwStyleNameMapper::FillProgName( pCharFmt->GetName(), sStyleName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, sal_True );
}
diff --git a/sw/source/core/text/SwGrammarMarkUp.cxx b/sw/source/core/text/SwGrammarMarkUp.cxx
index 30240dadd5..0ca81c98f5 100644
--- a/sw/source/core/text/SwGrammarMarkUp.cxx
+++ b/sw/source/core/text/SwGrammarMarkUp.cxx
@@ -136,21 +136,6 @@ void SwGrammarMarkUp::setSentence( xub_StrLen nStart )
maSentence.insert( pIter, nStart );
}
-void SwGrammarMarkUp::removeSentence(xub_StrLen nStart, xub_StrLen nLength )
-{
- std::vector< xub_StrLen >::iterator pIter = maSentence.begin();
- while( pIter != maSentence.end() && *pIter < nStart )
- ++pIter;
- if( nLength == STRING_LEN )
- nStart = STRING_LEN;
- else
- nStart += nLength;
- std::vector< xub_StrLen >::iterator pLast = pIter;
- while( pLast != maSentence.end() && *pLast < nStart )
- ++pLast;
- maSentence.erase( pIter, pLast );
-}
-
xub_StrLen SwGrammarMarkUp::getSentenceStart( xub_StrLen nPos )
{
if( !maSentence.size() )
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index d58f2907bd..9e5a6ef888 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -77,7 +77,7 @@
#include <doc.hxx>
#include <pam.hxx>
#include <SwGrammarMarkUp.hxx>
-
+#include <cstdio>
// --> FME 2004-06-08 #i12836# enhanced pdf export
#include <EnhancedPDFExportHelper.hxx>
// <--
@@ -1139,7 +1139,6 @@ void SwTxtPaintInfo::DrawPostIts( const SwLinePortion&, sal_Bool bScript ) const
}
}
-
void SwTxtPaintInfo::DrawCheckBox( const SwFieldFormPortion &rPor, bool checked) const
{
SwRect aIntersect;
@@ -1169,7 +1168,6 @@ void SwTxtPaintInfo::DrawCheckBox( const SwFieldFormPortion &rPor, bool checked)
pOut->Pop();
}
}
-
/*************************************************************************
* SwTxtPaintInfo::DrawBackGround()
*************************************************************************/
@@ -1325,8 +1323,8 @@ void SwTxtPaintInfo::_NotifyURL( const SwLinePortion &rPor ) const
if( aIntersect.HasArea() )
{
SwTxtNode *pNd = (SwTxtNode*)GetTxtFrm()->GetTxtNode();
- SwIndex aIndex( pNd, GetIdx() );
- SwTxtAttr *pAttr = pNd->GetTxtAttr( aIndex, RES_TXTATR_INETFMT );
+ SwTxtAttr *const pAttr =
+ pNd->GetTxtAttrAt(GetIdx(), RES_TXTATR_INETFMT);
if( pAttr )
{
const SwFmtINetFmt& rFmt = pAttr->GetINetFmt();
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index 7d6fcc8f64..b15c7fe0c8 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -474,7 +474,7 @@ public:
inline void DrawBackBrush( const SwLinePortion &rPor ) const
{ /* if( pFnt->GetBackColor() ) */ _DrawBackBrush( rPor ); }
- void DrawCheckBox( const SwFieldFormPortion &rPor, bool checked) const;
+ void DrawCheckBox( const SwFieldFormPortion &rPor, bool checked) const;
inline void NotifyURL( const SwLinePortion &rPor ) const
{ if( URLNotify() ) _NotifyURL( rPor ); }
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index 7eacdff12d..3e7d2fff57 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -57,6 +57,9 @@
#include "pordrop.hxx"
#include "crstate.hxx" // SwCrsrMoveState
#include <pormulti.hxx> // SwMultiPortion
+// --> OD 2010-05-05 #i111284#
+#include <numrule.hxx>
+// <--
// Nicht reentrant !!!
// wird in GetCharRect gesetzt und im UnitUp/Down ausgewertet.
@@ -143,6 +146,27 @@ void lcl_GetCharRectInsideField( SwTxtSizeInfo& rInf, SwRect& rOrig,
}
}
+// --> OD 2010-05-05 #i111284#
+namespace {
+ bool AreListLevelIndentsApplicableAndLabelAlignmentActive( const SwTxtNode& rTxtNode )
+ {
+ bool bRet( false );
+
+ if ( rTxtNode.AreListLevelIndentsApplicable() )
+ {
+ const SwNumFmt& rNumFmt =
+ rTxtNode.GetNumRule()->Get( static_cast<USHORT>(rTxtNode.GetActualListLevel()) );
+ if ( rNumFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
+ {
+ bRet = true;
+ }
+ }
+
+ return bRet;
+ }
+} // end of anonymous namespace
+// <--
+
/*************************************************************************
* SwTxtMargin::CtorInitTxtMargin()
*************************************************************************/
@@ -156,7 +180,9 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
const SvxLRSpaceItem &rSpace = pFrm->GetTxtNode()->GetSwAttrSet().GetLRSpace();
// --> OD 2009-09-08 #i95907#, #b6879723#
- const bool bListLevelIndentsApplicable = pFrm->GetTxtNode()->AreListLevelIndentsApplicable();
+ // --> OD 2010-05-05 #i111284#
+ const bool bListLevelIndentsApplicableAndLabelAlignmentActive(
+ AreListLevelIndentsApplicableAndLabelAlignmentActive( *(pFrm->GetTxtNode()) ) );
// <--
//
@@ -181,9 +207,10 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
nLMWithNum -
pNode->GetLeftMarginWithNum( sal_False ) -
// --> OD 2009-09-08 #i95907#, #b6879723#
+ // --> OD 2010-05-05 #i111284#
// rSpace.GetLeft() +
// rSpace.GetTxtLeft();
- ( bListLevelIndentsApplicable
+ ( bListLevelIndentsApplicableAndLabelAlignmentActive
? 0
: ( rSpace.GetLeft() - rSpace.GetTxtLeft() ) );
// <--
@@ -191,8 +218,9 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
else
{
// --> OD 2009-09-08 #i95907#, #b6879723#
+ // --> OD 2010-05-05 #i111284#
// if ( !pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) )
- if ( bListLevelIndentsApplicable ||
+ if ( bListLevelIndentsApplicableAndLabelAlignmentActive ||
!pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) )
// <--
{
@@ -202,9 +230,10 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
nLMWithNum -
pNode->GetLeftMarginWithNum( sal_False ) -
// --> OD 2009-09-08 #i95907#, #b6879723#
+ // --> OD 2010-05-05 #i111284#
// rSpace.GetLeft() +
// rSpace.GetTxtLeft();
- ( bListLevelIndentsApplicable
+ ( bListLevelIndentsApplicableAndLabelAlignmentActive
? 0
: ( rSpace.GetLeft() - rSpace.GetTxtLeft() ) );
// <--
@@ -292,10 +321,11 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
nFirstLineOfs = nFLOfst;
// --> OD 2009-09-08 #i95907#, #b6879723#
+ // --> OD 2010-05-05 #i111284#
// if ( pFrm->IsRightToLeft() ||
// !pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) )
if ( pFrm->IsRightToLeft() ||
- bListLevelIndentsApplicable ||
+ bListLevelIndentsApplicableAndLabelAlignmentActive ||
!pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) )
// <--
{
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 02f150f2ff..34dbba9e9f 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -125,11 +125,6 @@ sal_Bool isHahChar ( xub_Unicode cCh )
|| cCh == 0x6BF );
}
-sal_Bool isTahChar ( xub_Unicode cCh )
-{
- return ( cCh == 0x637 || cCh == 0x638 || cCh == 0x69F );
-}
-
sal_Bool isAinChar ( xub_Unicode cCh )
{
return ( cCh == 0x639 || cCh == 0x63A || cCh == 0x6A0 || cCh == 0x6FC );
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 62532288bc..f36ee06552 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -2341,84 +2341,6 @@ SwRect SwTxtFly::AnchoredObjToRect( const SwAnchoredObject* pAnchoredObj,
// Beidseitiger Umfluss bis zu einer Rahmenbreite von maximal 1,5 cm
#define FRAME_MAX 850
-//_FlyCntnt SwTxtFly::CalcSmart( const SdrObject *pObj ) const
-//{
-// _FlyCntnt eOrder;
-
-// // 11839: Nur die X-Positionen sind interessant, die Y-Positionen des
-// // CurrentFrames koennen sich noch aendern (wachsen).
-
-// SWRECTFN( pCurrFrm )
-// const long nCurrLeft = (pCurrFrm->*fnRect->fnGetPrtLeft)();
-// const long nCurrRight = (pCurrFrm->*fnRect->fnGetPrtRight)();
-// const SwRect aRect( GetBoundRect( pObj ) );
-// long nFlyLeft = (aRect.*fnRect->fnGetLeft)();
-// long nFlyRight = (aRect.*fnRect->fnGetRight)();
-
-// if ( nFlyRight < nCurrLeft || nFlyLeft > nCurrRight )
-// eOrder = SURROUND_PARALLEL;
-// else
-// {
-// long nLeft = nFlyLeft - nCurrLeft;
-// long nRight = nCurrRight - nFlyRight;
-// if( nFlyRight - nFlyLeft > FRAME_MAX )
-// {
-// if( nLeft < nRight )
-// nLeft = 0;
-// else
-// nRight = 0;
-// }
-// if( nLeft < TEXT_MIN )
-// nLeft = 0;
-// if( nRight < TEXT_MIN )
-// nRight = 0;
-// if( nLeft )
-// eOrder = nRight ? SURROUND_PARALLEL : SURROUND_LEFT;
-// else
-// eOrder = nRight ? SURROUND_RIGHT: SURROUND_NONE;
-// }
-
-// return eOrder;
-//}
-
-/*************************************************************************
- * SwTxtFly::GetOrder()
- *************************************************************************/
-
-//_FlyCntnt SwTxtFly::GetOrder( const SdrObject *pObj ) const
-//{
-// const SwFrmFmt *pFmt = ((SwContact*)GetUserCall(pObj))->GetFmt();
-// const SwFmtSurround &rFlyFmt = pFmt->GetSurround();
-// _FlyCntnt eOrder = rFlyFmt.GetSurround();
-
-// if( rFlyFmt.IsAnchorOnly() && &lcl_TheAnchor( pObj ) != GetMaster() )
-// {
-// const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
-// if( FLY_AT_CNTNT == rAnchor.GetAnchorId() ||
-// FLY_AUTO_CNTNT == rAnchor.GetAnchorId() )
-// return SURROUND_NONE;
-// }
-
-// Beim Durchlauf und Nowrap wird smart ignoriert.
-// if( SURROUND_THROUGHT == eOrder || SURROUND_NONE == eOrder )
-// return eOrder;
-
-// left is left and right is right
-// if ( pCurrFrm->IsRightToLeft() )
-// {
-// if ( SURROUND_LEFT == eOrder )
-// eOrder = SURROUND_RIGHT;
-// else if ( SURROUND_RIGHT == eOrder )
-// eOrder = SURROUND_LEFT;
-// }
-
-// "idealer Seitenumlauf":
-// if( SURROUND_IDEAL == eOrder )
-// eOrder = CalcSmart( pObj ); //Bei SMART wird die Order automatisch berechnet:
-
-// return eOrder;
-//}
-
SwSurround SwTxtFly::_GetSurroundForTextWrap( const SwAnchoredObject* pAnchoredObj ) const
{
const SwFrmFmt* pFmt = &(pAnchoredObj->GetFrmFmt());
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 0b7029065f..a6fa31c642 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1026,6 +1026,13 @@ void SwTxtFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
SET_SCRIPT_INVAL( nPos )
}
}
+
+ // --> OD 2010-02-16 #i104008#
+ if ( GetShell() )
+ {
+ GetShell()->InvalidateAccessibleParaAttrs( *this );
+ }
+ // <--
}
break;
case RES_OBJECTDYING:
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index ae9d41a697..9a1c66aac6 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -172,6 +172,11 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
cDec = pTabStop->GetDecimal();
eAdj = pTabStop->GetAdjustment();
nNextPos = pTabStop->GetTabPos();
+ if(!bTabsRelativeToIndent && eAdj == SVX_TAB_ADJUST_DEFAULT && nSearchPos < 0)
+ {
+ //calculate default tab position of default tabs in negative indent
+ nNextPos = ( nSearchPos / nNextPos ) * nNextPos;
+ }
}
else
{
@@ -189,13 +194,8 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
}
SwTwips nCount = nSearchPos;
- // Bei negativen Werten rundet "/" auf, "%" liefert negative Reste,
- // bei positiven Werten rundet "/" ab, "%" liefert positvie Reste!
- if ( nCount < 0 )
- nCount = 0;
-
nCount /= nDefTabDist;
- nNextPos = ( nCount + 1 ) * nDefTabDist ;
+ nNextPos = nCount < 0 || (!nCount && nSearchPos <= 0)? nCount * nDefTabDist :( nCount + 1 ) * nDefTabDist ;
// --> FME 2004-09-21 #117919 Minimum tab stop width is 1 or 51 twips:
const SwTwips nMinimumTabWidth = pFrm->GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::TAB_COMPAT) ? 0 : 50;
// <--
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index 55399e4ea8..e3d80b4af6 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -870,8 +870,9 @@ USHORT SwTOXAuthority::GetLevel() const
-----------------------------------------------------------------------*/
void SwTOXAuthority::_GetText( String& rTxt, String& )
{
- //
- rTxt = m_rField.GetFld()->Expand();
+ bool const isClipBoard(
+ m_rField.GetTxtFld()->GetTxtNode().GetDoc()->IsClipBoard());
+ rTxt = m_rField.GetFld()->ExpandField(isClipBoard);
}
/* -----------------21.09.99 12:50-------------------
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx
index ce1dd11493..a2fbd39f9f 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -32,6 +32,7 @@
#include <fmtfld.hxx>
#include <txtfld.hxx>
#include <docufld.hxx>
+#include <doc.hxx>
#include "reffld.hxx"
#include "ddefld.hxx"
@@ -68,7 +69,7 @@ SwFmtFld::SwFmtFld( const SwField &rFld )
SwClient( rFld.GetTyp() ),
pTxtAttr( 0 )
{
- pField = rFld.Copy();
+ pField = rFld.CopyField();
}
// #i24434#
@@ -83,7 +84,7 @@ SwFmtFld::SwFmtFld( const SwFmtFld& rAttr )
if(rAttr.GetFld())
{
rAttr.GetFld()->GetTyp()->Add(this);
- pField = rAttr.GetFld()->Copy();
+ pField = rAttr.GetFld()->CopyField();
}
}
@@ -157,14 +158,16 @@ void SwFmtFld::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
if( !pTxtAttr )
return;
+ // don't do anything, especially not expand!
+ if( pNew && pNew->Which() == RES_OBJECTDYING )
+ return;
+
SwTxtNode* pTxtNd = (SwTxtNode*)&pTxtAttr->GetTxtNode();
ASSERT( pTxtNd, "wo ist denn mein Node?" );
if( pNew )
{
switch( pNew->Which() )
{
- case RES_OBJECTDYING:
- return; // don't do anything, especially not expand!
case RES_TXTATR_FLDCHG:
// "Farbe hat sich geaendert !"
// this, this fuer "nur Painten"
@@ -189,6 +192,8 @@ void SwFmtFld::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
case RES_FMT_CHG:
pTxtNd->Modify( pOld, pNew );
return;
+ default:
+ break;
}
}
@@ -254,9 +259,10 @@ BOOL SwFmtFld::IsProtect() const
|*
*************************************************************************/
-SwTxtFld::SwTxtFld( SwFmtFld& rAttr, xub_StrLen nStartPos )
+SwTxtFld::SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStartPos,
+ bool const bInClipboard)
: SwTxtAttr( rAttr, nStartPos )
- , m_aExpand( rAttr.GetFld()->Expand() )
+ , m_aExpand( rAttr.GetFld()->ExpandField(bInClipboard) )
, m_pTxtNode( 0 )
{
rAttr.pTxtAttr = this;
@@ -265,6 +271,11 @@ SwTxtFld::SwTxtFld( SwFmtFld& rAttr, xub_StrLen nStartPos )
SwTxtFld::~SwTxtFld( )
{
+ SwFmtFld & rFmtFld( static_cast<SwFmtFld &>(GetAttr()) );
+ if (this == rFmtFld.pTxtAttr)
+ {
+ rFmtFld.pTxtAttr = 0; // #i110140# invalidate!
+ }
}
/*************************************************************************
@@ -283,7 +294,8 @@ void SwTxtFld::Expand() const
ASSERT( m_pTxtNode, "SwTxtFld: where is my TxtNode?" );
const SwField* pFld = GetFld().GetFld();
- XubString aNewExpand( pFld->Expand() );
+ XubString aNewExpand(
+ pFld->ExpandField(m_pTxtNode->GetDoc()->IsClipBoard()) );
if( aNewExpand == m_aExpand )
{
diff --git a/sw/source/core/txtnode/atrftn.cxx b/sw/source/core/txtnode/atrftn.cxx
index 5334358a07..b78633895f 100644
--- a/sw/source/core/txtnode/atrftn.cxx
+++ b/sw/source/core/txtnode/atrftn.cxx
@@ -289,39 +289,45 @@ void SwTxtFtn::SetNumber( const USHORT nNewNum, const XubString* pStr )
}
// Die Fussnoten duplizieren
-void SwTxtFtn::CopyFtn( SwTxtFtn *pDest ) const
+void SwTxtFtn::CopyFtn(SwTxtFtn & rDest, SwTxtNode & rDestNode) const
{
- if ( m_pStartNode && pDest->GetStartNode() )
+ if (m_pStartNode && !rDest.GetStartNode())
{
- // die Fussnoten koennen in unterschiedlichen Dokumenten stehen !!
- SwDoc* pDstDoc = pDest->m_pTxtNode->GetDoc();
+ // dest missing node section? create it here!
+ // (happens in SwTxtNode::CopyText if pDest == this)
+ rDest.MakeNewTextSection( rDestNode.GetNodes() );
+ }
+ if (m_pStartNode && rDest.GetStartNode())
+ {
+ // footnotes not necessarily in same document!
+ SwDoc *const pDstDoc = rDestNode.GetDoc();
SwNodes &rDstNodes = pDstDoc->GetNodes();
- // Wir kopieren nur den Inhalt der Sektion
+ // copy only the content of the section
SwNodeRange aRg( *m_pStartNode, 1,
*m_pStartNode->GetNode().EndOfSectionNode() );
- // Wir fuegen auf dem Ende von pDest ein, d.h. die Nodes
- // werden angehaengt. nDestLen haelt die Anzahl der CntNodes
- // in pDest _vor_ dem Kopieren.
- SwNodeIndex aStart( *(pDest->GetStartNode()) );
+ // insert at the end of rDest, i.e., the nodes are appended.
+ // nDestLen contains number of CntntNodes in rDest _before_ copy.
+ SwNodeIndex aStart( *(rDest.GetStartNode()) );
SwNodeIndex aEnd( *aStart.GetNode().EndOfSectionNode() );
ULONG nDestLen = aEnd.GetIndex() - aStart.GetIndex() - 1;
m_pTxtNode->GetDoc()->CopyWithFlyInFly( aRg, 0, aEnd, TRUE );
- // Wenn die Dest-Sektion nicht leer war, so muessen die alten
- // Nodes geloescht werden:
- // Vorher: Src: SxxxE, Dst: SnE
- // Nachher: Src: SxxxE, Dst: SnxxxE
- // und Src: SxxxE, Dst: SxxxE
+ // in case the destination section was not empty, delete the old nodes
+ // before: Src: SxxxE, Dst: SnE
+ // now: Src: SxxxE, Dst: SnxxxE
+ // after: Src: SxxxE, Dst: SxxxE
aStart++;
rDstNodes.Delete( aStart, nDestLen );
}
- // Der benutzerdefinierte String muss auch uebertragen werden.
+ // also copy user defined number string
if( GetFtn().aNumber.Len() )
- ((SwFmtFtn&)pDest->GetFtn()).aNumber = GetFtn().aNumber;
+ {
+ const_cast<SwFmtFtn &>(rDest.GetFtn()).aNumber = GetFtn().aNumber;
+ }
}
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 40b04898ba..f88df01a6d 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -444,8 +444,6 @@ USHORT SwFntObj::GetFontLeading( const ViewShell *pSh, const OutputDevice& rOut
void SwFntObj::CreateScrFont( const ViewShell& rSh, const OutputDevice& rOut )
{
-static sal_Char __READONLY_DATA sStandardString[] = "Dies ist der Teststring";
-
if ( pScrFont )
return;
@@ -481,6 +479,10 @@ static sal_Char __READONLY_DATA sStandardString[] = "Dies ist der Teststring";
pScrFont = pPrtFont;
FontMetric aMet = pPrt->GetFontMetric( );
+ //Don't loose "faked" properties of the logical font that don't truly
+ //exist in the physical font metrics which vcl which fake up for us
+ aMet.SetWeight(pScrFont->GetWeight());
+ aMet.SetItalic(pScrFont->GetItalic());
bSymbol = RTL_TEXTENCODING_SYMBOL == aMet.GetCharSet();
@@ -490,178 +492,6 @@ static sal_Char __READONLY_DATA sStandardString[] = "Dies ist der Teststring";
if ( USHRT_MAX == nExtLeading )
nExtLeading = static_cast<USHORT>(aMet.GetExtLeading());
-#if OSL_DEBUG_LEVEL > 1
- const XubString aDbgTxt1( pPrtFont->GetName() );
- const XubString aDbgTxt2( aMet.GetName() );
-#endif
-
- if ( aMet.IsDeviceFont( ) )
- {
- if ( (RTL_TEXTENCODING_DONTKNOW == pPrtFont->GetCharSet() ||
- FAMILY_DONTKNOW == pPrtFont->GetFamily() ||
- PITCH_DONTKNOW == pPrtFont->GetPitch() ) &&
- (RTL_TEXTENCODING_DONTKNOW == aMet.GetCharSet() ||
- FAMILY_DONTKNOW == aMet.GetFamily() ||
- PITCH_DONTKNOW == aMet.GetPitch() ) )
- {
- // Das folgende ist teuer, aber selten: ein unbekannter Font
- // kann vom Drucker nicht vernuenftig zugeordnet werden. Dann
- // nehmen wir eben das Mapping des Bildschirms in Anspruch und
- // setzen den Familyname, Charset und Pitch wie dort. Dieser
- // Font wird nun nochmals auf dem Drucker eingestellt.
- Font aFnt1 = pOut->GetFontMetric();
- Font aFnt2( *pPrtFont );
-
- if (RTL_TEXTENCODING_DONTKNOW == pPrtFont->GetCharSet())
- aFnt2.SetCharSet( aFnt1.GetCharSet() );
- if (FAMILY_DONTKNOW == pPrtFont->GetFamily())
- aFnt2.SetFamily( aFnt1.GetFamily() );
- if (PITCH_DONTKNOW == pPrtFont->GetPitch())
- aFnt2.SetPitch( aFnt1.GetPitch() );
-
- pPrt->SetFont( aFnt2 );
- aMet = pPrt->GetFontMetric( );
- }
-
- const XubString aStandardStr( sStandardString,
- RTL_TEXTENCODING_MS_1252 );
-
- // This is the reference width
- const long nOWidth = pPrt->GetTextWidth( aStandardStr );
-
- // Let's have a look what's the difference to the width
- // calculated for the output device using the font set at the
- // reference device
- long nSWidth = nOWidth - pOut->GetTextWidth( aStandardStr );
- nScrHeight = (USHORT) pOut->GetTextHeight();
-
- // Um Aerger mit dem Generic Printer aus dem Wege zu gehen.
- if( aMet.GetSize().Height() )
- {
- BOOL bScrSymbol = FALSE;
- CharSet ePrtChSet = aMet.GetCharSet();
- // NoSymbol bedeutet, dass der Drucker sich fuer einen
- // Nicht-Symbol-Font entschieden hat.
- BOOL bNoSymbol = ( RTL_TEXTENCODING_DONTKNOW != ePrtChSet &&
- RTL_TEXTENCODING_SYMBOL != ePrtChSet );
- if ( bNoSymbol )
- bScrSymbol = RTL_TEXTENCODING_SYMBOL ==
- pOut->GetFontMetric().GetCharSet();
- Size aTmp( aMet.GetSize() );
-
- if( aTmp.Width() && !pPrtFont->GetSize().Width() )
- {
- aTmp.Width() = 0;
- aMet.SetSize( aTmp );
- }
-
- // Now we set the metrics used at the reference device at the
- // output device
- pOut->SetFont( aMet );
-
- if( bNoSymbol && ( bScrSymbol != ( RTL_TEXTENCODING_SYMBOL ==
- pOut->GetFontMetric().GetCharSet() ) ) )
- {
- // Hier landen wir, wenn der Drucker keinen Symbolfont waehlt,
- // aber genau einer der beiden Screenfonts ein Symbolfont ist.
- // Wir nehmen dann eben den anderen.
- if ( bScrSymbol )
- pScrFont = new Font( aMet ); // mit Abgleich
- else
- pOut->SetFont( *pPrtFont ); // ohne Abgleich
- }
- else
- {
- // Let's have a look what's the difference to the width
- // calculated for the output device using the metrics set at
- // the reference device
- long nPWidth = nOWidth - pOut->GetTextWidth( aStandardStr );
-
- // We prefer smaller fonts
- BYTE nNeg = 0;
- if ( nSWidth<0 ) { nSWidth *= -2; nNeg = 1; }
- if ( nPWidth<0 ) { nPWidth *= -2; nNeg |= 2; }
-
- // nSWidth = Difference between string width on reference device
- // and string width on output device with user font set.
- // nPWidth = Difference between string width on reference device
- // and string width on output device with metric obtained
- // from reference device.
- // We prefer to take the font with the smaller deviation,
- // exception: keep the original font unless the deviation
- // is really bad (at least 3%)
- // Since the test string is neither localized nor has a high resemblance
- // of the "real text for this font" a higher deviation is reasonable
-
- if ( (nSWidth <= nPWidth)
- || (nSWidth * 32 <= nOWidth ) )
- {
- // No adjustment, we take the same font for the output
- // device like for the reference device
- pOut->SetFont( *pPrtFont );
- pScrFont = pPrtFont;
- nPWidth = nSWidth;
- nNeg &= 1;
- }
- else
- {
- // The metrics give a better result. So we build
- // a new font for the output device based on the
- // metrics used at the reference device
- pScrFont = new Font( aMet ); // mit Abgleich
- nSWidth = nPWidth;
- nNeg &= 2;
- }
-
- //
- // now pScrFont is set to the better font and this should
- // be set at the output device
- //
-
- // we still have to check if the choosed font is not to wide
- if( nNeg && nOWidth )
- {
- nPWidth *= 100;
- nPWidth /= nOWidth;
-
- // if the screen font is too wide, we try to reduce
- // the font height and get a smaller one
- if( nPWidth > 25 )
- {
- if( nPWidth > 80 )
- nPWidth = 80;
- nPWidth = 100 - nPWidth/4;
- Size aTmpSize = pScrFont->GetSize();
- aTmpSize.Height() *= nPWidth;
- aTmpSize.Height() /= 100;
- if( aTmpSize.Width() )
- {
- aTmpSize.Width() *= nPWidth;
- aTmpSize.Width() /= 100;
- }
- Font *pNew = new Font( *pScrFont );
- pNew->SetSize( aTmpSize );
- pOut->SetFont( *pNew );
- nPWidth = nOWidth -
- pOut->GetTextWidth( aStandardStr );
- if( nPWidth < 0 ) { nPWidth *= -2; }
- if( nPWidth < nSWidth )
- {
- if( pScrFont != pPrtFont )
- delete pScrFont;
- pScrFont = pNew;
- }
- else
- {
- delete pNew;
- pOut->SetFont( *pScrFont );
- }
- }
- }
- }
- }
- }
-
// reset the original reference device font
pPrt->SetFont( aOldPrtFnt );
}
diff --git a/sw/source/core/txtnode/ndhints.cxx b/sw/source/core/txtnode/ndhints.cxx
index 321e32de7e..edde529613 100644
--- a/sw/source/core/txtnode/ndhints.cxx
+++ b/sw/source/core/txtnode/ndhints.cxx
@@ -367,7 +367,7 @@ bool SwpHintsArray::Check() const
CHECK_ERR( !isCHRATR(nWhich),
"HintsCheck: Character attribute in end array" );
- // 8) portion check
+ // 8) style portion check
#if OSL_DEBUG_LEVEL > 1
const SwTxtAttr* pHtThis = m_HintStarts[i];
const SwTxtAttr* pHtLast = i > 0 ? m_HintStarts[i-1] : 0;
@@ -375,11 +375,19 @@ bool SwpHintsArray::Check() const
( RES_TXTATR_CHARFMT != pHtLast->Which() && RES_TXTATR_AUTOFMT != pHtLast->Which() ) ||
( RES_TXTATR_CHARFMT != pHtThis->Which() && RES_TXTATR_AUTOFMT != pHtThis->Which() ) ||
( *pHtThis->GetStart() >= *pHtLast->GetEnd() ) ||
- ( *pHtThis->GetStart() == *pHtLast->GetStart() && *pHtThis->GetEnd() == *pHtLast->GetEnd() ) ||
- ( *pHtThis->GetStart() == *pHtThis->GetEnd() ),
+ ( ( ( (*pHtThis->GetStart() == *pHtLast->GetStart())
+ && (*pHtThis->GetEnd() == *pHtLast->GetEnd())
+ ) // same range
+ || (*pHtThis->GetStart() == *pHtThis->GetEnd())
+ )
+ && ( (pHtThis->Which() != RES_TXTATR_AUTOFMT)
+ || (pHtLast->Which() != RES_TXTATR_AUTOFMT)
+ ) // never two AUTOFMT on same range
+ ),
"HintsCheck: Portion inconsistency. "
"This can be temporarily ok during undo operations" );
+ // 9) nesting portion check
if (pHtThis->IsNesting())
{
for ( USHORT j = 0; j < Count(); ++j )
@@ -397,7 +405,7 @@ bool SwpHintsArray::Check() const
}
}
- // 9) dummy char check (unfortunately cannot check SwTxtNode::m_Text)
+ // 10) dummy char check (unfortunately cannot check SwTxtNode::m_Text)
if (pHtThis->HasDummyChar())
{
for ( USHORT j = 0; j < i; ++j )
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 7481a3ec79..4046cbc59f 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1196,60 +1196,109 @@ BOOL SwTxtNode::DontExpandFmt( const SwIndex& rIdx, bool bFlag,
return bRet;
}
+static bool lcl_GetTxtAttrDefault(xub_StrLen const nIndex,
+ xub_StrLen const nHintStart, xub_StrLen const nHintEnd)
+{
+ return ((nHintStart <= nIndex) && (nIndex < nHintEnd));
+}
+static bool lcl_GetTxtAttrExpand(xub_StrLen const nIndex,
+ xub_StrLen const nHintStart, xub_StrLen const nHintEnd)
+{
+ return ((nHintStart < nIndex) && (nIndex <= nHintEnd));
+}
+static bool lcl_GetTxtAttrParent(xub_StrLen const nIndex,
+ xub_StrLen const nHintStart, xub_StrLen const nHintEnd)
+{
+ return ((nHintStart < nIndex) && (nIndex < nHintEnd));
+}
-// gebe das vorgegebene Attribut, welches an der TextPosition (rIdx)
-// gesetzt ist, zurueck. Gibt es keines, returne 0-Pointer.
-// (gesetzt heisst, je nach bExpand ?
-// Start < rIdx <= End
-// : Start <= rIdx < End )
-
-SwTxtAttr* SwTxtNode::GetTxtAttr( const SwIndex& rIdx, USHORT nWhichHt,
- BOOL bExpand ) const
+static void
+lcl_GetTxtAttrs(
+ ::std::vector<SwTxtAttr *> *const pVector, SwTxtAttr **const ppTxtAttr,
+ SwpHints *const pSwpHints,
+ xub_StrLen const nIndex, RES_TXTATR const nWhich,
+ enum SwTxtNode::GetTxtAttrMode const eMode)
{
- const SwTxtAttr* pRet = 0;
- const SwTxtAttr* pHt = 0;
- const xub_StrLen *pEndIdx = 0;
- const xub_StrLen nIdx = rIdx.GetIndex();
- const USHORT nSize = m_pSwpHints ? m_pSwpHints->Count() : 0;
+ USHORT const nSize = (pSwpHints) ? pSwpHints->Count() : 0;
+ xub_StrLen nPreviousIndex(0); // index of last hint with nWhich
+ bool (*pMatchFunc)(xub_StrLen const, xub_StrLen const, xub_StrLen const)=0;
+ switch (eMode)
+ {
+ case SwTxtNode::DEFAULT: pMatchFunc = &lcl_GetTxtAttrDefault; break;
+ case SwTxtNode::EXPAND: pMatchFunc = &lcl_GetTxtAttrExpand; break;
+ case SwTxtNode::PARENT: pMatchFunc = &lcl_GetTxtAttrParent; break;
+ default: OSL_ASSERT(false);
+ }
for( USHORT i = 0; i < nSize; ++i )
{
- // ist der Attribut-Anfang schon groesser als der Idx ?
- pHt = (*m_pSwpHints)[i];
- if ( nIdx < *(pHt->GetStart()) )
- break; // beenden, kein gueltiges Attribut
-
- // ist es das gewuenschte Attribut ?
- if( pHt->Which() != nWhichHt )
- continue; // nein, weiter
-
- pEndIdx = pHt->GetEnd();
- // liegt innerhalb des Bereiches ??
- if( !pEndIdx )
+ SwTxtAttr *const pHint = pSwpHints->GetTextHint(i);
+ xub_StrLen const nHintStart( *(pHint->GetStart()) );
+ if (nIndex < nHintStart)
{
- if( *pHt->GetStart() == nIdx )
- {
- pRet = pHt;
- break;
- }
+ return; // hints are sorted by start, so we are done...
}
- else if( *pHt->GetStart() <= nIdx && nIdx <= *pEndIdx )
+
+ if (pHint->Which() != nWhich)
{
+ continue;
+ }
+
+ xub_StrLen const*const pEndIdx = pHint->GetEnd();
+ ASSERT(pEndIdx || pHint->HasDummyChar(),
+ "hint with no end and no dummy char?");
// Wenn bExpand gesetzt ist, wird das Verhalten bei Eingabe
// simuliert, d.h. der Start wuede verschoben, das Ende expandiert,
- if( bExpand )
+ bool const bContained( (pEndIdx)
+ ? (*pMatchFunc)(nIndex, nHintStart, *pEndIdx)
+ : (nHintStart == nIndex) );
+ if (bContained)
+ {
+ if (pVector)
{
- if( *pHt->GetStart() < nIdx )
- pRet = pHt;
+ if (nPreviousIndex < nHintStart)
+ {
+ pVector->clear(); // clear hints that are outside pHint
+ nPreviousIndex = nHintStart;
+ }
+ pVector->push_back(pHint);
}
else
{
- if( nIdx < *pEndIdx )
- pRet = pHt; // den am dichtesten liegenden
+ *ppTxtAttr = pHint; // and possibly overwrite outer hint
+ }
+ if (!pEndIdx)
+ {
+ break;
}
}
}
- return (SwTxtAttr*)pRet; // kein gueltiges Attribut gefunden !!
+}
+
+::std::vector<SwTxtAttr *>
+SwTxtNode::GetTxtAttrsAt(xub_StrLen const nIndex, RES_TXTATR const nWhich,
+ enum GetTxtAttrMode const eMode) const
+{
+ ::std::vector<SwTxtAttr *> ret;
+ lcl_GetTxtAttrs(& ret, 0, m_pSwpHints, nIndex, nWhich, eMode);
+ return ret;
+}
+
+SwTxtAttr *
+SwTxtNode::GetTxtAttrAt(xub_StrLen const nIndex, RES_TXTATR const nWhich,
+ enum GetTxtAttrMode const eMode) const
+{
+ ASSERT( (nWhich == RES_TXTATR_META)
+ || (nWhich == RES_TXTATR_METAFIELD)
+ || (nWhich == RES_TXTATR_AUTOFMT)
+ || (nWhich == RES_TXTATR_INETFMT)
+ || (nWhich == RES_TXTATR_CJK_RUBY)
+ || (nWhich == RES_TXTATR_UNKNOWN_CONTAINER),
+ "GetTxtAttrAt() will give wrong result for this hint!");
+
+ SwTxtAttr * pRet(0);
+ lcl_GetTxtAttrs(0, & pRet, m_pSwpHints, nIndex, nWhich, eMode);
+ return pRet;
}
/*************************************************************************
@@ -1278,11 +1327,11 @@ void lcl_CopyHint( const USHORT nWhich, const SwTxtAttr * const pHt,
ASSERT( nWhich == pHt->Which(), "Falsche Hint-Id" );
switch( nWhich )
{
- // Wenn wir es mit einem Fussnoten-Attribut zu tun haben,
- // muessen wir natuerlich auch den Fussnotenbereich kopieren.
+ // copy nodesarray section with footnote content
case RES_TXTATR_FTN :
+ ASSERT(pDest, "lcl_CopyHint: no destination text node?");
static_cast<const SwTxtFtn*>(pHt)->CopyFtn(
- static_cast<SwTxtFtn*>(pNewHt));
+ *static_cast<SwTxtFtn*>(pNewHt), *pDest);
break;
// Beim Kopieren von Feldern in andere Dokumente
@@ -1486,6 +1535,13 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
xub_StrLen nTxtStartIdx = rStart.GetIndex();
xub_StrLen nDestStart = rDestStart.GetIndex(); // alte Pos merken
+ if (pDest->GetDoc()->IsClipBoard() && this->GetNum())
+ {
+ // #i111677# cache expansion of source (for clipboard)
+ pDest->m_pNumStringCache.reset(
+ new ::rtl::OUString(this->GetNumString()));
+ }
+
if( !nLen )
{
// wurde keine Laenge angegeben, dann Kopiere die Attribute
@@ -1588,6 +1644,7 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
// Del-Array fuer alle RefMarks ohne Ausdehnung
SwpHts aRefMrkArr;
+ USHORT nDeletedDummyChars(0);
//Achtung: kann ungueltig sein!!
for (USHORT n = 0; ( n < nSize ); ++n)
{
@@ -1659,31 +1716,24 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
pNewHt = MakeTxtAttr( *GetDoc(), pHt->GetAttr(),
nAttrStt, nAttrEnd );
-//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-//JP 23.04.95: erstmal so gesondert hier behandeln. Am Besten ist es
-// aber im CopyFtn wenn die pDestFtn keinen StartNode hat,
-// sich diesen dann anlegt.
-// Aber so kurz vor der BETA besser nicht anfassen.
- if( RES_TXTATR_FTN == nWhich )
- {
- SwTxtFtn* pFtn = (SwTxtFtn*)pNewHt;
- pFtn->ChgTxtNode( this );
- pFtn->MakeNewTextSection( GetNodes() );
- lcl_CopyHint( nWhich, pHt, pFtn, 0, 0 );
- pFtn->ChgTxtNode( 0 );
- }
- else
-//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- {
- lcl_CopyHint( nWhich, pHt, pNewHt, 0, pDest );
- }
+ lcl_CopyHint(nWhich, pHt, pNewHt, 0, pDest);
aArr.C40_INSERT( SwTxtAttr, pNewHt, aArr.Count() );
}
else
{
- pNewHt = pDest->InsertItem( pHt->GetAttr(), nAttrStt,
- nAttrEnd, nsSetAttrMode::SETATTR_NOTXTATRCHR );
- lcl_CopyHint( nWhich, pHt, pNewHt, pOtherDoc, pDest );
+ pNewHt = pDest->InsertItem( pHt->GetAttr(), nAttrStt - nDeletedDummyChars,
+ nAttrEnd - nDeletedDummyChars, nsSetAttrMode::SETATTR_NOTXTATRCHR );
+ if (pNewHt)
+ {
+ lcl_CopyHint( nWhich, pHt, pNewHt, pOtherDoc, pDest );
+ }
+ else if (pHt->HasDummyChar())
+ {
+ // The attribute that has failed to be copied would insert
+ // dummy char, so positions of the following attributes have
+ // to be shifted by one to compensate for that missing char.
+ ++nDeletedDummyChars;
+ }
}
if( RES_TXTATR_REFMARK == nWhich && !pEndIdx && !bCopyRefMark )
@@ -2777,6 +2827,11 @@ BOOL SwTxtNode::HasBullet() const
//i53420 added max outline parameter
XubString SwTxtNode::GetNumString( const bool _bInclPrefixAndSuffixStrings, const unsigned int _nRestrictToThisLevel ) const
{
+ if (GetDoc()->IsClipBoard() && m_pNumStringCache.get())
+ {
+ // #i111677# do not expand number strings in clipboard documents
+ return *m_pNumStringCache;
+ }
const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
if ( pRule &&
IsCountedInList() &&
@@ -3000,8 +3055,10 @@ void SwTxtNode::Replace0xFF( XubString& rTxt, xub_StrLen& rTxtStt,
rTxt.Erase( nPos, 1 );
if( bExpandFlds )
{
- const XubString aExpand( ((SwTxtFld*)pAttr)->GetFld().
- GetFld()->Expand() );
+ const XubString aExpand(
+ static_cast<SwTxtFld const*>(pAttr)->GetFld()
+ .GetFld()->ExpandField(
+ GetDoc()->IsClipBoard()));
rTxt.Insert( aExpand, nPos );
nPos = nPos + aExpand.Len();
nEndPos = nEndPos + aExpand.Len();
@@ -3148,7 +3205,9 @@ BOOL SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx,
{
case RES_TXTATR_FIELD:
{
- const XubString aExpand( ((SwTxtFld*)pHt)->GetFld().GetFld()->Expand() );
+ XubString const aExpand(
+ static_cast<SwTxtFld const*>(pHt)->GetFld().GetFld()
+ ->ExpandField(GetDoc()->IsClipBoard()));
if( aExpand.Len() )
{
aDestIdx++; // dahinter einfuegen;
@@ -3244,7 +3303,9 @@ const ModelToViewHelper::ConversionMap*
const SwTxtAttr* pAttr = (*pSwpHints2)[i];
if ( RES_TXTATR_FIELD == pAttr->Which() )
{
- const XubString aExpand( ((SwTxtFld*)pAttr)->GetFld().GetFld()->Expand() );
+ const XubString aExpand(
+ static_cast<SwTxtFld const*>(pAttr)->GetFld().GetFld()
+ ->ExpandField(GetDoc()->IsClipBoard()));
if ( aExpand.Len() > 0 )
{
const xub_StrLen nFieldPos = *pAttr->GetStart();
@@ -4386,6 +4447,10 @@ namespace {
if ( pNumRuleItem.GetValue().Len() > 0 )
{
mbAddTxtNodeToList = true;
+ // --> OD 2010-05-12 #i105562#
+ //
+ mrTxtNode.ResetEmptyListStyleDueToResetOutlineLevelAttr();
+ // <--
}
}
break;
@@ -4397,10 +4462,6 @@ namespace {
dynamic_cast<const SfxStringItem&>(pItem);
ASSERT( pListIdItem.GetValue().Len() > 0,
"<HandleSetAttrAtTxtNode(..)> - empty list id attribute not excepted. Serious defect -> please inform OD." );
-// const SfxStringItem& rListIdItemOfTxtNode =
-// dynamic_cast<const SfxStringItem&>(
-// rTxtNode.GetAttr( RES_PARATR_LIST_ID ));
-// if ( pListIdItem.GetValue() != rListIdItemOfTxtNode.GetValue() )
const String sListIdOfTxtNode = rTxtNode.GetListId();
if ( pListIdItem.GetValue() != sListIdOfTxtNode )
{
@@ -4514,11 +4575,6 @@ namespace {
{
const SfxStringItem* pListIdItem =
dynamic_cast<const SfxStringItem*>(pItem);
-// const SfxStringItem& rListIdItemOfTxtNode =
-// dynamic_cast<const SfxStringItem&>(
-// mrTxtNode.GetAttr( RES_PARATR_LIST_ID ));
-// if ( pListIdItem &&
-// pListIdItem->GetValue() != rListIdItemOfTxtNode.GetValue() )
const String sListIdOfTxtNode = mrTxtNode.GetListId();
if ( pListIdItem &&
pListIdItem->GetValue() != sListIdOfTxtNode )
@@ -4923,7 +4979,9 @@ namespace {
mrTxtNode.AddToList();
}
// --> OD 2008-11-19 #i70748#
- else if ( dynamic_cast<const SfxUInt16Item &>(mrTxtNode.GetAttr( RES_PARATR_OUTLINELEVEL, FALSE )).GetValue() > 0 )
+ // --> OD 2010-05-12 #i105562#
+ else if ( mrTxtNode.GetpSwAttrSet() &&
+ dynamic_cast<const SfxUInt16Item &>(mrTxtNode.GetAttr( RES_PARATR_OUTLINELEVEL, FALSE )).GetValue() > 0 )
{
mrTxtNode.SetEmptyListStyleDueToSetOutlineLevelAttr();
}
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index d5fbf01160..b86595b102 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -773,7 +773,8 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
// For each attribute in the automatic style check if it
// is also set the the new character style:
- SfxItemSet aNewSet( *pOldStyle->GetPool(), RES_CHRATR_BEGIN, RES_CHRATR_END );
+ SfxItemSet aNewSet( *pOldStyle->GetPool(),
+ aCharAutoFmtSetRange);
SfxItemIter aItemIter( *pOldStyle );
const SfxPoolItem* pItem = aItemIter.GetCurItem();
while( TRUE )
@@ -1042,7 +1043,8 @@ SwTxtAttr* MakeTxtAttr( SwDoc & rDoc, SfxPoolItem& rAttr,
pNew = new SwTxtINetFmt( (SwFmtINetFmt&)rNew, nStt, nEnd );
break;
case RES_TXTATR_FIELD:
- pNew = new SwTxtFld( (SwFmtFld&)rNew, nStt );
+ pNew = new SwTxtFld( static_cast<SwFmtFld &>(rNew), nStt,
+ rDoc.IsClipBoard() );
break;
case RES_TXTATR_FLYCNT:
{
@@ -2059,25 +2061,202 @@ BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
return rSet.Count() ? TRUE : FALSE;
}
-int lcl_IsNewAttrInSet( const SwpHints& rHints, const SfxPoolItem& rItem,
- const xub_StrLen nEnd )
+
+namespace
+{
+
+typedef std::pair<USHORT, USHORT> AttrSpan_t;
+typedef std::multimap<AttrSpan_t, const SwTxtAttr*> AttrSpanMap_t;
+
+
+struct IsAutoStyle
{
- int bIns = TRUE;
- for( USHORT i = 0; i < rHints.Count(); ++i )
+ bool
+ operator()(const AttrSpanMap_t::value_type& i_rAttrSpan)
+ const
{
- const SwTxtAttr *pOther = rHints[ i ];
- if( *pOther->GetStart() )
- break;
+ return i_rAttrSpan.second && i_rAttrSpan.second->Which() == RES_TXTATR_AUTOFMT;
+ }
+};
+
+
+/** Removes from io_rAttrSet all items that are set by style on the
+ given span.
+ */
+struct RemovePresentAttrs
+{
+ RemovePresentAttrs(SfxItemSet& io_rAttrSet)
+ : m_rAttrSet(io_rAttrSet)
+ {
+ }
+
+ void
+ operator()(const AttrSpanMap_t::value_type& i_rAttrSpan)
+ const
+ {
+ if (!i_rAttrSpan.second)
+ {
+ return;
+ }
- if( pOther->GetEnd() &&
- *pOther->GetEnd() == nEnd &&
- ( pOther->IsCharFmtAttr() || pOther->Which() == rItem.Which() ) )
+ const SwTxtAttr* const pAutoStyle(i_rAttrSpan.second);
+ SfxItemIter aIter(m_rAttrSet);
+ const SfxPoolItem* pItem(aIter.GetCurItem());
+ while (true)
+ {
+ const USHORT nWhich(pItem->Which());
+ if (CharFmt::IsItemIncluded(nWhich, pAutoStyle))
+ {
+ m_rAttrSet.ClearItem(nWhich);
+ }
+
+ if (aIter.IsAtEnd())
+ {
+ break;
+ }
+ pItem = aIter.NextItem();
+ }
+ }
+
+private:
+ SfxItemSet& m_rAttrSet;
+};
+
+
+/** Collects all style-covered spans from i_rHints to o_rSpanMap. In
+ addition inserts dummy spans with pointer to format equal to 0 for
+ all gaps (i.e. spans not covered by any style). This simplifies
+ creation of autostyles for all needed spans, but it means all code
+ that tries to access the pointer has to check if it's non-null!
+ */
+void
+lcl_CollectHintSpans(const SwpHints& i_rHints, const USHORT nLength,
+ AttrSpanMap_t& o_rSpanMap)
+{
+ USHORT nLastEnd(0);
+
+ for (USHORT i(0); i != i_rHints.Count(); ++i)
+ {
+ const SwTxtAttr* const pHint(i_rHints[i]);
+ const USHORT nWhich(pHint->Which());
+ if (nWhich == RES_TXTATR_CHARFMT || nWhich == RES_TXTATR_AUTOFMT)
+ {
+ const AttrSpan_t aSpan(*pHint->GetStart(), *pHint->GetEnd());
+ o_rSpanMap.insert(AttrSpanMap_t::value_type(aSpan, pHint));
+
+ if (aSpan.first != nLastEnd)
+ {
+ // insert dummy span covering the gap
+ o_rSpanMap.insert(AttrSpanMap_t::value_type(
+ AttrSpan_t(nLastEnd, aSpan.first), 0));
+ }
+
+ nLastEnd = aSpan.second;
+ }
+ }
+
+ // no hints at the end (special case: no hints at all in i_rHints)
+ if (nLastEnd != nLength && nLength != 0)
+ {
+ o_rSpanMap.insert(
+ AttrSpanMap_t::value_type(AttrSpan_t(nLastEnd, nLength), 0));
+ }
+}
+
+
+void
+lcl_FillWhichIds(const SfxItemSet& i_rAttrSet, std::vector<USHORT>& o_rClearIds)
+{
+ o_rClearIds.reserve(i_rAttrSet.Count());
+ SfxItemIter aIter(i_rAttrSet);
+ const SfxPoolItem* pItem(aIter.GetCurItem());
+ while (true)
+ {
+ o_rClearIds.push_back(pItem->Which());
+
+ if (aIter.IsAtEnd())
{
- bIns = FALSE;
break;
}
+ pItem = aIter.NextItem();
+ }
+}
+
+struct SfxItemSetClearer
+{
+ SfxItemSet & m_rItemSet;
+ SfxItemSetClearer(SfxItemSet & rItemSet) : m_rItemSet(rItemSet) { }
+ void operator()(USHORT const nWhich) { m_rItemSet.ClearItem(nWhich); }
+};
+
+}
+
+
+/** Does the hard work of SwTxtNode::FmtToTxtAttr: the real conversion
+ of items to automatic styles.
+ */
+void
+SwTxtNode::impl_FmtToTxtAttr(const SfxItemSet& i_rAttrSet)
+{
+ typedef AttrSpanMap_t::iterator AttrSpanMap_iterator_t;
+ AttrSpanMap_t aAttrSpanMap;
+
+ if (i_rAttrSet.Count() == 0)
+ {
+ return;
+ }
+
+ // 1. Identify all spans in hints' array
+
+ lcl_CollectHintSpans(*m_pSwpHints, m_Text.Len(), aAttrSpanMap);
+
+ // 2. Go through all spans and insert new attrs
+
+ AttrSpanMap_iterator_t aCurRange(aAttrSpanMap.begin());
+ const AttrSpanMap_iterator_t aEnd(aAttrSpanMap.end());
+ while (aCurRange != aEnd)
+ {
+ typedef std::pair<AttrSpanMap_iterator_t, AttrSpanMap_iterator_t>
+ AttrSpanMapRange_t;
+ AttrSpanMapRange_t aRange(aAttrSpanMap.equal_range(aCurRange->first));
+
+ // 2a. Collect attributes to insert
+
+ SfxItemSet aCurSet(i_rAttrSet);
+ std::for_each(aRange.first, aRange.second, RemovePresentAttrs(aCurSet));
+
+ // 2b. Insert automatic style containing the collected attributes
+
+ if (aCurSet.Count() != 0)
+ {
+ AttrSpanMap_iterator_t aAutoStyleIt(
+ std::find_if(aRange.first, aRange.second, IsAutoStyle()));
+ if (aAutoStyleIt != aRange.second)
+ {
+ // there already is an automatic style on that span:
+ // create new one and remove the original one
+ SwTxtAttr* const pAutoStyle(const_cast<SwTxtAttr*>(aAutoStyleIt->second));
+ const boost::shared_ptr<SfxItemSet> pOldStyle(
+ static_cast<const SwFmtAutoFmt&>(
+ pAutoStyle->GetAttr()).GetStyleHandle());
+ aCurSet.Put(*pOldStyle);
+
+ // remove the old hint
+ m_pSwpHints->Delete(pAutoStyle);
+ DestroyAttr(pAutoStyle);
+ }
+ m_pSwpHints->Insert(
+ MakeTxtAttr(*GetDoc(), aCurSet,
+ aCurRange->first.first, aCurRange->first.second));
+ }
+
+ aCurRange = aRange.second;
}
- return bIns;
+
+ // 3. Clear items from the node
+ std::vector<USHORT> aClearedIds;
+ lcl_FillWhichIds(i_rAttrSet, aClearedIds);
+ ClearItemsFromAttrSet(aClearedIds);
}
void SwTxtNode::FmtToTxtAttr( SwTxtNode* pNd )
@@ -2090,91 +2269,79 @@ void SwTxtNode::FmtToTxtAttr( SwTxtNode* pNd )
if( pNd == this )
{
- if( aThisSet.Count() )
- {
- SfxItemIter aIter( aThisSet );
- const SfxPoolItem* pItem = aIter.GetCurItem();
- std::vector<USHORT> aClearWhichIds;
-
- while ( true )
- {
- if (lcl_IsNewAttrInSet( *m_pSwpHints, *pItem, GetTxt().Len() ))
- {
- m_pSwpHints->SwpHintsArray::Insert(
- MakeTxtAttr( *GetDoc(),
- const_cast<SfxPoolItem&>(*pItem),
- 0, GetTxt().Len() ) );
- aClearWhichIds.push_back( pItem->Which() );
- }
-
- if( aIter.IsAtEnd() )
- break;
- pItem = aIter.NextItem();
- }
-
- ClearItemsFromAttrSet( aClearWhichIds );
- }
+ impl_FmtToTxtAttr(aThisSet);
}
else
{
+ // There are five possible combinations of items from this and
+ // pNd (pNd is the 'main' node):
+ //
+ // case pNd this action
+ // ----------------------------------------------------
+ // 1 - - do nothing
+ // 2 - a convert item to attr of this
+ // 3 a - convert item to attr of pNd
+ // 4 a a clear item in this
+ // 5 a b convert item to attr of this
+
SfxItemSet aNdSet( pNd->GetDoc()->GetAttrPool(), aCharFmtSetRange );
if( pNd->HasSwAttrSet() && pNd->GetpSwAttrSet()->Count() )
aNdSet.Put( *pNd->GetpSwAttrSet() );
pNd->GetOrCreateSwpHints();
+ std::vector<USHORT> aProcessedIds;
+
if( aThisSet.Count() )
{
SfxItemIter aIter( aThisSet );
- const SfxPoolItem* pItem = aIter.GetCurItem(), *pNdItem;
+ const SfxPoolItem* pItem = aIter.GetCurItem(), *pNdItem = 0;
+ SfxItemSet aConvertSet( GetDoc()->GetAttrPool(), aCharFmtSetRange );
std::vector<USHORT> aClearWhichIds;
- while( TRUE )
+ while( true )
{
- if( ( SFX_ITEM_SET != aNdSet.GetItemState( pItem->Which(), FALSE,
- &pNdItem ) || *pItem != *pNdItem ) &&
- lcl_IsNewAttrInSet( *m_pSwpHints, *pItem, GetTxt().Len() ) )
+ if( SFX_ITEM_SET == aNdSet.GetItemState( pItem->Which(), FALSE, &pNdItem ) )
{
- m_pSwpHints->SwpHintsArray::Insert( MakeTxtAttr( *GetDoc(),
- const_cast<SfxPoolItem&>(*pItem),
- 0, GetTxt().Len() ) );
- aClearWhichIds.push_back( pItem->Which() );
+ if (*pItem == *pNdItem) // 4
+ {
+ aClearWhichIds.push_back( pItem->Which() );
+ }
+ else // 5
+ {
+ aConvertSet.Put(*pItem);
+ }
+ aProcessedIds.push_back(pItem->Which());
+ }
+ else // 2
+ {
+ aConvertSet.Put(*pItem);
}
- aNdSet.ClearItem( pItem->Which() );
if( aIter.IsAtEnd() )
break;
pItem = aIter.NextItem();
}
+
+ // 4/ clear items of this that are set with the same value on pNd
ClearItemsFromAttrSet( aClearWhichIds );
+
+ // 2, 5/ convert all other items to attrs
+ impl_FmtToTxtAttr(aConvertSet);
}
- if( aNdSet.Count() )
{
- SfxItemIter aIter( aNdSet );
- const SfxPoolItem* pItem = aIter.GetCurItem();
- std::vector<USHORT> aClearWhichIds;
+ std::for_each(aProcessedIds.begin(), aProcessedIds.end(),
+ SfxItemSetClearer(aNdSet));
- while ( true )
- {
- if ( lcl_IsNewAttrInSet( *pNd->m_pSwpHints, *pItem,
- pNd->GetTxt().Len() ) )
- {
- pNd->m_pSwpHints->SwpHintsArray::Insert(
- MakeTxtAttr( *pNd->GetDoc(),
- const_cast<SfxPoolItem&>(*pItem),
- 0, pNd->GetTxt().Len() ) );
- }
- aClearWhichIds.push_back( pItem->Which() );
+ // 3/ convert items to attrs
+ pNd->impl_FmtToTxtAttr(aNdSet);
- if( aIter.IsAtEnd() )
- break;
- pItem = aIter.NextItem();
+ if( aNdSet.Count() )
+ {
+ SwFmtChg aTmp1( pNd->GetFmtColl() );
+ pNd->SwModify::Modify( &aTmp1, &aTmp1 );
}
-
- pNd->ClearItemsFromAttrSet( aClearWhichIds );
- SwFmtChg aTmp1( pNd->GetFmtColl() );
- pNd->SwModify::Modify( &aTmp1, &aTmp1 );
}
}
diff --git a/sw/source/core/undo/SwUndoField.cxx b/sw/source/core/undo/SwUndoField.cxx
index ccc1f4d211..9d9c74b1e5 100644
--- a/sw/source/core/undo/SwUndoField.cxx
+++ b/sw/source/core/undo/SwUndoField.cxx
@@ -63,12 +63,14 @@ SwPosition SwUndoField::GetPosition()
}
SwUndoFieldFromDoc::SwUndoFieldFromDoc(const SwPosition & rPos,
- const SwField & _aOldField,
- const SwField & _aNewField,
+ const SwField & rOldField,
+ const SwField & rNewField,
SwMsgPoolItem * _pHnt, BOOL _bUpdate, SwUndoId _nId)
- : SwUndoField(rPos,_nId), pOldField(_aOldField.Copy()),
- pNewField(_aNewField.Copy()), pHnt(_pHnt),
- bUpdate(_bUpdate)
+ : SwUndoField(rPos,_nId)
+ , pOldField(rOldField.CopyField())
+ , pNewField(rNewField.CopyField())
+ , pHnt(_pHnt)
+ , bUpdate(_bUpdate)
{
ASSERT(pOldField, "No old field!");
ASSERT(pNewField, "No new field!");
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index 0f56140366..9526112d0e 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -614,9 +614,8 @@ SwHistoryBookmark::SwHistoryBookmark(
m_aKeycode = pBookmark->GetKeyCode();
m_aShortName = pBookmark->GetShortName();
- ::sfx2::Metadatable * const pMetadatable(
- const_cast< ::sfx2::Metadatable * >( // CreateUndo should be const?
- dynamic_cast< ::sfx2::Metadatable const* >(pBookmark)));
+ ::sfx2::Metadatable const*const pMetadatable(
+ dynamic_cast< ::sfx2::Metadatable const* >(pBookmark));
if (pMetadatable)
{
m_pMetadataUndo = pMetadatable->CreateUndo();
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index d24b364f67..429f9453a3 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -1055,8 +1055,8 @@ void SwUndoAttr::RemoveIdx( SwDoc& rDoc )
SwTxtNode* pTxtNd = rNds[ nNode ]->GetTxtNode();
if( pTxtNd )
{
- SwIndex aIdx( pTxtNd, nCntnt );
- SwTxtAttr * pTxtHt = pTxtNd->GetTxtAttr( aIdx, RES_TXTATR_FTN );
+ SwTxtAttr *const pTxtHt =
+ pTxtNd->GetTxtAttrForCharAt(nCntnt, RES_TXTATR_FTN);
if( pTxtHt )
{
// ok, dann hole mal die Werte
diff --git a/sw/source/core/undo/unbkmk.cxx b/sw/source/core/undo/unbkmk.cxx
index 1240b3e8de..3826f18168 100644
--- a/sw/source/core/undo/unbkmk.cxx
+++ b/sw/source/core/undo/unbkmk.cxx
@@ -88,23 +88,6 @@ SwRewriter SwUndoBookmark::GetRewriter() const
//----------------------------------------------------------------------
-SwUndoDelBookmark::SwUndoDelBookmark( const ::sw::mark::IMark& rBkmk )
- : SwUndoBookmark( UNDO_DELBOOKMARK, rBkmk )
-{
-}
-
-
-void SwUndoDelBookmark::Undo( SwUndoIter& rUndoIter )
-{
- SetInDoc( &rUndoIter.GetDoc() );
-}
-
-
-void SwUndoDelBookmark::Redo( SwUndoIter& rUndoIter )
-{
- ResetInDoc( &rUndoIter.GetDoc() );
-}
-
SwUndoInsBookmark::SwUndoInsBookmark( const ::sw::mark::IMark& rBkmk )
: SwUndoBookmark( UNDO_INSBOOKMARK, rBkmk )
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index 74c2c0854a..edf6f99775 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -391,7 +391,9 @@ BOOL SwUndoDelete::SaveCntnt( const SwPosition* pStt, const SwPosition* pEnd,
bool emptied( pSttStr->Len() && !pSttTxtNd->Len() );
if (!bOneNode || emptied) // merging may overwrite xmlids...
{
- m_pMetadataUndoStart = pSttTxtNd->CreateUndo( emptied );
+ m_pMetadataUndoStart = (emptied)
+ ? pSttTxtNd->CreateUndoForDelete()
+ : pSttTxtNd->CreateUndo();
}
if( bOneNode )
@@ -425,7 +427,10 @@ BOOL SwUndoDelete::SaveCntnt( const SwPosition* pStt, const SwPosition* pEnd,
// METADATA: store
bool emptied( pEndStr->Len() && !pEndTxtNd->Len() );
- m_pMetadataUndoEnd = pEndTxtNd->CreateUndo( emptied );
+
+ m_pMetadataUndoEnd = (emptied)
+ ? pEndTxtNd->CreateUndoForDelete()
+ : pEndTxtNd->CreateUndo();
}
// sind es nur zwei Nodes, dann ist schon alles erledigt.
@@ -863,7 +868,15 @@ void SwUndoDelete::Redo( SwUndoIter& rUndoIter )
SetPaM( rPam );
if( pRedlSaveData )
- rDoc.DeleteRedline( rPam, false, USHRT_MAX );
+ {
+ bool bSuccess = FillSaveData(rPam, *pRedlSaveData, TRUE);
+ OSL_ENSURE(bSuccess,
+ "SwUndoDelete::Redo: used to have redline data, but now none?");
+ if (!bSuccess)
+ {
+ delete pRedlSaveData, pRedlSaveData = 0;
+ }
+ }
if( !bDelFullPara )
{
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 0a16b89699..02156626ab 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -1120,7 +1120,12 @@ void SwRedlineSaveData::RedlineToDoc( SwPaM& rPam )
if (rDoc.GetDocShell() && (pRedl->GetComment() != String(::rtl::OUString::createFromAscii(""))) )
rDoc.GetDocShell()->Broadcast(SwRedlineHint(pRedl,SWREDLINE_INSERTED));
//
- rDoc.AppendRedline( pRedl, true );
+#if OSL_DEBUG_LEVEL > 0
+ bool const bSuccess =
+#endif
+ rDoc.AppendRedline( pRedl, true );
+ OSL_ENSURE(bSuccess,
+ "SwRedlineSaveData::RedlineToDoc: insert redline failed");
rDoc.SetRedlineMode_intern( eOld );
}
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index 14f2cdb9ff..164cf20ea9 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -164,21 +164,6 @@ SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd )
// werden kann. Wenn ja, dann aender die Laenge und die InsPos.
// Dann wird von SwDoc::Insert kein neues Object in die Undoliste gestellt.
-BOOL SwUndoInsert::CanGrouping( const SwPosition& rInsPos, sal_Unicode cIns )
-{
- BOOL bRet = FALSE;
- if( !bIsAppend )
- {
- ++nCntnt;
- bRet = CanGrouping( rInsPos );
- --nCntnt;
- if( bRet )
- bRet = CanGrouping( cIns );
- }
- return bRet;
-}
-
-
BOOL SwUndoInsert::CanGrouping( sal_Unicode cIns )
{
if( !bIsAppend && bIsWordDelim ==
diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx
index 164e3abe5c..d786c6eca2 100644
--- a/sw/source/core/undo/unmove.cxx
+++ b/sw/source/core/undo/unmove.cxx
@@ -354,13 +354,3 @@ void SwUndoMove::DelFtn( const SwPaM& rRange )
}
}
-void SwUndoMove::AddTblMrgFlyHstry( SwHistory& rHstr )
-{
- if( !pHistory )
- pHistory = new SwHistory;
-
- USHORT nInsPos = nFtnStt;
- nFtnStt = nFtnStt + rHstr.Count();
- pHistory->Move( nInsPos, &rHstr );
-}
-
diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx
index f43180178e..5311f8ca8c 100644
--- a/sw/source/core/undo/unsect.cxx
+++ b/sw/source/core/undo/unsect.cxx
@@ -74,34 +74,31 @@ SfxItemSet* lcl_GetAttrSet( const SwSection& rSect )
return pAttr;
}
-SwUndoInsSection::SwUndoInsSection( const SwPaM& rPam, const SwSection& rNew,
- const SfxItemSet* pSet )
- : SwUndo( UNDO_INSSECTION ), SwUndRng( rPam ),
- pHistory( 0 ), pRedlData( 0 ), pAttr( 0 ), nSectNodePos( 0 )
-{
- if( rNew.ISA( SwTOXBaseSection ))
- {
- const SwTOXBase& rBase = (SwTOXBaseSection&)rNew;
- pSection = new SwTOXBaseSection( rBase );
- }
- else
- pSection = new SwSection( rNew.GetType(), rNew.GetName() );
- *pSection = rNew;
+////////////////////////////////////////////////////////////////////////////
+
+SwUndoInsSection::SwUndoInsSection(
+ SwPaM const& rPam, SwSectionData const& rNewData,
+ SfxItemSet const*const pSet, SwTOXBase const*const pTOXBase)
+ : SwUndo( UNDO_INSSECTION ), SwUndRng( rPam )
+ , m_pSectionData(new SwSectionData(rNewData))
+ , m_pTOXBase( (pTOXBase) ? new SwTOXBase(*pTOXBase) : 0 )
+ , m_pAttrSet( (pSet && pSet->Count()) ? new SfxItemSet( *pSet ) : 0 )
+ , m_pHistory(0)
+ , m_pRedlData(0)
+ , m_nSectionNodePos(0)
+ , m_bSplitAtStart(false)
+ , m_bSplitAtEnd(false)
+ , m_bUpdateFtn(false)
+{
SwDoc& rDoc = *(SwDoc*)rPam.GetDoc();
if( rDoc.IsRedlineOn() )
{
- pRedlData = new SwRedlineData( nsRedlineType_t::REDLINE_INSERT,
- rDoc.GetRedlineAuthor() );
+ m_pRedlData.reset(new SwRedlineData( nsRedlineType_t::REDLINE_INSERT,
+ rDoc.GetRedlineAuthor() ));
SetRedlineMode( rDoc.GetRedlineMode() );
}
- bSplitAtStt = FALSE;
- bSplitAtEnd = FALSE;
- bUpdateFtn = FALSE;
-
- if( pSet && pSet->Count() )
- pAttr = new SfxItemSet( *pSet );
if( !rPam.HasMark() )
{
@@ -114,33 +111,25 @@ SwUndoInsSection::SwUndoInsSection( const SwPaM& rPam, const SwSection& rNew,
aBrkSet.Put( *pCNd->GetpSwAttrSet() );
if( aBrkSet.Count() )
{
- pHistory = new SwHistory;
- pHistory->CopyFmtAttr( aBrkSet, pCNd->GetIndex() );
+ m_pHistory.reset( new SwHistory );
+ m_pHistory->CopyFmtAttr( aBrkSet, pCNd->GetIndex() );
}
}
}
}
-
SwUndoInsSection::~SwUndoInsSection()
{
- delete pSection;
- delete pRedlData;
- delete pAttr;
-
- if( pHistory )
- delete pHistory;
}
-
-
void SwUndoInsSection::Undo( SwUndoIter& rUndoIter )
{
SwDoc& rDoc = rUndoIter.GetDoc();
- RemoveIdxFromSection( rDoc, nSectNodePos );
+ RemoveIdxFromSection( rDoc, m_nSectionNodePos );
- SwSectionNode* pNd = rDoc.GetNodes()[ nSectNodePos ]->GetSectionNode();
+ SwSectionNode *const pNd =
+ rDoc.GetNodes()[ m_nSectionNodePos ]->GetSectionNode();
ASSERT( pNd, "wo ist mein SectionNode?" );
if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ))
@@ -158,19 +147,25 @@ void SwUndoInsSection::Undo( SwUndoIter& rUndoIter )
rDoc.DelSectionFmt( pNd->GetSection().GetFmt() );
// muessen wir noch zusammenfassen ?
- if( bSplitAtStt )
+ if (m_bSplitAtStart)
+ {
Join( rDoc, nSttNode );
+ }
- if( bSplitAtEnd )
+ if (m_bSplitAtEnd)
+ {
Join( rDoc, nEndNode );
+ }
- if ( pHistory )
+ if (m_pHistory.get())
{
- pHistory->TmpRollback( &rDoc, 0, false );
+ m_pHistory->TmpRollback( &rDoc, 0, false );
}
- if( bUpdateFtn )
+ if (m_bUpdateFtn)
+ {
rDoc.GetFtnIdxs().UpdateFtn( aIdx );
+ }
SetPaM( rUndoIter );
}
@@ -182,28 +177,32 @@ void SwUndoInsSection::Redo( SwUndoIter& rUndoIter )
SetPaM( rUndoIter );
const SwTOXBaseSection* pUpdateTOX = 0;
- if( pSection->ISA( SwTOXBaseSection ))
+ if (m_pTOXBase.get())
{
- const SwTOXBase& rBase = *(SwTOXBaseSection*)pSection;
pUpdateTOX = rDoc.InsertTableOf( *rUndoIter.pAktPam->GetPoint(),
- rBase, pAttr, TRUE );
+ *m_pTOXBase, m_pAttrSet.get(), true);
}
else
{
- rDoc.InsertSwSection( *rUndoIter.pAktPam, *pSection, pAttr, true );
+ rDoc.InsertSwSection(*rUndoIter.pAktPam,
+ *m_pSectionData, 0, m_pAttrSet.get(), true);
}
- if( pHistory )
- pHistory->SetTmpEnd( pHistory->Count() );
+ if (m_pHistory.get())
+ {
+ m_pHistory->SetTmpEnd( m_pHistory->Count() );
+ }
- SwSectionNode* pSectNd = rDoc.GetNodes()[ nSectNodePos ]->GetSectionNode();
- if( pRedlData && IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ))
+ SwSectionNode *const pSectNd =
+ rDoc.GetNodes()[ m_nSectionNodePos ]->GetSectionNode();
+ if (m_pRedlData.get() &&
+ IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode()))
{
RedlineMode_t eOld = rDoc.GetRedlineMode();
rDoc.SetRedlineMode_intern((RedlineMode_t)(eOld & ~nsRedlineMode_t::REDLINE_IGNORE));
SwPaM aPam( *pSectNd->EndOfSectionNode(), *pSectNd, 1 );
- rDoc.AppendRedline( new SwRedline( *pRedlData, aPam ), true);
+ rDoc.AppendRedline( new SwRedline( *m_pRedlData, aPam ), true);
rDoc.SetRedlineMode_intern( eOld );
}
else if( !( nsRedlineMode_t::REDLINE_IGNORE & GetRedlineMode() ) &&
@@ -228,16 +227,15 @@ void SwUndoInsSection::Redo( SwUndoIter& rUndoIter )
void SwUndoInsSection::Repeat( SwUndoIter& rUndoIter )
{
- if( pSection->ISA( SwTOXBaseSection ))
+ if (m_pTOXBase.get())
{
- const SwTOXBase& rBase = *(SwTOXBaseSection*)pSection;
rUndoIter.GetDoc().InsertTableOf( *rUndoIter.pAktPam->GetPoint(),
- rBase, pAttr, TRUE );
+ *m_pTOXBase, m_pAttrSet.get(), true);
}
else
{
rUndoIter.GetDoc().InsertSwSection( *rUndoIter.pAktPam,
- *pSection, pAttr );
+ *m_pSectionData, 0, m_pAttrSet.get());
}
}
@@ -254,7 +252,7 @@ void SwUndoInsSection::Join( SwDoc& rDoc, ULONG nNode )
}
pTxtNd->JoinNext();
- if( pHistory )
+ if (m_pHistory.get())
{
SwIndex aCntIdx( pTxtNd, 0 );
pTxtNd->RstAttr( aCntIdx, pTxtNd->Len(), 0, 0, true );
@@ -262,74 +260,99 @@ void SwUndoInsSection::Join( SwDoc& rDoc, ULONG nNode )
}
-void SwUndoInsSection::SaveSplitNode( SwTxtNode* pTxtNd, BOOL bAtStt )
+void
+SwUndoInsSection::SaveSplitNode(SwTxtNode *const pTxtNd, bool const bAtStart)
{
if( pTxtNd->GetpSwpHints() )
{
- if( !pHistory )
- pHistory = new SwHistory;
- pHistory->CopyAttr( pTxtNd->GetpSwpHints(), pTxtNd->GetIndex(), 0,
+ if (!m_pHistory.get())
+ {
+ m_pHistory.reset( new SwHistory );
+ }
+ m_pHistory->CopyAttr( pTxtNd->GetpSwpHints(), pTxtNd->GetIndex(), 0,
pTxtNd->GetTxt().Len(), false );
}
- if( bAtStt )
- bSplitAtStt = TRUE;
+ if (bAtStart)
+ {
+ m_bSplitAtStart = true;
+ }
else
- bSplitAtEnd = TRUE;
+ {
+ m_bSplitAtEnd = true;
+ }
}
-// -----------------------------
+////////////////////////////////////////////////////////////////////////////
-SwUndoDelSection::SwUndoDelSection( const SwSectionFmt& rFmt )
- : SwUndo( UNDO_DELSECTION )
+class SwUndoDelSection
+ : public SwUndo
{
- const SwSection& rSect = *rFmt.GetSection();
- if( rSect.ISA( SwTOXBaseSection ))
- {
- const SwTOXBase& rBase = (SwTOXBaseSection&)rSect;
- pSection = new SwTOXBaseSection( rBase );
- }
- else
- pSection = new SwSection( rSect.GetType(), rSect.GetName() );
- *pSection = rSect;
-
- pAttr = ::lcl_GetAttrSet( rSect );
-
- const SwNodeIndex* pIdx = rFmt.GetCntnt().GetCntntIdx();
- nSttNd = pIdx->GetIndex();
- nEndNd = pIdx->GetNode().EndOfSectionIndex();
+private:
+ ::std::auto_ptr<SwSectionData> const m_pSectionData; /// section not TOX
+ ::std::auto_ptr<SwTOXBase> const m_pTOXBase; /// set iff section is TOX
+ ::std::auto_ptr<SfxItemSet> const m_pAttrSet;
+ ::boost::shared_ptr< ::sfx2::MetadatableUndo > const m_pMetadataUndo;
+ ULONG const m_nStartNode;
+ ULONG const m_nEndNode;
+
+public:
+ SwUndoDelSection(
+ SwSectionFmt const&, SwSection const&, SwNodeIndex const*const);
+ virtual ~SwUndoDelSection();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+};
+
+SW_DLLPRIVATE SwUndo * MakeUndoDelSection(SwSectionFmt const& rFormat)
+{
+ return new SwUndoDelSection(rFormat, *rFormat.GetSection(),
+ rFormat.GetCntnt().GetCntntIdx());
}
+SwUndoDelSection::SwUndoDelSection(
+ SwSectionFmt const& rSectionFmt, SwSection const& rSection,
+ SwNodeIndex const*const pIndex)
+ : SwUndo( UNDO_DELSECTION )
+ , m_pSectionData( new SwSectionData(rSection) )
+ , m_pTOXBase( rSection.ISA( SwTOXBaseSection )
+ ? new SwTOXBase(static_cast<SwTOXBaseSection const&>(rSection))
+ : 0 )
+ , m_pAttrSet( ::lcl_GetAttrSet(rSection) )
+ , m_pMetadataUndo( rSectionFmt.CreateUndo() )
+ , m_nStartNode( pIndex->GetIndex() )
+ , m_nEndNode( pIndex->GetNode().EndOfSectionIndex() )
+{
+}
SwUndoDelSection::~SwUndoDelSection()
{
- delete pSection;
- delete pAttr;
}
-
void SwUndoDelSection::Undo( SwUndoIter& rUndoIter )
{
SwDoc& rDoc = rUndoIter.GetDoc();
- if( pSection->ISA( SwTOXBaseSection ))
+ if (m_pTOXBase.get())
{
- const SwTOXBase& rBase = *(SwTOXBaseSection*)pSection;
- rDoc.InsertTableOf( nSttNd, nEndNd-2, rBase, pAttr );
+ rDoc.InsertTableOf(m_nStartNode, m_nEndNode-2, *m_pTOXBase,
+ m_pAttrSet.get());
}
else
{
- SwNodeIndex aStt( rDoc.GetNodes(), nSttNd );
- SwNodeIndex aEnd( rDoc.GetNodes(), nEndNd-2 );
+ SwNodeIndex aStt( rDoc.GetNodes(), m_nStartNode );
+ SwNodeIndex aEnd( rDoc.GetNodes(), m_nEndNode-2 );
SwSectionFmt* pFmt = rDoc.MakeSectionFmt( 0 );
- if( pAttr )
- pFmt->SetFmtAttr( *pAttr );
+ if (m_pAttrSet.get())
+ {
+ pFmt->SetFmtAttr( *m_pAttrSet );
+ }
/// OD 04.10.2002 #102894#
/// remember inserted section node for further calculations
- SwSectionNode* pInsertedSectNd =
- rDoc.GetNodes().InsertSection( aStt, *pFmt, *pSection, &aEnd );
+ SwSectionNode* pInsertedSectNd = rDoc.GetNodes().InsertTextSection(
+ aStt, *pFmt, *m_pSectionData, 0, & aEnd);
if( SFX_ITEM_SET == pFmt->GetItemState( RES_FTN_AT_TXTEND ) ||
SFX_ITEM_SET == pFmt->GetItemState( RES_END_AT_TXTEND ))
@@ -356,63 +379,86 @@ void SwUndoDelSection::Undo( SwUndoIter& rUndoIter )
aInsertedSect.SetCondHidden( bRecalcCondHidden );
}
+ pFmt->RestoreMetadata(m_pMetadataUndo);
}
}
-
void SwUndoDelSection::Redo( SwUndoIter& rUndoIter )
{
SwDoc& rDoc = rUndoIter.GetDoc();
- SwSectionNode* pNd = rDoc.GetNodes()[ nSttNd ]->GetSectionNode();
+ SwSectionNode *const pNd =
+ rDoc.GetNodes()[ m_nStartNode ]->GetSectionNode();
ASSERT( pNd, "wo ist mein SectionNode?" );
// einfach das Format loeschen, der Rest erfolgt automatisch
rDoc.DelSectionFmt( pNd->GetSection().GetFmt() );
}
+////////////////////////////////////////////////////////////////////////////
-SwUndoChgSection::SwUndoChgSection( const SwSectionFmt& rFmt, BOOL bOnlyAttr )
- : SwUndo( UNDO_CHGSECTION ), bOnlyAttrChgd( bOnlyAttr )
+class SwUndoUpdateSection
+ : public SwUndo
{
- const SwSection& rSect = *rFmt.GetSection();
- pSection = new SwSection( rSect.GetType(), rSect.GetName() );
- *pSection = rSect;
-
- pAttr = ::lcl_GetAttrSet( rSect );
-
- nSttNd = rFmt.GetCntnt().GetCntntIdx()->GetIndex();
+private:
+ ::std::auto_ptr<SwSectionData> m_pSectionData;
+ ::std::auto_ptr<SfxItemSet> m_pAttrSet;
+ ULONG const m_nStartNode;
+ bool const m_bOnlyAttrChanged;
+
+public:
+ SwUndoUpdateSection(
+ SwSection const&, SwNodeIndex const*const, bool const bOnlyAttr);
+ virtual ~SwUndoUpdateSection();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+};
+
+SW_DLLPRIVATE SwUndo *
+MakeUndoUpdateSection(SwSectionFmt const& rFormat, bool const bOnlyAttr)
+{
+ return new SwUndoUpdateSection(*rFormat.GetSection(),
+ rFormat.GetCntnt().GetCntntIdx(), bOnlyAttr);
}
-
-SwUndoChgSection::~SwUndoChgSection()
+SwUndoUpdateSection::SwUndoUpdateSection(
+ SwSection const& rSection, SwNodeIndex const*const pIndex,
+ bool const bOnlyAttr)
+ : SwUndo( UNDO_CHGSECTION )
+ , m_pSectionData( new SwSectionData(rSection) )
+ , m_pAttrSet( ::lcl_GetAttrSet(rSection) )
+ , m_nStartNode( pIndex->GetIndex() )
+ , m_bOnlyAttrChanged( bOnlyAttr )
{
- delete pSection;
- delete pAttr;
}
+SwUndoUpdateSection::~SwUndoUpdateSection()
+{
+}
-void SwUndoChgSection::Undo( SwUndoIter& rUndoIter )
+void SwUndoUpdateSection::Undo( SwUndoIter& rUndoIter )
{
SwDoc& rDoc = rUndoIter.GetDoc();
- SwSectionNode* pSectNd = rDoc.GetNodes()[ nSttNd ]->GetSectionNode();
+ SwSectionNode *const pSectNd =
+ rDoc.GetNodes()[ m_nStartNode ]->GetSectionNode();
ASSERT( pSectNd, "wo ist mein SectionNode?" );
SwSection& rNdSect = pSectNd->GetSection();
SwFmt* pFmt = rNdSect.GetFmt();
SfxItemSet* pCur = ::lcl_GetAttrSet( rNdSect );
- if( pAttr )
+ if (m_pAttrSet.get())
{
// das Content- und Protect-Item muss bestehen bleiben
const SfxPoolItem* pItem;
- pAttr->Put( pFmt->GetFmtAttr( RES_CNTNT ));
+ m_pAttrSet->Put( pFmt->GetFmtAttr( RES_CNTNT ));
if( SFX_ITEM_SET == pFmt->GetItemState( RES_PROTECT, TRUE, &pItem ))
- pAttr->Put( *pItem );
- pFmt->DelDiffs( *pAttr );
- pAttr->ClearItem( RES_CNTNT );
- pFmt->SetFmtAttr( *pAttr );
- delete pAttr;
+ {
+ m_pAttrSet->Put( *pItem );
+ }
+ pFmt->DelDiffs( *m_pAttrSet );
+ m_pAttrSet->ClearItem( RES_CNTNT );
+ pFmt->SetFmtAttr( *m_pAttrSet );
}
else
{
@@ -421,22 +467,20 @@ void SwUndoChgSection::Undo( SwUndoIter& rUndoIter )
pFmt->ResetFmtAttr( RES_HEADER, RES_OPAQUE );
pFmt->ResetFmtAttr( RES_SURROUND, RES_FRMATR_END-1 );
}
- pAttr = pCur;
+ m_pAttrSet.reset(pCur);
- if( !bOnlyAttrChgd )
+ if (!m_bOnlyAttrChanged)
{
- BOOL bUpdate = (!rNdSect.IsLinkType() && pSection->IsLinkType() ) ||
- ( pSection->GetLinkFileName().Len() &&
- pSection->GetLinkFileName() !=
- rNdSect.GetLinkFileName());
-
- SwSection* pTmp = new SwSection( CONTENT_SECTION, aEmptyStr );
- *pTmp = rNdSect; // das aktuelle sichern
+ const bool bUpdate =
+ (!rNdSect.IsLinkType() && m_pSectionData->IsLinkType())
+ || ( m_pSectionData->GetLinkFileName().Len()
+ && (m_pSectionData->GetLinkFileName() !=
+ rNdSect.GetLinkFileName()));
- rNdSect = *pSection; // das alte setzen
-
- delete pSection;
- pSection = pTmp; // das aktuelle ist jetzt das alte
+ // swap stored section data with live section data
+ SwSectionData *const pOld( new SwSectionData(rNdSect) );
+ rNdSect.SetSectionData(*m_pSectionData);
+ m_pSectionData.reset(pOld);
if( bUpdate )
rNdSect.CreateLink( CREATE_UPDATE );
@@ -448,8 +492,8 @@ void SwUndoChgSection::Undo( SwUndoIter& rUndoIter )
}
}
-
-void SwUndoChgSection::Redo( SwUndoIter& rUndoIter )
+void SwUndoUpdateSection::Redo( SwUndoIter& rUndoIter )
{
Undo( rUndoIter );
}
+
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index 9e6fba9f4a..03df3e1514 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -1363,7 +1363,8 @@ uno::Any SwXTextSections::getByName(const OUString& Name)
for(sal_uInt16 i = 0; i < rFmts.Count(); i++)
{
SwSectionFmt* pFmt = rFmts[i];
- if(pFmt->IsInNodesArr() && aName == pFmt->GetSection()->GetName())
+ if (pFmt->IsInNodesArr()
+ && (aName == pFmt->GetSection()->GetSectionName()))
{
xSect = GetObject(*pFmt);
aRet.setValue(&xSect, ::getCppuType((uno::Reference<XTextSection>*)0));
@@ -1407,7 +1408,7 @@ uno::Sequence< OUString > SwXTextSections::getElementNames(void)
{
pFmt = rFmts[++nIndex];
}
- pArray[i] = pFmt->GetSection()->GetName();
+ pArray[i] = pFmt->GetSection()->GetSectionName();
}
}
return aSeq;
@@ -1427,7 +1428,7 @@ sal_Bool SwXTextSections::hasByName(const OUString& Name)
for(sal_uInt16 i = 0; i < rFmts.Count(); i++)
{
const SwSectionFmt* pFmt = rFmts[i];
- if(aName == pFmt->GetSection()->GetName())
+ if (aName == pFmt->GetSection()->GetSectionName())
{
bRet = sal_True;
break;
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index 70863d4f02..35df91a570 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -88,6 +88,8 @@
// --> OD 2008-11-26 #158694#
#include <SwNodeNum.hxx>
// <--
+#include <fmtmeta.hxx>
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -102,6 +104,37 @@ using ::rtl::OUString;
namespace SwUnoCursorHelper
{
+uno::Reference<text::XTextContent>
+GetNestedTextContent(SwTxtNode & rTextNode, xub_StrLen const nIndex,
+ bool const bParent)
+{
+ // these should be unambiguous because of the dummy character
+ SwTxtNode::GetTxtAttrMode const eMode( (bParent)
+ ? SwTxtNode::PARENT : SwTxtNode::EXPAND );
+ SwTxtAttr *const pMetaTxtAttr =
+ rTextNode.GetTxtAttrAt(nIndex, RES_TXTATR_META, eMode);
+ SwTxtAttr *const pMetaFieldTxtAttr =
+ rTextNode.GetTxtAttrAt(nIndex, RES_TXTATR_METAFIELD, eMode);
+ // which is innermost?
+ SwTxtAttr *const pTxtAttr = (pMetaTxtAttr)
+ ? ((pMetaFieldTxtAttr)
+ ? ((*pMetaFieldTxtAttr->GetStart() >
+ *pMetaTxtAttr->GetStart())
+ ? pMetaFieldTxtAttr : pMetaTxtAttr)
+ : pMetaTxtAttr)
+ : pMetaFieldTxtAttr;
+ uno::Reference<XTextContent> xRet;
+ if (pTxtAttr)
+ {
+ ::sw::Meta *const pMeta(
+ static_cast<SwFmtMeta &>(pTxtAttr->GetAttr()).GetMeta());
+ OSL_ASSERT(pMeta);
+ xRet.set(pMeta->MakeUnoObject(), uno::UNO_QUERY);
+ }
+ return xRet;
+}
+
+
/* -----------------16.09.98 12:27-------------------
* Lesen spezieller Properties am Cursor
* --------------------------------------------------*/
@@ -300,14 +333,15 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
break;
case FN_UNO_DOCUMENT_INDEX_MARK:
{
- SwTxtAttr* pTxtAttr = rPam.GetNode()->GetTxtNode()->GetTxtAttr(
- rPam.GetPoint()->nContent, RES_TXTATR_TOXMARK);
- if(pTxtAttr)
+ ::std::vector<SwTxtAttr *> const marks(
+ rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt(
+ rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_TOXMARK));
+ if (marks.size())
{
if( pAny )
- {
+ { // hmm... can only return 1 here
SwTOXMark & rMark =
- static_cast<SwTOXMark&>(pTxtAttr->GetAttr());
+ static_cast<SwTOXMark &>((*marks.begin())->GetAttr());
const uno::Reference< text::XDocumentIndexMark > xRef =
SwXDocumentIndexMark::CreateXDocumentIndexMark(
*rPam.GetDoc(),
@@ -343,9 +377,10 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
const SwPosition *pPos = rPam.Start();
const SwTxtNode *pTxtNd =
rPam.GetDoc()->GetNodes()[pPos->nNode.GetIndex()]->GetTxtNode();
- SwTxtAttr* pTxtAttr =
- pTxtNd ? pTxtNd->GetTxtAttr(pPos->nContent, RES_TXTATR_FIELD)
- : 0;
+ SwTxtAttr *const pTxtAttr = (pTxtNd)
+ ? pTxtNd->GetTxtAttrForCharAt(
+ pPos->nContent.GetIndex(), RES_TXTATR_FIELD)
+ : 0;
if(pTxtAttr)
{
if( pAny )
@@ -434,8 +469,9 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
case FN_UNO_ENDNOTE:
case FN_UNO_FOOTNOTE:
{
- SwTxtAttr* pTxtAttr = rPam.GetNode()->GetTxtNode()->
- GetTxtAttr(rPam.GetPoint()->nContent, RES_TXTATR_FTN);
+ SwTxtAttr *const pTxtAttr =
+ rPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
+ rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN);
if(pTxtAttr)
{
const SwFmtFtn& rFtn = pTxtAttr->GetFtn();
@@ -457,13 +493,14 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
break;
case FN_UNO_REFERENCE_MARK:
{
- SwTxtAttr* pTxtAttr = rPam.GetNode()->GetTxtNode()->
- GetTxtAttr(rPam.GetPoint()->nContent, RES_TXTATR_REFMARK);
- if(pTxtAttr)
+ ::std::vector<SwTxtAttr *> const marks(
+ rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt(
+ rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_REFMARK));
+ if (marks.size())
{
if( pAny )
- {
- const SwFmtRefMark& rRef = pTxtAttr->GetRefMark();
+ { // hmm... can only return 1 here
+ const SwFmtRefMark& rRef = (*marks.begin())->GetRefMark();
uno::Reference< XTextContent > xRef = SwXReferenceMarks::GetObject( rPam.GetDoc(), &rRef );
pAny->setValue(&xRef, ::getCppuType((uno::Reference<XTextContent>*)0));
}
@@ -472,6 +509,24 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
eNewState = PropertyState_DEFAULT_VALUE;
}
break;
+ case FN_UNO_NESTED_TEXT_CONTENT:
+ {
+ uno::Reference<XTextContent> const xRet(
+ GetNestedTextContent(*rPam.GetNode()->GetTxtNode(),
+ rPam.GetPoint()->nContent.GetIndex(), false));
+ if (xRet.is())
+ {
+ if (pAny)
+ {
+ (*pAny) <<= xRet;
+ }
+ }
+ else
+ {
+ eNewState = PropertyState_DEFAULT_VALUE;
+ }
+ }
+ break;
case FN_UNO_CHARFMT_SEQUENCE:
{
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 27a31ce70f..943a46587d 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -39,6 +39,7 @@
#include <unotextrange.hxx>
#include <unoprnms.hxx>
#include <editeng/unoprnms.hxx>
+#include <svx/svditer.hxx>
#include <swunohelper.hxx>
#include <doc.hxx>
#include <fmtcntnt.hxx>
@@ -1052,25 +1053,34 @@ SwXShape::SwXShape(uno::Reference< uno::XInterface > & xShape) :
-----------------------------------------------------------------------*/
void SwXShape::AddExistingShapeToFmt( SdrObject& _rObj )
{
- SwXShape* pSwShape = NULL;
- uno::Reference< lang::XUnoTunnel > xShapeTunnel( _rObj.getWeakUnoShape(), uno::UNO_QUERY );
- if ( xShapeTunnel.is() )
- pSwShape = reinterpret_cast< SwXShape * >(
- sal::static_int_cast< sal_IntPtr >( xShapeTunnel->getSomething( SwXShape::getUnoTunnelId() ) ) );
- if ( pSwShape )
+ SdrObjListIter aIter( _rObj, IM_DEEPNOGROUPS );
+ while ( aIter.IsMore() )
{
- if ( pSwShape->m_bDescriptor )
- {
- SwFrmFmt* pFmt = ::FindFrmFmt( &const_cast< SdrObject& >( _rObj ) );
- if ( pFmt )
- pFmt->Add( pSwShape );
- pSwShape->m_bDescriptor = sal_False;
- }
+ SdrObject* pCurrent = aIter.Next();
+ OSL_ENSURE( pCurrent, "SwXShape::AddExistingShapeToFmt: invalid object list element!" );
+ if ( !pCurrent )
+ continue;
- if ( !pSwShape->pImpl->bInitializedPropertyNotifier )
+ SwXShape* pSwShape = NULL;
+ uno::Reference< lang::XUnoTunnel > xShapeTunnel( pCurrent->getWeakUnoShape(), uno::UNO_QUERY );
+ if ( xShapeTunnel.is() )
+ pSwShape = reinterpret_cast< SwXShape * >(
+ sal::static_int_cast< sal_IntPtr >( xShapeTunnel->getSomething( SwXShape::getUnoTunnelId() ) ) );
+ if ( pSwShape )
{
- lcl_addShapePropertyEventFactories( _rObj, *pSwShape );
- pSwShape->pImpl->bInitializedPropertyNotifier = true;
+ if ( pSwShape->m_bDescriptor )
+ {
+ SwFrmFmt* pFmt = ::FindFrmFmt( const_cast< SdrObject* >( pCurrent ) );
+ if ( pFmt )
+ pFmt->Add( pSwShape );
+ pSwShape->m_bDescriptor = sal_False;
+ }
+
+ if ( !pSwShape->pImpl->bInitializedPropertyNotifier )
+ {
+ lcl_addShapePropertyEventFactories( *pCurrent, *pSwShape );
+ pSwShape->pImpl->bInitializedPropertyNotifier = true;
+ }
}
}
}
diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx
index 4abc8c152b..210ca1d7d7 100644
--- a/sw/source/core/unocore/unoflatpara.cxx
+++ b/sw/source/core/unocore/unoflatpara.cxx
@@ -30,6 +30,7 @@
#include <editeng/unolingu.hxx>
+#include <unobaseclass.hxx>
#include <unoflatpara.hxx>
#include <vos/mutex.hxx>
@@ -119,7 +120,7 @@ css::uno::Reference< css::container::XStringKeyMap > SAL_CALL SwXFlatParagraph::
{
return SwXTextMarkup::getMarkupInfoContainer();
}
-
+
void SAL_CALL SwXFlatParagraph::commitTextMarkup(::sal_Int32 nType, const ::rtl::OUString & rIdentifier, ::sal_Int32 nStart, ::sal_Int32 nLength, const css::uno::Reference< css::container::XStringKeyMap > & rxMarkupInfoContainer) throw (css::uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
@@ -136,7 +137,7 @@ void SAL_CALL SwXFlatParagraph::commitTextMarkup(::sal_Int32 nType, const ::rtl:
void SAL_CALL SwXFlatParagraph::setChecked( ::sal_Int32 nType, ::sal_Bool bVal ) throw (uno::RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
-
+
if ( mpTxtNode )
{
if ( text::TextMarkupType::SPELLCHECK == nType )
@@ -193,7 +194,7 @@ lang::Locale SAL_CALL SwXFlatParagraph::getPrimaryLanguageOfText(::sal_Int32 nPo
throw (uno::RuntimeException, lang::IllegalArgumentException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
-
+
if (!mpTxtNode)
return SvxCreateLocale( LANGUAGE_NONE );
@@ -265,6 +266,24 @@ css::uno::Sequence< ::sal_Int32 > SAL_CALL SwXFlatParagraph::getLanguagePortions
return css::uno::Sequence< ::sal_Int32>();
}
+
+const uno::Sequence< sal_Int8 >&
+SwXFlatParagraph::getUnoTunnelId()
+{
+ static uno::Sequence<sal_Int8> aSeq(CreateUnoTunnelId());
+ return aSeq;
+}
+
+
+sal_Int64 SAL_CALL
+SwXFlatParagraph::getSomething(
+ const uno::Sequence< sal_Int8 >& rId)
+ throw (uno::RuntimeException)
+{
+ return sw::UnoTunnelImpl(rId, this);
+}
+
+
/******************************************************************************
* SwXFlatParagraphIterator
******************************************************************************/
@@ -279,7 +298,7 @@ SwXFlatParagraphIterator::SwXFlatParagraphIterator( SwDoc& rDoc, sal_Int32 nType
mbWrapped( sal_False )
{
//mnStartNode = mnCurrentNode = get node from current cursor TODO!
-
+
// register as listener and get notified when document is closed
mpDoc->GetPageDescFromPool( RES_POOLPAGE_STANDARD )->Add(this);
}
@@ -287,7 +306,7 @@ SwXFlatParagraphIterator::SwXFlatParagraphIterator( SwDoc& rDoc, sal_Int32 nType
SwXFlatParagraphIterator::~SwXFlatParagraphIterator()
{
}
-
+
void SwXFlatParagraphIterator::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
{
@@ -299,7 +318,7 @@ void SwXFlatParagraphIterator::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
mpDoc = 0;
}
}
-
+
uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getFirstPara()
throw( uno::RuntimeException )
@@ -421,13 +440,14 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaAfter(co
throw ( uno::RuntimeException, lang::IllegalArgumentException )
{
vos::OGuard aGuard(Application::GetSolarMutex());
-
+
uno::Reference< text::XFlatParagraph > xRet;
if (!mpDoc)
return xRet;
- text::XFlatParagraph* pFP = xPara.get();
- SwXFlatParagraph* pFlatParagraph = static_cast<SwXFlatParagraph*>(pFP);
+ const uno::Reference<lang::XUnoTunnel> xFPTunnel(xPara, uno::UNO_QUERY);
+ OSL_ASSERT(xFPTunnel.is());
+ SwXFlatParagraph* const pFlatParagraph(sw::UnoTunnelGetImplementation<SwXFlatParagraph>(xFPTunnel));
if ( !pFlatParagraph )
return xRet;
@@ -467,13 +487,14 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaBefore(c
throw ( uno::RuntimeException, lang::IllegalArgumentException )
{
vos::OGuard aGuard(Application::GetSolarMutex());
-
+
uno::Reference< text::XFlatParagraph > xRet;
if (!mpDoc)
return xRet;
-
- text::XFlatParagraph* pFP = xPara.get();
- SwXFlatParagraph* pFlatParagraph = static_cast<SwXFlatParagraph*>(pFP);
+
+ const uno::Reference<lang::XUnoTunnel> xFPTunnel(xPara, uno::UNO_QUERY);
+ OSL_ASSERT(xFPTunnel.is());
+ SwXFlatParagraph* const pFlatParagraph(sw::UnoTunnelGetImplementation<SwXFlatParagraph>(xFPTunnel));
if ( !pFlatParagraph )
return xRet;
@@ -508,4 +529,3 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaBefore(c
return xRet;
}
-
diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx
index ce57ccc750..1a23ce49df 100644
--- a/sw/source/core/unocore/unoftn.cxx
+++ b/sw/source/core/unocore/unoftn.cxx
@@ -78,7 +78,9 @@ public:
, m_rThis(rThis)
, m_bIsEndnote(bIsEndnote)
, m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis))
- , m_bIsDescriptor(0 == pFootnote)
+// #i111177#: unxsols4 (Sun C++ 5.9 SunOS_sparc) generates wrong code for this
+// , m_bIsDescriptor(0 == pFootnote)
+ , m_bIsDescriptor((0 == pFootnote) ? true : false)
, m_pFmtFtn(pFootnote)
{
}
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index 3cb1049bca..1c24d55c89 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -915,9 +915,9 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
const SwSectionFmt* pTmpFmt = rSects[ i ];
if (pTmpFmt == pSectionFmt)
{
- m_pImpl->m_pDoc->ChgSection( i,
- static_cast<SwTOXBaseSection&>(rTOXBase),
- & aAttrSet);
+ SwSectionData tmpData(
+ static_cast<SwTOXBaseSection&>(rTOXBase));
+ m_pImpl->m_pDoc->UpdateSection(i, tmpData, & aAttrSet);
break;
}
}
@@ -1510,7 +1510,7 @@ OUString SAL_CALL SwXDocumentIndex::getName() throw (uno::RuntimeException)
}
else if(pSectionFmt)
{
- uRet = OUString(pSectionFmt->GetSection()->GetName());
+ uRet = OUString(pSectionFmt->GetSection()->GetSectionName());
}
else
{
@@ -1551,6 +1551,25 @@ SwXDocumentIndex::setName(const OUString& rName) throw (uno::RuntimeException)
}
}
+// MetadatableMixin
+::sfx2::Metadatable* SwXDocumentIndex::GetCoreObject()
+{
+ SwSectionFmt *const pSectionFmt( m_pImpl->GetSectionFmt() );
+ return pSectionFmt;
+}
+
+uno::Reference<frame::XModel> SwXDocumentIndex::GetModel()
+{
+ SwSectionFmt *const pSectionFmt( m_pImpl->GetSectionFmt() );
+ if (pSectionFmt)
+ {
+ SwDocShell const*const pShell( pSectionFmt->GetDoc()->GetDocShell() );
+ return (pShell) ? pShell->GetModel() : 0;
+ }
+ return 0;
+}
+
+
/******************************************************************
* SwXDocumentIndexMark
******************************************************************/
@@ -1573,6 +1592,8 @@ lcl_TypeToPropertyMap_Mark(const TOXTypes eType)
class SwXDocumentIndexMark::Impl
: public SwClient
{
+private:
+ bool m_bInReplaceMark;
public:
@@ -1599,6 +1620,7 @@ public:
const enum TOXTypes eType,
SwTOXType *const pType, SwTOXMark const*const pMark)
: SwClient(const_cast<SwTOXMark*>(pMark))
+ , m_bInReplaceMark(false)
, m_rPropSet(
*aSwMapProvider.GetPropertySet(lcl_TypeToPropertyMap_Mark(eType)))
, m_eTOXType(eType)
@@ -1617,11 +1639,33 @@ public:
const_cast<SwModify *>(m_TypeDepend.GetRegisteredIn()));
}
+ void DeleteTOXMark()
+ {
+ m_pDoc->DeleteTOXMark(m_pTOXMark); // calls Invalidate() via Modify!
+ m_pTOXMark = 0;
+ }
+
+ void InsertTOXMark(SwTOXType & rTOXType, SwTOXMark & rMark, SwPaM & rPam,
+ SwXTextCursor const*const pTextCursor);
+
+ void ReplaceTOXMark(SwTOXType & rTOXType, SwTOXMark & rMark, SwPaM & rPam)
+ {
+ m_bInReplaceMark = true;
+ DeleteTOXMark();
+ m_bInReplaceMark = false;
+ try {
+ InsertTOXMark(rTOXType, rMark, rPam, 0);
+ } catch (...) {
+ OSL_ENSURE(false, "ReplaceTOXMark() failed!");
+ m_ListenerContainer.Disposing();
+ throw;
+ }
+ }
+
void Invalidate();
// SwClient
virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew);
-
};
/* -----------------------------16.10.00 11:24--------------------------------
@@ -1638,7 +1682,10 @@ void SwXDocumentIndexMark::Impl::Invalidate()
&m_TypeDepend);
}
}
- m_ListenerContainer.Disposing();
+ if (!m_bInReplaceMark) // #i109983# only dispose on delete, not on replace!
+ {
+ m_ListenerContainer.Disposing();
+ }
m_pDoc = 0;
m_pTOXMark = 0;
}
@@ -1831,32 +1878,7 @@ throw (uno::RuntimeException)
else
aPam.GetPoint()->nContent++;
- // delete old mark
- m_pImpl->m_pDoc->DeleteTOXMark(m_pImpl->m_pTOXMark);
- m_pImpl->m_pTOXMark = 0;
-
- SwTxtAttr* pTxtAttr = 0;
- sal_Bool bInsAtPos = aMark.IsAlternativeText();
- const SwPosition *pStt = aPam.Start(),
- *pEnd = aPam.End();
- if( bInsAtPos )
- {
- SwPaM aTmp( *pStt );
- m_pImpl->m_pDoc->InsertPoolItem( aTmp, aMark, 0 );
- pTxtAttr = pStt->nNode.GetNode().GetTxtNode()->GetTxtAttrForCharAt(
- pStt->nContent.GetIndex()-1, RES_TXTATR_TOXMARK);
- }
- else if( *pEnd != *pStt )
- {
- m_pImpl->m_pDoc->InsertPoolItem( aPam, aMark,
- nsSetAttrMode::SETATTR_DONTEXPAND );
- pTxtAttr = pStt->nNode.GetNode().GetTxtNode()->GetTxtAttr(
- pStt->nContent, RES_TXTATR_TOXMARK);
- }
- if(pTxtAttr)
- {
- m_pImpl->m_pTOXMark = &pTxtAttr->GetTOXMark();
- }
+ m_pImpl->ReplaceTOXMark(*pType, aMark, aPam);
}
else if (m_pImpl->m_bIsDescriptor)
{
@@ -1984,17 +2006,45 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
default:
break;
}
+
+ m_pImpl->InsertTOXMark(*const_cast<SwTOXType *>(pTOXType), aMark, aPam,
+ dynamic_cast<SwXTextCursor const*>(pCursor));
+
+ m_pImpl->m_bIsDescriptor = sal_False;
+}
+
+template<typename T> struct NotContainedIn
+{
+ ::std::vector<T> const& m_rVector;
+ explicit NotContainedIn(::std::vector<T> const& rVector)
+ : m_rVector(rVector) { }
+ bool operator() (T const& rT) {
+ return ::std::find(m_rVector.begin(), m_rVector.end(), rT)
+ == m_rVector.end();
+ }
+};
+
+void SwXDocumentIndexMark::Impl::InsertTOXMark(
+ SwTOXType & rTOXType, SwTOXMark & rMark, SwPaM & rPam,
+ SwXTextCursor const*const pTextCursor)
+{
+ SwDoc *const pDoc( rPam.GetDoc() );
UnoActionContext aAction(pDoc);
- const sal_Bool bMark = *aPam.GetPoint() != *aPam.GetMark();
+ bool bMark = *rPam.GetPoint() != *rPam.GetMark();
+ // n.b.: toxmarks must have either alternative text or an extent
+ if (bMark && rMark.GetAlternativeText().Len())
+ {
+ rPam.Normalize(TRUE);
+ rPam.DeleteMark();
+ bMark = false;
+ }
// Marks ohne Alternativtext ohne selektierten Text koennen nicht eingefuegt werden,
// deshalb hier ein Leerzeichen - ob das die ideale Loesung ist?
- if (!bMark && !aMark.GetAlternativeText().Len())
+ if (!bMark && !rMark.GetAlternativeText().Len())
{
- aMark.SetAlternativeText( String(' ') );
+ rMark.SetAlternativeText( String(' ') );
}
- SwXTextCursor const*const pTextCursor(
- dynamic_cast<SwXTextCursor*>(pCursor));
const bool bForceExpandHints( (!bMark && pTextCursor)
? pTextCursor->IsAtEndOfMeta() : false );
const SetAttrMode nInsertFlags = (bForceExpandHints)
@@ -2002,35 +2052,54 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
| nsSetAttrMode::SETATTR_DONTEXPAND)
: nsSetAttrMode::SETATTR_DONTEXPAND;
- pDoc->InsertPoolItem(aPam, aMark, nInsertFlags);
- if (bMark && *aPam.GetPoint() > *aPam.GetMark())
+ ::std::vector<SwTxtAttr *> oldMarks;
+ if (bMark)
+ {
+ oldMarks = rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt(
+ rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_TOXMARK);
+ }
+
+ pDoc->InsertPoolItem(rPam, rMark, nInsertFlags);
+ if (bMark && *rPam.GetPoint() > *rPam.GetMark())
{
- aPam.Exchange();
+ rPam.Exchange();
}
- SwTxtAttr* pTxtAttr = 0;
+ // rMark was copied into the document pool; now retrieve real format...
+ SwTxtAttr * pTxtAttr(0);
if (bMark)
{
- pTxtAttr = aPam.GetNode()->GetTxtNode()->GetTxtAttr(
- aPam.GetPoint()->nContent, RES_TXTATR_TOXMARK );
+ // #i107672#
+ // ensure that we do not retrieve a different mark at the same position
+ ::std::vector<SwTxtAttr *> const newMarks(
+ rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt(
+ rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_TOXMARK));
+ ::std::vector<SwTxtAttr *>::const_iterator const iter(
+ ::std::find_if(newMarks.begin(), newMarks.end(),
+ NotContainedIn<SwTxtAttr *>(oldMarks)));
+ OSL_ASSERT(newMarks.end() != iter);
+ if (newMarks.end() != iter)
+ {
+ pTxtAttr = *iter;
+ }
}
else
{
- pTxtAttr = aPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
- aPam.GetPoint()->nContent.GetIndex()-1, RES_TXTATR_TOXMARK );
+ pTxtAttr = rPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
+ rPam.GetPoint()->nContent.GetIndex()-1, RES_TXTATR_TOXMARK );
}
if (!pTxtAttr)
{
- throw uno::RuntimeException();
+ throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "SwXDocumentIndexMark::InsertTOXMark(): cannot insert attribute")),
+ 0);
}
- m_pImpl->m_pTOXMark = &pTxtAttr->GetTOXMark();
- m_pImpl->m_pDoc = pDoc;
- m_pImpl->m_bIsDescriptor = sal_False;
-
- const_cast<SwTOXMark*>(m_pImpl->m_pTOXMark)->Add(m_pImpl.get());
- const_cast<SwTOXType*>(pTOXType)->Add(&m_pImpl->m_TypeDepend);
+ m_pDoc = pDoc;
+ m_pTOXMark = & pTxtAttr->GetTOXMark();
+ const_cast<SwTOXMark*>(m_pTOXMark)->Add(this);
+ const_cast<SwTOXType &>(rTOXType).Add(& m_TypeDepend);
}
/*-- 14.12.98 10:25:45---------------------------------------------------
@@ -2081,7 +2150,7 @@ SwXDocumentIndexMark::dispose() throw (uno::RuntimeException)
SwTOXType *const pType = m_pImpl->GetTOXType();
if (pType && m_pImpl->m_pTOXMark)
{
- m_pImpl->m_pDoc->DeleteTOXMark(m_pImpl->m_pTOXMark);
+ m_pImpl->DeleteTOXMark(); // call Invalidate() via modify!
}
}
/*-- 14.12.98 10:25:45---------------------------------------------------
@@ -2181,8 +2250,6 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
SwTOXType *const pType = m_pImpl->GetTOXType();
if (pType && m_pImpl->m_pTOXMark)
{
- SwDoc* pLocalDoc = m_pImpl->m_pDoc;
-
SwTOXMark aMark(*m_pImpl->m_pTOXMark);
switch(pEntry->nWID)
{
@@ -2225,37 +2292,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
aPam.GetPoint()->nContent++;
}
- //delete the old mark
- pLocalDoc->DeleteTOXMark(m_pImpl->m_pTOXMark);
- m_pImpl->m_pTOXMark = 0;
-
- sal_Bool bInsAtPos = aMark.IsAlternativeText();
- const SwPosition *pStt = aPam.Start();
- const SwPosition *pEnd = aPam.End();
-
- SwTxtAttr* pTxtAttr = 0;
- if( bInsAtPos )
- {
- SwPaM aTmp( *pStt );
- pLocalDoc->InsertPoolItem( aTmp, aMark, 0 );
- pTxtAttr = pStt->nNode.GetNode().GetTxtNode()->GetTxtAttrForCharAt(
- pStt->nContent.GetIndex()-1, RES_TXTATR_TOXMARK );
- }
- else if( *pEnd != *pStt )
- {
- pLocalDoc->InsertPoolItem( aPam, aMark,
- nsSetAttrMode::SETATTR_DONTEXPAND );
- pTxtAttr = pStt->nNode.GetNode().GetTxtNode()->GetTxtAttr(
- pStt->nContent, RES_TXTATR_TOXMARK );
- }
- m_pImpl->m_pDoc = pLocalDoc;
-
- if(pTxtAttr)
- {
- m_pImpl->m_pTOXMark = &pTxtAttr->GetTOXMark();
- const_cast<SwTOXMark*>(m_pImpl->m_pTOXMark)->Add(m_pImpl.get());
- pType->Add(&m_pImpl->m_TypeDepend);
- }
+ m_pImpl->ReplaceTOXMark(*pType, aMark, aPam);
}
else if (m_pImpl->m_bIsDescriptor)
{
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index 79dbc1e5de..f5aee26ca4 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -279,10 +279,11 @@ SwUnoPropertyMapProvider::~SwUnoPropertyMapProvider()
COMMON_CRSR_PARA_PROPERTIES\
{ SW_PROP_NMID(UNO_NAME_DOCUMENT_INDEX_MARK), FN_UNO_DOCUMENT_INDEX_MARK, CPPU_E2T(CPPUTYPE_REFDOCIDXMRK), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY ,0 },\
{ SW_PROP_NMID(UNO_NAME_TEXT_FIELD), FN_UNO_TEXT_FIELD, CPPU_E2T(CPPUTYPE_REFTXTFIELD), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY ,0 },\
- { SW_PROP_NMID(UNO_NAME_REFERENCE_MARK), FN_UNO_REFERENCE_MARK, CPPU_E2T(CPPUTYPE_REFTEXTCNTNT), PropertyAttribute::MAYBEVOID ,0 },\
+ { SW_PROP_NMID(UNO_NAME_REFERENCE_MARK), FN_UNO_REFERENCE_MARK, CPPU_E2T(CPPUTYPE_REFTEXTCNTNT), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, 0 },\
{ SW_PROP_NMID(UNO_NAME_FOOTNOTE), FN_UNO_FOOTNOTE, CPPU_E2T(CPPUTYPE_REFFOOTNOTE), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY ,0 },\
{ SW_PROP_NMID(UNO_NAME_ENDNOTE), FN_UNO_ENDNOTE, CPPU_E2T(CPPUTYPE_REFFOOTNOTE), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY ,0 },\
{ SW_PROP_NMID(UNO_NAME_HYPER_LINK_EVENTS), RES_TXTATR_INETFMT, CPPU_E2T(CPPUTYPE_REFNMREPLACE), PropertyAttribute::MAYBEVOID, MID_URL_HYPERLINKEVENTS},\
+ { SW_PROP_NMID(UNO_NAME_NESTED_TEXT_CONTENT), FN_UNO_NESTED_TEXT_CONTENT, CPPU_E2T(CPPUTYPE_REFTEXTCNTNT), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, 0 },\
TABSTOPS_MAP_ENTRY
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index af58401f30..1b3ed92312 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -1934,8 +1934,8 @@ lcl_FillFrame(SwClient & rEnum, SwUnoCrsr& rUnoCrsr,
{
// search for objects at the cursor - anchored at/as char
SwTxtAttr const*const pTxtAttr =
- rUnoCrsr.GetNode()->GetTxtNode()->GetTxtAttr(
- rUnoCrsr.GetPoint()->nContent, RES_TXTATR_FLYCNT);
+ rUnoCrsr.GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
+ rUnoCrsr.GetPoint()->nContent.GetIndex(), RES_TXTATR_FLYCNT);
if (pTxtAttr)
{
const SwFmtFlyCnt& rFlyCnt = pTxtAttr->GetFlyCnt();
diff --git a/sw/source/core/unocore/unoprnms.cxx b/sw/source/core/unocore/unoprnms.cxx
index 36c066dc5a..228b489557 100644
--- a/sw/source/core/unocore/unoprnms.cxx
+++ b/sw/source/core/unocore/unoprnms.cxx
@@ -778,6 +778,7 @@ const SwPropNameTab aPropNameTab = {
/* 0736 UNO_NAME_OUTLINE_LEVEL */ {MAP_CHAR_LEN("OutlineLevel")},//#outline level,add<-zhaojianwei Outlinelevel
/* 0737 UNO_NAME_DESCRIPTION */ {MAP_CHAR_LEN("Description")},
/* 0738 UNO_NAME_META */ {MAP_CHAR_LEN("InContentMetadata")},
+/* 0739 UNO_NAME_NESTED_TEXT_CONTENT */ {MAP_CHAR_LEN("NestedTextContent")},
};
const SwPropNameLen& SwGetPropName( USHORT nId )
diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx
index ea84ff33b5..244bc8dc5e 100644
--- a/sw/source/core/unocore/unorefmk.cxx
+++ b/sw/source/core/unocore/unorefmk.cxx
@@ -38,6 +38,7 @@
#include <unomap.hxx>
#include <unocrsr.hxx>
#include <unoevtlstnr.hxx>
+#include <unocrsrhelper.hxx>
#include <doc.hxx>
#include <ndtxt.hxx>
#include <fmtrfmrk.hxx>
@@ -235,6 +236,17 @@ throw (uno::RuntimeException)
/* -----------------03.11.99 14:14-------------------
--------------------------------------------------*/
+template<typename T> struct NotContainedIn
+{
+ ::std::vector<T> const& m_rVector;
+ explicit NotContainedIn(::std::vector<T> const& rVector)
+ : m_rVector(rVector) { }
+ bool operator() (T const& rT) {
+ return ::std::find(m_rVector.begin(), m_rVector.end(), rT)
+ == m_rVector.end();
+ }
+};
+
void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam,
SwXTextCursor const*const pCursor)
{
@@ -254,6 +266,13 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam,
| nsSetAttrMode::SETATTR_DONTEXPAND)
: nsSetAttrMode::SETATTR_DONTEXPAND;
+ ::std::vector<SwTxtAttr *> oldMarks;
+ if (bMark)
+ {
+ oldMarks = rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt(
+ rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_REFMARK);
+ }
+
pDoc2->InsertPoolItem( rPam, aRefMark, nInsertFlags );
if( bMark && *rPam.GetPoint() > *rPam.GetMark())
@@ -261,17 +280,38 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam,
rPam.Exchange();
}
- SwTxtAttr *const pTxtAttr = (bMark)
- ? rPam.GetNode()->GetTxtNode()->GetTxtAttr(
- rPam.GetPoint()->nContent, RES_TXTATR_REFMARK)
- : rPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
+ // aRefMark was copied into the document pool; now retrieve real format...
+ SwTxtAttr * pTxtAttr(0);
+ if (bMark)
+ {
+ // #i107672#
+ // ensure that we do not retrieve a different mark at the same position
+ ::std::vector<SwTxtAttr *> const newMarks(
+ rPam.GetNode()->GetTxtNode()->GetTxtAttrsAt(
+ rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_REFMARK));
+ ::std::vector<SwTxtAttr *>::const_iterator const iter(
+ ::std::find_if(newMarks.begin(), newMarks.end(),
+ NotContainedIn<SwTxtAttr *>(oldMarks)));
+ OSL_ASSERT(newMarks.end() != iter);
+ if (newMarks.end() != iter)
+ {
+ pTxtAttr = *iter;
+ }
+ }
+ else
+ {
+ pTxtAttr = rPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
rPam.GetPoint()->nContent.GetIndex() - 1, RES_TXTATR_REFMARK);
+ }
- if(pTxtAttr)
+ if (!pTxtAttr)
{
- m_pMarkFmt = &pTxtAttr->GetRefMark();
+ throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "SwXReferenceMark::InsertRefMark(): cannot insert attribute")), 0);
}
+ m_pMarkFmt = &pTxtAttr->GetRefMark();
+
pDoc2->GetUnoCallBack()->Add(this);
}
@@ -310,7 +350,6 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
m_pImpl->InsertRefMark(aPam, dynamic_cast<SwXTextCursor*>(pCursor));
m_pImpl->m_bIsDescriptor = sal_False;
m_pImpl->m_pDoc = pDocument;
- m_pImpl->m_pDoc->GetUnoCallBack()->Add(m_pImpl.get());
}
/*-- 11.12.98 10:28:34---------------------------------------------------
@@ -1159,11 +1198,7 @@ uno::Reference< text::XText > SAL_CALL
SwXMeta::getText() throw (uno::RuntimeException)
{
vos::OGuard g(Application::GetSolarMutex());
- //TODO probably this should return outer meta in case there is nesting,
- // but currently that is not done; would need to change at least
- // SwXTextPortionEnumeration and SwXMeta::attach and other places where
- // SwXMeta is constructed
- return GetParentText();
+ return this;
}
uno::Reference< text::XTextRange > SAL_CALL
@@ -1249,6 +1284,33 @@ SwXMeta::removeTextContent(
return m_pImpl->m_Text.removeTextContent(xContent);
}
+// XChild
+uno::Reference< uno::XInterface > SAL_CALL
+SwXMeta::getParent() throw (uno::RuntimeException)
+{
+ vos::OGuard g(Application::GetSolarMutex());
+ SwTxtNode * pTxtNode;
+ xub_StrLen nMetaStart;
+ xub_StrLen nMetaEnd;
+ bool const bSuccess( SetContentRange(pTxtNode, nMetaStart, nMetaEnd) );
+ OSL_ENSURE(bSuccess, "no pam?");
+ if (!bSuccess) { throw lang::DisposedException(); }
+ // in order to prevent getting this meta, subtract 1 from nMetaStart;
+ // so we get the index of the dummy character, and we exclude it
+ // by calling GetTxtAttrAt(_, _, PARENT) in GetNestedTextContent
+ uno::Reference<text::XTextContent> const xRet(
+ SwUnoCursorHelper::GetNestedTextContent(*pTxtNode, nMetaStart - 1,
+ true) );
+ return xRet;
+}
+
+void SAL_CALL
+SwXMeta::setParent(uno::Reference< uno::XInterface > const& /*xParent*/)
+ throw (uno::RuntimeException, lang::NoSupportException)
+{
+ throw lang::NoSupportException(C2S("setting parent not supported"), *this);
+}
+
// XElementAccess
uno::Type SAL_CALL
SwXMeta::getElementType() throw (uno::RuntimeException)
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index 8e10a4ff39..92fad90e82 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -369,7 +369,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
}
String tmp(m_pImpl->m_sName);
- SwSection aSect(eType, pDoc->GetUniqueSectionName(&tmp));
+ SwSectionData aSect(eType, pDoc->GetUniqueSectionName(&tmp));
aSect.SetCondition(m_pImpl->m_pProps->m_sCondition);
::rtl::OUStringBuffer sLinkNameBuf(m_pImpl->m_pProps->m_sLinkFileName);
sLinkNameBuf.append(sfx2::cTokenSeperator);
@@ -379,9 +379,9 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
aSect.SetLinkFileName(sLinkNameBuf.makeStringAndClear());
aSect.SetHidden(m_pImpl->m_pProps->m_bHidden);
- aSect.SetProtect(m_pImpl->m_pProps->m_bProtect);
+ aSect.SetProtectFlag(m_pImpl->m_pProps->m_bProtect);
// --> FME 2004-06-22 #114856# edit in readonly sections
- aSect.SetEditInReadonly(m_pImpl->m_pProps->m_bEditInReadonly);
+ aSect.SetEditInReadonlyFlag(m_pImpl->m_pProps->m_bEditInReadonly);
// <--
SfxItemSet aSet(pDoc->GetAttrPool(),
@@ -427,11 +427,11 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
// section password
if (m_pImpl->m_pProps->m_Password.getLength() > 0)
{
- aSect.SetPasswd(m_pImpl->m_pProps->m_Password);
+ aSect.SetPassword(m_pImpl->m_pProps->m_Password);
}
SwSection *const pRet =
- pDoc->InsertSwSection( aPam, aSect, aSet.Count() ? &aSet : 0 );
+ pDoc->InsertSwSection( aPam, aSect, 0, aSet.Count() ? &aSet : 0 );
pRet->GetFmt()->Add(m_pImpl.get());
pRet->GetFmt()->SetXObject(static_cast< ::cppu::OWeakObject*>(this));
@@ -549,6 +549,56 @@ SwXTextSection::getPropertySetInfo() throw (uno::RuntimeException)
/* -----------------------------12.02.01 10:45--------------------------------
---------------------------------------------------------------------------*/
+static void
+lcl_UpdateLinkType(SwSection & rSection, bool const bLinkUpdateAlways = true)
+{
+ if (rSection.GetType() == DDE_LINK_SECTION)
+ {
+ // set update type; needs an established link
+ if (!rSection.IsConnected())
+ {
+ rSection.CreateLink(CREATE_CONNECT);
+ }
+ rSection.SetUpdateType( static_cast< USHORT >((bLinkUpdateAlways)
+ ? sfx2::LINKUPDATE_ALWAYS : sfx2::LINKUPDATE_ONCALL) );
+ }
+}
+
+static void
+lcl_UpdateSection(SwSectionFmt *const pFmt,
+ ::std::auto_ptr<SwSectionData> const& pSectionData,
+ ::std::auto_ptr<SfxItemSet> const& pItemSet,
+ bool const bLinkModeChanged, bool const bLinkUpdateAlways = true)
+{
+ if (pFmt)
+ {
+ SwSection & rSection = *pFmt->GetSection();
+ SwDoc *const pDoc = pFmt->GetDoc();
+ SwSectionFmts const& rFmts = pDoc->GetSections();
+ UnoActionContext aContext(pDoc);
+ for (sal_uInt16 i = 0; i < rFmts.Count(); i++)
+ {
+ if (rFmts[i]->GetSection()->GetSectionName()
+ == rSection.GetSectionName())
+ {
+ pDoc->UpdateSection(i, *pSectionData, pItemSet.get(),
+ pDoc->IsInReading());
+ {
+ // temporarily remove actions to allow cursor update
+ UnoActionRemoveContext aRemoveContext( pDoc );
+ }
+
+ if (bLinkModeChanged)
+ {
+ lcl_UpdateLinkType(rSection, bLinkUpdateAlways);
+ }
+ // section found and processed: break from loop
+ break;
+ }
+ }
+ }
+}
+
void SwXTextSection::Impl::SetPropertyValues_Impl(
const uno::Sequence< OUString >& rPropertyNames,
const uno::Sequence< uno::Any >& rValues)
@@ -566,12 +616,9 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
throw uno::RuntimeException();
}
- SwSection aSection(CONTENT_SECTION, aEmptyStr);
- SwSection *const pSect = (pFmt) ? pFmt->GetSection() : 0;
- if (pFmt)
- {
- aSection = *pSect;
- }
+ ::std::auto_ptr<SwSectionData> const pSectionData(
+ (pFmt) ? new SwSectionData(*pFmt->GetSection()) : 0);
+
OUString const*const pPropertyNames = rPropertyNames.getConstArray();
uno::Any const*const pValues = rValues.getConstArray();
::std::auto_ptr<SfxItemSet> pItemSet;
@@ -609,7 +656,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
else
{
- aSection.SetCondition(uTmp);
+ pSectionData->SetCondition(uTmp);
}
}
break;
@@ -637,16 +684,16 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
else
{
- String sLinkFileName(aSection.GetLinkFileName());
- if (aSection.GetType() != DDE_LINK_SECTION)
+ String sLinkFileName(pSectionData->GetLinkFileName());
+ if (pSectionData->GetType() != DDE_LINK_SECTION)
{
sLinkFileName = sfx2::cTokenSeperator;
sLinkFileName += sfx2::cTokenSeperator;
- aSection.SetType(DDE_LINK_SECTION);
+ pSectionData->SetType(DDE_LINK_SECTION);
}
sLinkFileName.SetToken(pEntry->nWID - WID_SECT_DDE_TYPE,
sfx2::cTokenSeperator, sTmp);
- aSection.SetLinkFileName(sLinkFileName);
+ pSectionData->SetLinkFileName(sLinkFileName);
}
}
break;
@@ -683,10 +730,10 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
else
{
- if (aSection.GetType() != FILE_LINK_SECTION &&
+ if (pSectionData->GetType() != FILE_LINK_SECTION &&
aLink.FileURL.getLength())
{
- aSection.SetType(FILE_LINK_SECTION);
+ pSectionData->SetType(FILE_LINK_SECTION);
}
::rtl::OUStringBuffer sFileNameBuf;
if (aLink.FileURL.getLength())
@@ -700,14 +747,14 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
sFileNameBuf.append(aLink.FilterName);
sFileNameBuf.append(sfx2::cTokenSeperator);
sFileNameBuf.append(
- aSection.GetLinkFileName().GetToken(2,
+ pSectionData->GetLinkFileName().GetToken(2,
sfx2::cTokenSeperator));
const ::rtl::OUString sFileName(
sFileNameBuf.makeStringAndClear());
- aSection.SetLinkFileName(sFileName);
+ pSectionData->SetLinkFileName(sFileName);
if (sFileName.getLength() < 3)
{
- aSection.SetType(CONTENT_SECTION);
+ pSectionData->SetType(CONTENT_SECTION);
}
}
}
@@ -723,21 +770,21 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
else
{
- if (aSection.GetType() != FILE_LINK_SECTION &&
+ if (pSectionData->GetType() != FILE_LINK_SECTION &&
sLink.getLength())
{
- aSection.SetType(FILE_LINK_SECTION);
+ pSectionData->SetType(FILE_LINK_SECTION);
}
- String sSectLink(aSection.GetLinkFileName());
+ String sSectLink(pSectionData->GetLinkFileName());
while (3 < sSectLink.GetTokenCount(sfx2::cTokenSeperator))
{
sSectLink += sfx2::cTokenSeperator;
}
sSectLink.SetToken(2, sfx2::cTokenSeperator, sLink);
- aSection.SetLinkFileName(sSectLink);
+ pSectionData->SetLinkFileName(sSectLink);
if (sSectLink.Len() < 3)
{
- aSection.SetType(CONTENT_SECTION);
+ pSectionData->SetType(CONTENT_SECTION);
}
}
}
@@ -755,7 +802,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
else
{
- aSection.SetHidden(!bVal);
+ pSectionData->SetHidden(!bVal);
}
}
break;
@@ -772,9 +819,9 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
else
{
- if (aSection.GetCondition().Len() != 0)
+ if (pSectionData->GetCondition().Len() != 0)
{
- aSection.SetCondHidden(!bVal);
+ pSectionData->SetCondHidden(!bVal);
}
}
}
@@ -792,7 +839,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
else
{
- aSection.SetProtect(bVal);
+ pSectionData->SetProtectFlag(bVal);
}
}
break;
@@ -810,7 +857,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
else
{
- aSection.SetEditInReadonly(bVal);
+ pSectionData->SetEditInReadonlyFlag(bVal);
}
}
// <--
@@ -825,7 +872,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
else
{
- aSection.SetPasswd(aSeq);
+ pSectionData->SetPassword(aSeq);
}
}
break;
@@ -925,38 +972,8 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
}
- if (pFmt)
- {
- SwDoc* pDoc = pFmt->GetDoc();
- const SwSectionFmts& rFmts = pDoc->GetSections();
- UnoActionContext aContext(pDoc);
- for (sal_uInt16 i = 0; i < rFmts.Count(); i++)
- {
- if (rFmts[i]->GetSection()->GetName() == pSect->GetName())
- {
- pDoc->ChgSection(i, aSection, pItemSet.get(),
- pDoc->IsInReading());
- {
- // temporarily remove actions to allow cursor update
- UnoActionRemoveContext aRemoveContext( pDoc );
- }
-
- //SwSection* pSect = pFmt->GetSection();
- if (bLinkModeChanged && pSect->GetType() == DDE_LINK_SECTION)
- {
- // set update type; needs an established link
- if (!pSect->IsConnected())
- {
- pSect->CreateLink(CREATE_CONNECT);
- }
- pSect->SetUpdateType( static_cast< USHORT >((bLinkMode) ?
- sfx2::LINKUPDATE_ALWAYS : sfx2::LINKUPDATE_ONCALL) );
- }
- // section found and processed: break from loop
- break;
- }
- }
- }
+ lcl_UpdateSection(pFmt, pSectionData, pItemSet, bLinkModeChanged,
+ bLinkMode);
}
void SAL_CALL
@@ -1147,7 +1164,8 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
{
if (pFmt)
{
- pRet[nProperty] <<= OUString(pFmt->GetSection()->GetName());
+ pRet[nProperty] <<=
+ OUString(pFmt->GetSection()->GetSectionName());
}
}
break;
@@ -1222,7 +1240,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
case WID_SECT_PASSWORD:
{
pRet[nProperty] <<= (m_bIsDescriptor)
- ? m_pProps->m_Password : pSect->GetPasswd();
+ ? m_pProps->m_Password : pSect->GetPassword();
}
break;
default:
@@ -1562,12 +1580,6 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
throw uno::RuntimeException();
}
- SwSection aSection(CONTENT_SECTION, aEmptyStr);
- SwSection *const pSect = (pFmt) ? pFmt->GetSection() : 0;
- if (pFmt)
- {
- aSection = *pSect;
- }
SfxItemPropertySimpleEntry const*const pEntry =
m_pImpl->m_rPropSet.getPropertyMap()->getByName(rPropertyName);
if (!pEntry)
@@ -1584,7 +1596,12 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
static_cast<cppu::OWeakObject *>(this));
}
+ ::std::auto_ptr<SwSectionData> const pSectionData(
+ (pFmt) ? new SwSectionData(*pFmt->GetSection()) : 0);
+
::std::auto_ptr<SfxItemSet> pNewAttrSet;
+ bool bLinkModeChanged = false;
+
switch (pEntry->nWID)
{
case WID_SECT_CONDITION:
@@ -1595,7 +1612,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
}
else
{
- aSection.SetCondition(aEmptyStr);
+ pSectionData->SetCondition(aEmptyStr);
}
}
break;
@@ -1604,10 +1621,27 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
case WID_SECT_DDE_ELEMENT :
case WID_SECT_LINK :
case WID_SECT_REGION :
- aSection.SetType(CONTENT_SECTION);
+ if (m_pImpl->m_bIsDescriptor)
+ {
+ m_pImpl->m_pProps->m_bDDE = false;
+ m_pImpl->m_pProps->m_sLinkFileName = ::rtl::OUString();
+ m_pImpl->m_pProps->m_sSectionRegion = ::rtl::OUString();
+ m_pImpl->m_pProps->m_sSectionFilter = ::rtl::OUString();
+ }
+ else
+ {
+ pSectionData->SetType(CONTENT_SECTION);
+ }
break;
case WID_SECT_DDE_AUTOUPDATE:
- aSection.SetUpdateType(sfx2::LINKUPDATE_ALWAYS);
+ if (m_pImpl->m_bIsDescriptor)
+ {
+ m_pImpl->m_pProps->m_bUpdateType = true;
+ }
+ else
+ {
+ bLinkModeChanged = true;
+ }
break;
case WID_SECT_VISIBLE :
{
@@ -1617,7 +1651,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
}
else
{
- aSection.SetHidden(FALSE);
+ pSectionData->SetHidden(false);
}
}
break;
@@ -1629,7 +1663,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
}
else
{
- aSection.SetProtect(FALSE);
+ pSectionData->SetProtectFlag(false);
}
}
break;
@@ -1642,7 +1676,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
}
else
{
- aSection.SetEditInReadonly(FALSE);
+ pSectionData->SetEditInReadonlyFlag(false);
}
}
break;
@@ -1678,25 +1712,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
}
}
- if (pFmt)
- {
- SwDoc *const pDoc = pFmt->GetDoc();
- const SwSectionFmts& rFmts = pDoc->GetSections();
- UnoActionContext aContext(pDoc);
- for (sal_uInt16 i = 0; i < rFmts.Count(); i++)
- {
- if (rFmts[i]->GetSection()->GetName() == pSect->GetName())
- {
- pDoc->ChgSection(i, aSection, pNewAttrSet.get(),
- pDoc->IsInReading());
- {
- // temporarily remove actions to allow cursor update
- UnoActionRemoveContext aRemoveContext( pDoc );
- }
- break;
- }
- }
- }
+ lcl_UpdateSection(pFmt, pSectionData, pNewAttrSet, bLinkModeChanged);
}
/*-- 08.11.00 10:47:56---------------------------------------------------
@@ -1737,7 +1753,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
case WID_SECT_DDE_AUTOUPDATE:
case WID_SECT_VISIBLE :
{
- sal_Bool bTemp = TRUE;
+ sal_Bool bTemp = sal_True;
aRet.setValue( &bTemp, ::getCppuBooleanType());
}
break;
@@ -1746,7 +1762,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
case WID_SECT_EDIT_IN_READONLY:
// <--
{
- sal_Bool bTemp = FALSE;
+ sal_Bool bTemp = sal_False;
aRet.setValue( &bTemp, ::getCppuBooleanType());
}
break;
@@ -1778,7 +1794,7 @@ OUString SAL_CALL SwXTextSection::getName() throw (uno::RuntimeException)
SwSectionFmt const*const pFmt = m_pImpl->GetSectionFmt();
if(pFmt)
{
- sRet = pFmt->GetSection()->GetName();
+ sRet = pFmt->GetSection()->GetSectionName();
}
else if (m_pImpl->m_bIsDescriptor)
{
@@ -1801,11 +1817,10 @@ throw (uno::RuntimeException)
SwSectionFmt *const pFmt = m_pImpl->GetSectionFmt();
if(pFmt)
{
- SwSection aSection(CONTENT_SECTION, aEmptyStr);
SwSection *const pSect = pFmt->GetSection();
- aSection = *pSect;
+ SwSectionData aSection(*pSect);
String sNewName(rName);
- aSection.SetName(sNewName);
+ aSection.SetSectionName(sNewName);
const SwSectionFmts& rFmts = pFmt->GetDoc()->GetSections();
sal_uInt16 nApplyPos = USHRT_MAX;
@@ -1815,7 +1830,7 @@ throw (uno::RuntimeException)
{
nApplyPos = i;
}
- else if(sNewName == rFmts[i]->GetSection()->GetName())
+ else if (sNewName == rFmts[i]->GetSection()->GetSectionName())
{
throw uno::RuntimeException();
}
@@ -1824,7 +1839,7 @@ throw (uno::RuntimeException)
{
{
UnoActionContext aContext(pFmt->GetDoc());
- pFmt->GetDoc()->ChgSection( nApplyPos, aSection);
+ pFmt->GetDoc()->UpdateSection(nApplyPos, aSection);
}
{
// temporarily remove actions to allow cursor update
@@ -1879,3 +1894,22 @@ SwXTextSection::getSupportedServiceNames() throw (uno::RuntimeException)
g_nServicesTextSection, g_ServicesTextSection);
}
+
+// MetadatableMixin
+::sfx2::Metadatable* SwXTextSection::GetCoreObject()
+{
+ SwSectionFmt *const pSectionFmt( m_pImpl->GetSectionFmt() );
+ return pSectionFmt;
+}
+
+uno::Reference<frame::XModel> SwXTextSection::GetModel()
+{
+ SwSectionFmt *const pSectionFmt( m_pImpl->GetSectionFmt() );
+ if (pSectionFmt)
+ {
+ SwDocShell const*const pShell( pSectionFmt->GetDoc()->GetDocShell() );
+ return (pShell) ? pShell->GetModel() : 0;
+ }
+ return 0;
+}
+
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 29519b292d..a63aa674b7 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -1659,9 +1659,14 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetNumberingRuleByIndex(
aPropertyValues.Insert(pData, aPropertyValues.Count());
}
Size aSize = rFmt.GetGraphicSize();
- aSize.Width() = TWIP_TO_MM100( aSize.Width() );
- aSize.Height() = TWIP_TO_MM100( aSize.Height() );
- pData = new PropValData((void*)&aSize, SW_PROP_NAME_STR(UNO_NAME_GRAPHIC_SIZE), ::getCppuType((const awt::Size*)0));
+ // --> OD 2010-05-04 #i101131# - applying patch from CMC
+ // adjust conversion due to type mismatch between <Size> and <awt::Size>
+// aSize.Width() = TWIP_TO_MM100( aSize.Width() );
+// aSize.Height() = TWIP_TO_MM100( aSize.Height() );
+// pData = new PropValData((void*)&aSize, SW_PROP_NAME_STR(UNO_NAME_GRAPHIC_SIZE), ::getCppuType((const awt::Size*)0));
+ awt::Size aAwtSize(TWIP_TO_MM100(aSize.Width()), TWIP_TO_MM100(aSize.Height()));
+ pData = new PropValData((void*)&aAwtSize, SW_PROP_NAME_STR(UNO_NAME_GRAPHIC_SIZE), ::getCppuType((const awt::Size*)0));
+ // <--
aPropertyValues.Insert(pData, aPropertyValues.Count());
const SwFmtVertOrient* pOrient = rFmt.GetGraphicOrientation();
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 8b0ceadc97..9dd21a4e88 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -494,6 +494,40 @@ String lcl_GetCellName( sal_Int32 nColumn, sal_Int32 nRow )
return sCellName;
}
+/** Find the top left or bottom right corner box in given table.
+ Consider nested lines when finding the box.
+
+ @param i_pTable the table
+
+ @param i_bTopLeft if true, find top left box, otherwise find bottom
+ right box
+ */
+
+const SwTableBox* lcl_FindCornerTableBox(const SwTableLines& rTableLines, const bool i_bTopLeft)
+{
+ bool bFirst = true;
+ const SwTableBox* pBox = 0;
+ do
+ {
+ const SwTableLines& rLines(bFirst ? rTableLines : pBox->GetTabLines());
+ bFirst = false;
+ OSL_ASSERT(rLines.Count() != 0);
+ if (rLines.Count() != 0)
+ {
+ const SwTableLine* pLine(rLines[i_bTopLeft ? 0 : rLines.Count() - 1]);
+ OSL_ASSERT(pLine);
+ const SwTableBoxes& rBoxes(pLine->GetTabBoxes());
+ OSL_ASSERT(rBoxes.Count() != 0);
+ pBox = rBoxes[i_bTopLeft ? 0 : rBoxes.Count() - 1];
+ OSL_ASSERT(pBox);
+ }
+ else
+ {
+ pBox = 0;
+ }
+ } while (pBox && !pBox->GetSttNd());
+ return pBox;
+}
/* -----------------21.11.05 14:46-------------------
@@ -3318,7 +3352,7 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName,
// hier muessen die Actions aufgehoben werden
UnoActionRemoveContext aRemoveContext(pDoc);
- SwTableBox* pTLBox = rLines[0]->GetTabBoxes()[0];
+ const SwTableBox* pTLBox = lcl_FindCornerTableBox(rLines, true);
const SwStartNode* pSttNd = pTLBox->GetSttNd();
SwPosition aPos(*pSttNd);
// Cursor in die obere linke Zelle des Ranges setzen
@@ -3326,9 +3360,9 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName,
pUnoCrsr->Move( fnMoveForward, fnGoNode );
pUnoCrsr->SetRemainInSection( sal_False );
- SwTableLine* pLastLine = rLines[rLines.Count() - 1];
- SwTableBoxes &rBoxes = pLastLine->GetTabBoxes();
- const SwTableBox* pBRBox = rBoxes[rBoxes.Count() -1];
+
+
+ const SwTableBox* pBRBox = lcl_FindCornerTableBox(rLines, false);
pUnoCrsr->SetMark();
pUnoCrsr->GetPoint()->nNode = *pBRBox->GetSttNd();
pUnoCrsr->Move( fnMoveForward, fnGoNode );
@@ -3514,7 +3548,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be
// hier muessen die Actions aufgehoben werden
UnoActionRemoveContext aRemoveContext(pDoc);
- SwTableBox* pTLBox = rLines[0]->GetTabBoxes()[0];
+ const SwTableBox* pTLBox = lcl_FindCornerTableBox(rLines, true);
const SwStartNode* pSttNd = pTLBox->GetSttNd();
SwPosition aPos(*pSttNd);
// Cursor in die obere linke Zelle des Ranges setzen
@@ -3522,11 +3556,11 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be
pUnoCrsr->Move( fnMoveForward, fnGoNode );
pUnoCrsr->SetRemainInSection( sal_False );
- SwTableLine* pLastLine = rLines[rLines.Count() - 1];
- SwTableBoxes &rBoxes = pLastLine->GetTabBoxes();
- const SwTableBox* pBRBox = rBoxes[rBoxes.Count() -1];
+ const SwTableBox* pBRBox = lcl_FindCornerTableBox(rLines, false);
pUnoCrsr->SetMark();
- pUnoCrsr->GetPoint()->nNode = *pBRBox->GetSttNd();
+ const SwStartNode* pLastNd = pBRBox->GetSttNd();
+ pUnoCrsr->GetPoint()->nNode = *pLastNd;
+
pUnoCrsr->Move( fnMoveForward, fnGoNode );
SwUnoTableCrsr* pCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
pCrsr->MakeBoxSels();
@@ -4448,41 +4482,6 @@ void SwXCellRange::GetDataSequence(
pDblSeq->realloc( nDtaCnt );
}
-/*-- 04.06.04 11:42:47---------------------------------------------------
-
- -----------------------------------------------------------------------*/
-
-SwUnoCrsr * lcl_CreateCursor( SwFrmFmt &rTblFmt,
- SwTableBox *pStartBox, // should be top-left cell of cell range
- SwTableBox *pEndBox ) // should be bottom right-cell cell range
-{
- // create a *new* UNO cursor spanning the cell range defined by
- // the start and end box. Both boxes must be belong to the same table!
-
- SwUnoCrsr *pUnoCrsr = 0;
- if (pStartBox && pEndBox)
- {
- // hier muessen die Actions aufgehoben werden um
- // (zB dem Layout zu ermöglichen die Tabelle zu formatieren, da
- // sonst kein Tabellen Cursor aufgespannt werden kann.)
- UnoActionRemoveContext aRemoveContext(rTblFmt.GetDoc());
-
- // set point of cursor to top left box of range
- const SwStartNode* pSttNd = pStartBox->GetSttNd();
- SwPosition aPos(*pSttNd);
- pUnoCrsr = rTblFmt.GetDoc()->CreateUnoCrsr(aPos, sal_True);
- pUnoCrsr->Move( fnMoveForward, fnGoNode );
- pUnoCrsr->SetRemainInSection( sal_False );
- pUnoCrsr->SetMark();
- pUnoCrsr->GetPoint()->nNode = *pEndBox->GetSttNd();
- pUnoCrsr->Move( fnMoveForward, fnGoNode );
- SwUnoTableCrsr *pCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
- pCrsr->MakeBoxSels();
- }
- return pUnoCrsr;
-}
-
-
/*-- 29.04.02 11:42:47---------------------------------------------------
-----------------------------------------------------------------------*/
diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx
index ac92c83d85..ada913cc67 100644
--- a/sw/source/core/view/viewimp.cxx
+++ b/sw/source/core/view/viewimp.cxx
@@ -430,7 +430,7 @@ void SwViewImp::DisposeAccessible( const SwFrm *pFrm,
do
{
if( pTmp->Imp()->IsAccessible() )
- pTmp->Imp()->GetAccessibleMap().Dispose( pFrm, pObj, bRecursive );
+ pTmp->Imp()->GetAccessibleMap().Dispose( pFrm, pObj, 0, bRecursive );
pTmp = (ViewShell *)pTmp->GetNext();
} while ( pTmp != pVSh );
}
@@ -444,7 +444,7 @@ void SwViewImp::MoveAccessible( const SwFrm *pFrm, const SdrObject *pObj,
do
{
if( pTmp->Imp()->IsAccessible() )
- pTmp->Imp()->GetAccessibleMap().InvalidatePosOrSize( pFrm, pObj,
+ pTmp->Imp()->GetAccessibleMap().InvalidatePosOrSize( pFrm, pObj, 0,
rOldFrm );
pTmp = (ViewShell *)pTmp->GetNext();
} while ( pTmp != pVSh );
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index c4b413bb6c..8ade4aea5d 100755..100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -860,21 +860,6 @@ void ViewShell::SetTabCompat( bool bNew )
}
}
-/*-- 29.11.2007 09:03:18---------------------------------------------------
- //#i24363# tab stops relative to indent
- -----------------------------------------------------------------------*/
-void ViewShell::SetTabsRelativeToIndent(bool bNew)
-{
- IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
- if( pIDSA->get(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT) != bNew )
- {
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
- pIDSA->set(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT, bNew );
- const BYTE nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
- lcl_InvalidateAllCntnt( *this, nInv );
- }
-}
-
void ViewShell::SetAddExtLeading( bool bNew )
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
@@ -1231,16 +1216,23 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
SwTwips nPageLeft = 0;
SwTwips nPageRight = 0;
- if (pPage->MarginSide())
- {
- nPageLeft = aPageRect.Left() - nBorderWidth - nSidebarWidth;
- nPageRight = aPageRect.Right() + nBorderWidth + nShadowWidth;
- }
- else
+ switch ( pPage->SidebarPosition() )
{
- // OD 03.03.2003 #107927# - use correct datatype
- nPageLeft = aPageRect.Left() - nBorderWidth;
- nPageRight = aPageRect.Right() + nBorderWidth + nShadowWidth + nSidebarWidth;
+ case sw::sidebarwindows::SIDEBAR_LEFT:
+ {
+ nPageLeft = aPageRect.Left() - nBorderWidth - nSidebarWidth;
+ nPageRight = aPageRect.Right() + nBorderWidth + nShadowWidth;
+ }
+ break;
+ case sw::sidebarwindows::SIDEBAR_RIGHT:
+ {
+ nPageLeft = aPageRect.Left() - nBorderWidth;
+ nPageRight = aPageRect.Right() + nBorderWidth + nShadowWidth + nSidebarWidth;
+ }
+ break;
+ case sw::sidebarwindows::SIDEBAR_NONE:
+ // nothing to do
+ break;
}
if( nPageLeft < nMinLeft )
nMinLeft = nPageLeft;
@@ -1310,6 +1302,15 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
}
GetWin()->Update();
+ // --> OD 2010-02-11 #i88070#
+ if ( pPostItMgr )
+ {
+ pPostItMgr->Rescale();
+ pPostItMgr->CalcRects();
+ pPostItMgr->LayoutPostIts();
+ }
+ // <--
+
if ( !bScrolled && pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() )
pPostItMgr->CorrectPositions();
@@ -1708,7 +1709,8 @@ void ViewShell::PaintDesktop( const SwRect &rRect )
aPageRect.SSize() = rFormatPage.Frm().SSize();
}
- const bool bSidebarRight = !static_cast<const SwPageFrm*>(pPage)->MarginSide();
+ const bool bSidebarRight =
+ static_cast<const SwPageFrm*>(pPage)->SidebarPosition() == sw::sidebarwindows::SIDEBAR_RIGHT;
aPageRect.Pos().X() -= bSidebarRight ? 0 : nSidebarWidth;
aPageRect.SSize().Width() += nSidebarWidth;
@@ -2591,6 +2593,15 @@ void ViewShell::InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm )
}
}
+SwAccessibleMap* ViewShell::GetAccessibleMap()
+{
+ if ( Imp()->IsAccessible() )
+ {
+ return &(Imp()->GetAccessibleMap());
+ }
+
+ return 0;
+}
/* -----------------------------06.05.2002 13:23------------------------------
---------------------------------------------------------------------------*/
diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx
index 675c59c727..280ecf1166 100644
--- a/sw/source/filter/ascii/ascatr.cxx
+++ b/sw/source/filter/ascii/ascatr.cxx
@@ -124,7 +124,8 @@ BOOL SwASC_AttrIter::OutAttr( xub_StrLen nSwPos )
switch( pHt->Which() )
{
case RES_TXTATR_FIELD:
- sOut = ((SwTxtFld*)pHt)->GetFld().GetFld()->Expand();
+ sOut = static_cast<SwTxtFld const*>(pHt)->GetFld().GetFld()
+ ->ExpandField(rWrt.pDoc->IsClipBoard());
break;
case RES_TXTATR_FTN:
@@ -169,7 +170,14 @@ static Writer& OutASC_SwTxtNode( Writer& rWrt, SwCntntNode& rNode )
SwASC_AttrIter aAttrIter( (SwASCWriter&)rWrt, rNd, nStrPos );
if( !nStrPos && rWrt.bExportPargraphNumbering )
- rWrt.Strm().WriteUnicodeOrByteText( rNd.GetNumString() );
+ {
+ String numString( rNd.GetNumString() );
+ if (numString.Len())
+ {
+ numString.Append(' ');
+ rWrt.Strm().WriteUnicodeOrByteText(numString);
+ }
+ }
String aStr( rNd.GetTxt() );
if( rWrt.bASCII_ParaAsBlanc )
diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx
index cc0ee03a24..32234b7929 100644
--- a/sw/source/filter/html/htmlfldw.cxx
+++ b/sw/source/filter/html/htmlfldw.cxx
@@ -305,7 +305,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
}
// Inhalt des Feldes ausgeben
- String sExpand( pFld->Expand() );
+ String const sExpand( pFld->ExpandField(rWrt.pDoc->IsClipBoard()) );
sal_Bool bNeedsCJKProcessing = sal_False;
if( sExpand.Len() )
{
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index b1e770edec..b24a2bc3bf 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -547,18 +547,20 @@ void SwHTMLImageWatcher::init( sal_Int32 Width, sal_Int32 Height )
0 != (pANd = pDoc->GetNodes()[pAPos->nNode]) &&
0 != (pTblNd = pANd->FindTableNode()) )
{
- sal_Bool bLastGrf = !pTblNd->GetTable().DecGrfsThatResize();
+ const sal_Bool bLastGrf = !pTblNd->GetTable().DecGrfsThatResize();
SwHTMLTableLayout *pLayout =
pTblNd->GetTable().GetHTMLTableLayout();
if( pLayout )
{
- sal_uInt16 nBrowseWidth =
+ const sal_uInt16 nBrowseWidth =
pLayout->GetBrowseWidthByTable( *pDoc );
- if( nBrowseWidth )
+ if ( nBrowseWidth )
+ {
pLayout->Resize( nBrowseWidth, sal_True, sal_True,
bLastGrf ? HTMLTABLE_RESIZE_NOW
: 500 );
+ }
}
}
}
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index 1ed47d60c9..c9fa4bd875 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -28,26 +28,19 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+#include <rtl/uri.hxx>
-
-
-#include "hintids.hxx"
-
-#ifndef _APP_HXX //autogen
+#include <svl/urihelper.hxx>
#include <vcl/svapp.hxx>
-#endif
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <editeng/adjitem.hxx>
#include <editeng/ulspitem.hxx>
#include <editeng/brkitem.hxx>
#include <svtools/htmltokn.h>
-#ifndef _HTMLKYWD_H
#include <svtools/htmlkywd.hxx>
-#endif
#include <sfx2/linkmgr.hxx>
-#include <rtl/uri.hxx>
+
+#include "hintids.hxx"
#include <fmtornt.hxx>
#include <fmthdft.hxx>
#include <fmtcntnt.hxx>
@@ -69,7 +62,6 @@
#include "viewsh.hxx"
#include "swcss1.hxx"
#include "swhtml.hxx"
-#include <svl/urihelper.hxx>
#define CONTEXT_FLAGS_MULTICOL (HTML_CNTXT_STRIP_PARA | \
HTML_CNTXT_KEEP_NUMRULE | \
@@ -321,12 +313,12 @@ void SwHTMLParser::NewDivision( int nToken )
aHRef = aURL;
}
- SwSection aSection( aHRef.Len() ? FILE_LINK_SECTION
+ SwSectionData aSection( (aHRef.Len()) ? FILE_LINK_SECTION
: CONTENT_SECTION, aName );
if( aHRef.Len() )
{
aSection.SetLinkFileName( aHRef );
- aSection.SetProtect();
+ aSection.SetProtectFlag(true);
}
SfxItemSet aFrmItemSet( pDoc->GetAttrPool(),
@@ -348,7 +340,7 @@ void SwHTMLParser::NewDivision( int nToken )
aItemSet.ClearItem( RES_FRAMEDIR );
}
- pDoc->InsertSwSection( *pPam, aSection, &aFrmItemSet, false );
+ pDoc->InsertSwSection( *pPam, aSection, 0, &aFrmItemSet, false );
// ggfs. einen Bereich anspringen
if( JUMPTO_REGION == eJumpTo && aName == sJmpMark )
@@ -708,7 +700,7 @@ void SwHTMLParser::NewMultiCol()
// Make section name unique.
String aName( pDoc->GetUniqueSectionName( aId.Len() ? &aId : 0 ) );
- SwSection aSection( CONTENT_SECTION, aName );
+ SwSectionData aSection( CONTENT_SECTION, aName );
SfxItemSet aFrmItemSet( pDoc->GetAttrPool(),
RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
@@ -743,7 +735,7 @@ void SwHTMLParser::NewMultiCol()
aFrmItemSet.Put( *pItem );
aItemSet.ClearItem( RES_FRAMEDIR );
}
- pDoc->InsertSwSection( *pPam, aSection, &aFrmItemSet, false );
+ pDoc->InsertSwSection( *pPam, aSection, 0, &aFrmItemSet, false );
// Jump to section, if this is requested.
if( JUMPTO_REGION == eJumpTo && aName == sJmpMark )
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index df4d1df236..a15300b76c 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -4957,7 +4957,7 @@ USHORT SwHTMLParser::ToTwips( USHORT nPixel ) const
SwTwips SwHTMLParser::GetCurrentBrowseWidth()
{
- SwTwips nWidth = SwHTMLTableLayout::GetBrowseWidth( *pDoc );
+ const SwTwips nWidth = SwHTMLTableLayout::GetBrowseWidth( *pDoc );
if( nWidth )
return nWidth;
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 0882f46e3c..8c84dd9777 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -313,7 +313,8 @@ ULONG SwHTMLWriter::WriteStream()
// nur das Tag fuer die Section merken
ByteString aName;
- HTMLOutFuncs::ConvertStringToHTML( pSNd->GetSection().GetName(),
+ HTMLOutFuncs::ConvertStringToHTML(
+ pSNd->GetSection().GetSectionName(),
aName, eDestEnc, &aNonConvertableCharacters );
ByteString sOut( '<' );
@@ -541,7 +542,7 @@ void lcl_html_OutSectionStartTag( SwHTMLWriter& rHTMLWrt,
ByteString sOut( '<' );
sOut += pTag;
- const String& rName = rSection.GetName();
+ const String& rName = rSection.GetSectionName();
if( rName.Len() && !bContinued )
{
((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_id) += "=\"";
diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx
index 75d888bc28..80ac259265 100644
--- a/sw/source/filter/inc/fltshell.hxx
+++ b/sw/source/filter/inc/fltshell.hxx
@@ -255,14 +255,15 @@ public:
class SwFltSection : public SfxPoolItem
{
- SwSection* pSection;
+ SwSectionData * m_pSection;
+
public:
- SwFltSection( SwSection* pSect );
+ SwFltSection( SwSectionData *const pSect );
SwFltSection( const SwFltSection& );
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==(const SfxPoolItem&) const;
virtual SfxPoolItem* Clone(SfxItemPool* = 0) const;
- SwSection* GetSection() { return pSection; }
+ SwSectionData * GetSectionData() { return m_pSection; }
};
// Der WWEndStack verhaelt sich wie der WWControlStck, nur dass die Attribute
// auf ihm bis ans Ende des Dokuments gehortet werden, falls auf sie noch
diff --git a/sw/source/filter/rtf/rtfatr.cxx b/sw/source/filter/rtf/rtfatr.cxx
index 528b0d82d1..a2fd2dd3f0 100644
--- a/sw/source/filter/rtf/rtfatr.cxx
+++ b/sw/source/filter/rtf/rtfatr.cxx
@@ -510,12 +510,12 @@ void OutRTF_SwFlyFrmFmt( SwRTFWriter& rRTFWrt )
// ueberhaupt eigene Attribute gibt !
SvMemoryStream aTmpStrm;
SvStream* pSaveStrm = &rRTFWrt.Strm();
- rRTFWrt.SetStrm( aTmpStrm );
+ rRTFWrt.SetStream( &aTmpStrm );
rRTFWrt.bRTFFlySyntax = false;
OutRTF_SwFmt( rRTFWrt, *rRTFWrt.pFlyFmt );
- rRTFWrt.SetStrm( *pSaveStrm ); // Stream-Pointer wieder zurueck
+ rRTFWrt.SetStream( pSaveStrm ); // Stream-Pointer wieder zurueck
if ( aTmpStrm.GetEndOfData() ) // gibt es SWG spezifische Attribute?
{
@@ -2902,7 +2902,8 @@ static Writer& OutRTF_SwField( Writer& rWrt, const SfxPoolItem& rHt )
case RES_HIDDENTXTFLD:
if( TYP_CONDTXTFLD == ((SwHiddenTxtField*)pFld)->GetSubType() )
- RTFOutFuncs::Out_String( rWrt.Strm(), pFld->Expand(),
+ RTFOutFuncs::Out_String( rWrt.Strm(),
+ pFld->ExpandField(rWrt.pDoc->IsClipBoard()),
rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt );
else
{
@@ -2958,7 +2959,8 @@ static Writer& OutRTF_SwField( Writer& rWrt, const SfxPoolItem& rHt )
rWrt.Strm() >> cCh;
if( ' ' != cCh ) // vorweg immer einen Trenner
rWrt.Strm() << ' ';
- RTFOutFuncs::Out_String( rWrt.Strm(), pFld->Expand(),
+ RTFOutFuncs::Out_String( rWrt.Strm(),
+ pFld->ExpandField(rWrt.pDoc->IsClipBoard()),
rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt );
}
break;
@@ -2967,7 +2969,8 @@ static Writer& OutRTF_SwField( Writer& rWrt, const SfxPoolItem& rHt )
if( aFldStt.Len() )
{
rWrt.Strm() << "}{" << OOO_STRING_SVTOOLS_RTF_FLDRSLT << ' ';
- RTFOutFuncs::Out_String( rWrt.Strm(), pFld->Expand(),
+ RTFOutFuncs::Out_String( rWrt.Strm(),
+ pFld->ExpandField(rWrt.pDoc->IsClipBoard()),
rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt );
rWrt.Strm() << "}}";
rRTFWrt.bOutFmtAttr = FALSE;
diff --git a/sw/source/filter/rtf/rtffly.cxx b/sw/source/filter/rtf/rtffly.cxx
index 09516bd871..260762fbf2 100644
--- a/sw/source/filter/rtf/rtffly.cxx
+++ b/sw/source/filter/rtf/rtffly.cxx
@@ -1169,8 +1169,8 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
SwTxtNode* pTxtNd = pFlySave->nSttNd.GetNode().GetTxtNode();
SwTxtFlyCnt* pFlyCnt = 0;
if( 1 == pTxtNd->GetTxt().Len() &&
- 0 != ( pFlyCnt = (SwTxtFlyCnt*)pTxtNd->GetTxtAttr(
- 0, RES_TXTATR_FLYCNT )) &&
+ 0 != (pFlyCnt = static_cast<SwTxtFlyCnt*>(
+ pTxtNd->GetTxtAttrForCharAt(0, RES_TXTATR_FLYCNT))) &&
pFlyCnt->GetFlyCnt().GetFrmFmt() )
{
// then move the content into the surrounded fly
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index 5e4fb1b34c..e437f2450e 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -829,7 +829,8 @@ void rtfSections::SetHdFt(rtfSection &rSection)
SwSectionFmt *rtfSections::InsertSection(SwPaM& rMyPaM, rtfSection &rSection)
{
- SwSection aSection(CONTENT_SECTION, mrReader.pDoc->GetUniqueSectionName());
+ SwSectionData aSectionData(CONTENT_SECTION,
+ mrReader.pDoc->GetUniqueSectionName());
SfxItemSet aSet( mrReader.pDoc->GetAttrPool(), aFrmFmtSetRange );
@@ -838,7 +839,7 @@ SwSectionFmt *rtfSections::InsertSection(SwPaM& rMyPaM, rtfSection &rSection)
nRTLPgn ? FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR));
rSection.mpSection =
- mrReader.pDoc->InsertSwSection( rMyPaM, aSection, &aSet );
+ mrReader.pDoc->InsertSwSection( rMyPaM, aSectionData, 0, &aSet );
ASSERT(rSection.mpSection, "section not inserted!");
if (!rSection.mpSection)
return 0;
@@ -1598,79 +1599,6 @@ USHORT SwRTFParser::ReadRevTbl()
return nAuthorTableIndex;
}
-// #117910# simulate words behaviour of \keepn in table rows
-void fixKeepAndSplitAttributes(SwTableNode *pTableNode)
-{
- ASSERT(pTableNode!=NULL, "no table node!");
- if (!pTableNode) return;
- SwDoc *pDoc=pTableNode->GetDoc();
- if (pTableNode==NULL) return;
- SwTable& rTable=pTableNode->GetTable();
- SwTableLines& rLns = rTable.GetTabLines();
- USHORT nLines=rLns.Count();
- if (nLines==0) return;
- // get first paragaph in left down-most box
- SwTableLine* pLastLine = rLns[ nLines-1 ];
- SwTableBox* pBox = pLastLine->GetTabBoxes()[ 0 ];
- ULONG iFirstParagraph=pBox->GetSttIdx()+1;
- SwTxtNode *pTxtNode=(SwTxtNode *)pDoc->GetNodes()[iFirstParagraph];
- SwFrmFmt* pFmt=rTable.GetFrmFmt();
-
- SwFmtLayoutSplit *pTableSplit=(SwFmtLayoutSplit *)pFmt->GetAttrSet().GetItem(RES_LAYOUT_SPLIT);
- BOOL isTableKeep = pTableSplit!=NULL && !pTableSplit->GetValue();
- SvxFmtKeepItem *pTableKeep=(SvxFmtKeepItem *)pFmt->GetAttrSet().GetItem(RES_KEEP);
- BOOL isTableKeepNext = pTableKeep!=NULL && pTableKeep->GetValue();
- SvxFmtKeepItem *pKeepNext = (SvxFmtKeepItem *)pTxtNode->GetSwAttrSet().GetItem(RES_KEEP);
-
- if (isTableKeepNext)
- {
- if (nLines>2 && !isTableKeep)
- { // split
- SwTableLine* pSplitLine = rLns[ nLines-2 ];
- SwTableBox* pSplitBox = pSplitLine->GetTabBoxes()[ 0 ];
- SwNodeIndex aSplitIdx( *pSplitBox->GetSttNd() );
- pDoc->SplitTable( SwPosition(aSplitIdx), HEADLINE_NONE,
- !isTableKeep );
- SwTable& rSplitTable=aSplitIdx.GetNode().FindTableNode()->GetTable();
- aSplitIdx-=2;
- pDoc->GetNodes().Delete(aSplitIdx);
- pFmt=rSplitTable.GetFrmFmt();
- pFmt->ResetFmtAttr(RES_PAGEDESC);
- }
- // set keep=1(i.e. split=0) attribut
- SwFmtLayoutSplit aSplit(0);
- SwAttrSet aNewSet(pFmt->GetAttrSet());
- aNewSet.Put(aSplit);
- pFmt->SetFmtAttr(aNewSet);
- }
- else // !isTableKeepNext
- {
- if (isTableKeep)
- {
- SwNodeIndex aTmpIdx( *pBox->GetSttNd() );
- pDoc->SplitTable( SwPosition(aTmpIdx), HEADLINE_NONE, FALSE );
- SwTable& rSplitTable=aTmpIdx.GetNode().FindTableNode()->GetTable();
- aTmpIdx-=2;
- pDoc->GetNodes().Delete(aTmpIdx);
- pFmt=rSplitTable.GetFrmFmt();
- pFmt->ResetFmtAttr(RES_PAGEDESC);
- }
- // set keep=0(i.e. split=1) attribut
- SwFmtLayoutSplit aSplit(1);
- SwAttrSet aNewSet(pFmt->GetAttrSet());
- aNewSet.Put(aSplit);
- pFmt->SetFmtAttr(aNewSet);
- }
- // move keepnext attribtue from last paragraph to table
- if (pKeepNext!=NULL)
- {
- SvxFmtKeepItem aNewKeepItem(pKeepNext->GetValue(), RES_KEEP);
- SwAttrSet aNewSet(pFmt->GetAttrSet());
- aNewSet.Put(aNewKeepItem);
- pFmt->SetFmtAttr(aNewSet);
- }
-}
-
void SwRTFParser::NextToken( int nToken )
{
USHORT eDateFmt;
diff --git a/sw/source/filter/rtf/wrtrtf.cxx b/sw/source/filter/rtf/wrtrtf.cxx
index bf2b81e5b7..31c77c5f86 100644
--- a/sw/source/filter/rtf/wrtrtf.cxx
+++ b/sw/source/filter/rtf/wrtrtf.cxx
@@ -85,9 +85,6 @@ const sal_Char SwRTFWriter::sNewLine = '\012';
const sal_Char __FAR_DATA SwRTFWriter::sNewLine[] = "\015\012";
#endif
-static ::rtl::OUString aEmpty;
-
-
SV_DECL_VARARR( RTFColorTbl, Color, 5, 8 )
SV_IMPL_VARARR( RTFColorTbl, Color )
@@ -1302,6 +1299,7 @@ void SwRTFWriter::OutBookmarks( xub_StrLen nCntntPos)
OutComment( *this, OOO_STRING_SVTOOLS_RTF_BKMKEND ) << ' ';
{
+ ::rtl::OUString aEmpty;
::rtl::OUString & rBookmarkName = aEmpty;
if (pAsBookmark)
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx
index 298711b23f..8e7f67997c 100644
--- a/sw/source/filter/writer/writer.cxx
+++ b/sw/source/filter/writer/writer.cxx
@@ -58,19 +58,22 @@ DECLARE_TABLE( SwBookmarkNodeTable, SvPtrarr* )
struct Writer_Impl
{
+ SvStream * m_pStream;
+
SvStringsSortDtor *pSrcArr, *pDestArr;
SvPtrarr* pFontRemoveLst, *pBkmkArr;
SwBookmarkNodeTable* pBkmkNodePos;
- Writer_Impl( const SwDoc& rDoc );
+ Writer_Impl();
~Writer_Impl();
void RemoveFontList( SwDoc& rDoc );
void InsertBkmk( const ::sw::mark::IMark& rBkmk );
};
-Writer_Impl::Writer_Impl( const SwDoc& /*rDoc*/ )
- : pSrcArr( 0 ), pDestArr( 0 ), pFontRemoveLst( 0 ), pBkmkNodePos( 0 )
+Writer_Impl::Writer_Impl()
+ : m_pStream(0)
+ , pSrcArr( 0 ), pDestArr( 0 ), pFontRemoveLst( 0 ), pBkmkNodePos( 0 )
{
}
@@ -141,7 +144,8 @@ void Writer_Impl::InsertBkmk(const ::sw::mark::IMark& rBkmk)
*/
Writer::Writer()
- : pImpl(0), pStrm(0), pOrigPam(0), pOrigFileName(0), pDoc(0), pCurPam(0)
+ : m_pImpl(new Writer_Impl)
+ , pOrigPam(0), pOrigFileName(0), pDoc(0), pCurPam(0)
{
bWriteAll = bShowProgress = bUCS2_WithStartChar = true;
bASCII_NoLastLineEnd = bASCII_ParaAsBlanc = bASCII_ParaAsCR =
@@ -164,9 +168,11 @@ const IDocumentStylePoolAccess* Writer::getIDocumentStylePoolAccess() const { re
void Writer::ResetWriter()
{
- if( pImpl && pImpl->pFontRemoveLst )
- pImpl->RemoveFontList( *pDoc );
- delete pImpl, pImpl = 0;
+ if (m_pImpl->pFontRemoveLst)
+ {
+ m_pImpl->RemoveFontList( *pDoc );
+ }
+ m_pImpl.reset(new Writer_Impl);
if( pCurPam )
{
@@ -177,7 +183,6 @@ void Writer::ResetWriter()
pCurPam = 0;
pOrigFileName = 0;
pDoc = 0;
- pStrm = 0;
bShowProgress = bUCS2_WithStartChar = TRUE;
bASCII_NoLastLineEnd = bASCII_ParaAsBlanc = bASCII_ParaAsCR =
@@ -246,13 +251,14 @@ SwPaM* Writer::NewSwPaM( SwDoc & rDoc, ULONG nStartIdx, ULONG nEndIdx,
/////////////////////////////////////////////////////////////////////////////
// Stream-spezifisches
-#ifdef DBG_UTIL
SvStream& Writer::Strm()
{
- ASSERT( pStrm, "Oh-oh. Dies ist ein Storage-Writer. Gleich knallts!" );
- return *pStrm;
+ ASSERT( m_pImpl->m_pStream, "Oh-oh. Writer with no Stream!" );
+ return *m_pImpl->m_pStream;
}
-#endif
+
+void Writer::SetStream(SvStream *const pStream)
+{ m_pImpl->m_pStream = pStream; }
SvStream& Writer::OutHex( SvStream& rStrm, ULONG nHex, BYTE nLen )
@@ -314,10 +320,9 @@ ULONG Writer::Write( SwPaM& rPaM, SvStream& rStrm, const String* pFName )
return nResult;
}
- pStrm = &rStrm;
pDoc = rPaM.GetDoc();
pOrigFileName = pFName;
- pImpl = new Writer_Impl( *pDoc );
+ m_pImpl->m_pStream = &rStrm;
// PaM kopieren, damit er veraendert werden kann
pCurPam = new SwPaM( *rPaM.End(), *rPaM.Start() );
@@ -368,20 +373,20 @@ BOOL Writer::CopyLocalFileToINet( String& rFileNm )
INET_PROT_NEWS >= aTargetUrl.GetProtocol() ) )
return bRet;
- if( pImpl->pSrcArr )
+ if (m_pImpl->pSrcArr)
{
// wurde die Datei schon verschoben
USHORT nPos;
- if( pImpl->pSrcArr->Seek_Entry( &rFileNm, &nPos ))
+ if (m_pImpl->pSrcArr->Seek_Entry( &rFileNm, &nPos ))
{
- rFileNm = *(*pImpl->pDestArr)[ nPos ];
+ rFileNm = *(*m_pImpl->pDestArr)[ nPos ];
return TRUE;
}
}
else
{
- pImpl->pSrcArr = new SvStringsSortDtor( 4, 4 );
- pImpl->pDestArr = new SvStringsSortDtor( 4, 4 );
+ m_pImpl->pSrcArr = new SvStringsSortDtor( 4, 4 );
+ m_pImpl->pDestArr = new SvStringsSortDtor( 4, 4 );
}
String *pSrc = new String( rFileNm );
@@ -400,8 +405,8 @@ BOOL Writer::CopyLocalFileToINet( String& rFileNm )
if( bRet )
{
- pImpl->pSrcArr->Insert( pSrc );
- pImpl->pDestArr->Insert( pDest );
+ m_pImpl->pSrcArr->Insert( pSrc );
+ m_pImpl->pDestArr->Insert( pDest );
rFileNm = *pDest;
}
else
@@ -415,9 +420,6 @@ BOOL Writer::CopyLocalFileToINet( String& rFileNm )
void Writer::PutNumFmtFontsInAttrPool()
{
- if( !pImpl )
- pImpl = new Writer_Impl( *pDoc );
-
// dann gibt es noch in den NumRules ein paar Fonts
// Diese in den Pool putten. Haben sie danach einen RefCount > 1
// kann es wieder entfernt werden - ist schon im Pool
@@ -457,9 +459,6 @@ void Writer::PutNumFmtFontsInAttrPool()
void Writer::PutEditEngFontsInAttrPool( BOOL bIncl_CJK_CTL )
{
- if( !pImpl )
- pImpl = new Writer_Impl( *pDoc );
-
SfxItemPool& rPool = pDoc->GetAttrPool();
if( rPool.GetSecondaryPool() )
{
@@ -474,9 +473,6 @@ void Writer::PutEditEngFontsInAttrPool( BOOL bIncl_CJK_CTL )
void Writer::PutCJKandCTLFontsInAttrPool()
{
- if( !pImpl )
- pImpl = new Writer_Impl( *pDoc );
-
SfxItemPool& rPool = pDoc->GetAttrPool();
_AddFontItems( rPool, RES_CHRATR_CJK_FONT );
_AddFontItems( rPool, RES_CHRATR_CTL_FONT );
@@ -513,11 +509,13 @@ void Writer::_AddFontItem( SfxItemPool& rPool, const SvxFontItem& rFont )
rPool.Remove( *pItem );
else
{
- if( !pImpl->pFontRemoveLst )
- pImpl->pFontRemoveLst = new SvPtrarr( 0, 10 );
+ if (!m_pImpl->pFontRemoveLst)
+ {
+ m_pImpl->pFontRemoveLst = new SvPtrarr( 0, 10 );
+ }
void* p = (void*)pItem;
- pImpl->pFontRemoveLst->Insert( p, pImpl->pFontRemoveLst->Count() );
+ m_pImpl->pFontRemoveLst->Insert( p, m_pImpl->pFontRemoveLst->Count() );
}
}
@@ -529,7 +527,9 @@ void Writer::CreateBookmarkTbl()
for(IDocumentMarkAccess::const_iterator_t ppBkmk = pMarkAccess->getBookmarksBegin();
ppBkmk != pMarkAccess->getBookmarksEnd();
++ppBkmk)
- pImpl->InsertBkmk(**ppBkmk);
+ {
+ m_pImpl->InsertBkmk(**ppBkmk);
+ }
}
@@ -540,7 +540,8 @@ USHORT Writer::GetBookmarks(const SwCntntNode& rNd, xub_StrLen nStt,
ASSERT( !rArr.Count(), "es sind noch Eintraege vorhanden" );
ULONG nNd = rNd.GetIndex();
- SvPtrarr* pArr = pImpl->pBkmkNodePos ? pImpl->pBkmkNodePos->Get( nNd ) : 0;
+ SvPtrarr* pArr = (m_pImpl->pBkmkNodePos) ?
+ m_pImpl->pBkmkNodePos->Get( nNd ) : 0;
if( pArr )
{
// there exist some bookmarks, search now all which is in the range
@@ -586,11 +587,10 @@ ULONG StgWriter::WriteStream()
ULONG StgWriter::Write( SwPaM& rPaM, SvStorage& rStg, const String* pFName )
{
- pStrm = 0;
+ SetStream(0);
pStg = &rStg;
pDoc = rPaM.GetDoc();
pOrigFileName = pFName;
- pImpl = new Writer_Impl( *pDoc );
// PaM kopieren, damit er veraendert werden kann
pCurPam = new SwPaM( *rPaM.End(), *rPaM.Start() );
@@ -607,12 +607,11 @@ ULONG StgWriter::Write( SwPaM& rPaM, SvStorage& rStg, const String* pFName )
ULONG StgWriter::Write( SwPaM& rPaM, const uno::Reference < embed::XStorage >& rStg, const String* pFName, SfxMedium* pMedium )
{
- pStrm = 0;
+ SetStream(0);
pStg = 0;
xStg = rStg;
pDoc = rPaM.GetDoc();
pOrigFileName = pFName;
- pImpl = new Writer_Impl( *pDoc );
// PaM kopieren, damit er veraendert werden kann
pCurPam = new SwPaM( *rPaM.End(), *rPaM.Start() );
diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx
index 09ca0d7f13..c411dc6c80 100644
--- a/sw/source/filter/ww1/fltshell.cxx
+++ b/sw/source/filter/ww1/fltshell.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -420,7 +420,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
switch(pEntry->pAttr->Which())
{
case RES_FLTR_ANCHOR:
- {
+ {
SwFrmFmt* pFmt = ((SwFltAnchor*)pEntry->pAttr)->GetFrmFmt();
if (pFmt != NULL)
{
@@ -559,9 +559,9 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
case RES_FLTR_SECTION:
MakePoint(pEntry, pDoc, aRegion); // bislang immer Point==Mark
pDoc->InsertSwSection(aRegion,
- *(static_cast<SwFltSection*>(pEntry->pAttr))->GetSection(),
- 0, false);
- delete(((SwFltSection*)pEntry->pAttr)->GetSection());
+ *(static_cast<SwFltSection*>(pEntry->pAttr))->GetSectionData(),
+ 0, 0, false);
+ delete (((SwFltSection*)pEntry->pAttr)->GetSectionData());
break;
case RES_FLTR_REDLINE:
{
@@ -737,7 +737,7 @@ SwFltAnchor::SwFltAnchor(const SwFltAnchor& rCpy) :
SfxPoolItem(RES_FLTR_ANCHOR), pFrmFmt(rCpy.pFrmFmt)
{
pClient = new SwFltAnchorClient(this);
- pFrmFmt->Add(pClient);
+ pFrmFmt->Add(pClient);
}
SwFltAnchor::~SwFltAnchor()
@@ -782,11 +782,11 @@ void SwFltAnchorClient::Modify(SfxPoolItem *, SfxPoolItem * pNew)
if (pNew->Which() == RES_FMT_CHG)
{
SwFmtChg * pFmtChg = dynamic_cast<SwFmtChg *> (pNew);
-
+
if (pFmtChg != NULL)
{
SwFrmFmt * pFrmFmt = dynamic_cast<SwFrmFmt *> (pFmtChg->pChangedFmt);
-
+
if (pFrmFmt != NULL)
m_pFltAnchor->SetFrmFmt(pFrmFmt);
}
@@ -865,19 +865,21 @@ SfxPoolItem* SwFltTOX::Clone(SfxItemPool*) const
//------ hier stehen die Methoden von SwFltSwSection -----------
-SwFltSection::SwFltSection(SwSection *pSect) :
- SfxPoolItem(RES_FLTR_SECTION), pSection(pSect)
+SwFltSection::SwFltSection(SwSectionData *const pSect)
+ : SfxPoolItem(RES_FLTR_SECTION)
+ , m_pSection(pSect)
{
}
-SwFltSection::SwFltSection(const SwFltSection& rCpy) :
- SfxPoolItem(RES_FLTR_SECTION), pSection(rCpy.pSection)
+SwFltSection::SwFltSection(const SwFltSection& rCpy)
+ : SfxPoolItem(RES_FLTR_SECTION)
+ , m_pSection(rCpy.m_pSection)
{
}
int SwFltSection::operator==(const SfxPoolItem& rItem) const
{
- return pSection == ((SwFltSection&)rItem).pSection;
+ return m_pSection == ((SwFltSection&)rItem).m_pSection;
}
SfxPoolItem* __EXPORT SwFltSection::Clone(SfxItemPool*) const
@@ -962,9 +964,9 @@ SwFltShell::~SwFltShell()
SwDoc& rDoc = GetDoc();
// 1. SectionFmt und Section anlegen
SwSectionFmt* pSFmt = rDoc.MakeSectionFmt( 0 );
- SwSection aS( CONTENT_SECTION, String::CreateFromAscii(
+ SwSectionData aSectionData( CONTENT_SECTION, String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM("PMW-Protect") ));
- aS.SetProtect( TRUE );
+ aSectionData.SetProtectFlag( true );
// 2. Start- und EndIdx suchen
const SwNode* pEndNd = &rDoc.GetNodes().GetEndOfContent();
SwNodeIndex aEndIdx( *pEndNd, -1L );
@@ -972,7 +974,8 @@ SwFltShell::~SwFltShell()
SwNodeIndex aSttIdx( *pSttNd, 1L ); // +1 -> hinter StartNode
// Section einfuegen
// Section einfuegen
- rDoc.GetNodes().InsertSection( aSttIdx, *pSFmt, aS, &aEndIdx, FALSE );
+ rDoc.GetNodes().InsertTextSection(
+ aSttIdx, *pSFmt, aSectionData, 0, &aEndIdx, false );
if( !IsFlagSet(SwFltControlStack::DONT_HARD_PROTECT) ){
SwDocShell* pDocSh = rDoc.GetDocShell();
@@ -1676,7 +1679,7 @@ SfxItemSet* SwFltOutBase::NewFlyDefaults()
return p;
}
-BOOL SwFltOutBase::BeginFly( RndStdIds eAnchor /*= FLY_AT_CNTNT*/,
+BOOL SwFltOutBase::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
BOOL bAbsolutePos /*= FALSE*/,
const SfxItemSet*
#ifdef DBG_UTIL
@@ -1728,7 +1731,7 @@ SwFrmFmt* SwFltOutDoc::MakeFly( RndStdIds eAnchor, SfxItemSet* pSet )
return pFly;
}
-BOOL SwFltOutDoc::BeginFly( RndStdIds eAnchor /*= FLY_AT_CNTNT*/,
+BOOL SwFltOutDoc::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
BOOL bAbsolutePos /*= FALSE*/,
const SfxItemSet* pMoreAttrs /*= 0*/ )
@@ -1834,7 +1837,7 @@ void SwFltOutDoc::EndFly()
return GetDoc().GetAttrPool().GetDefaultItem(nWhich);
}
-BOOL SwFltFormatCollection::BeginFly( RndStdIds eAnchor /*= FLY_AT_CNTNT*/,
+BOOL SwFltFormatCollection::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
BOOL bAbsolutePos /*= FALSE*/,
const SfxItemSet* pMoreAttrs /*= 0*/ )
@@ -1862,7 +1865,7 @@ BOOL SwFltFormatCollection::BeginStyleFly( SwFltOutDoc* pOutDoc )
// Flys in SwFltShell
//-----------------------------------------------------------------------------
-BOOL SwFltShell::BeginFly( RndStdIds eAnchor /*= FLY_AT_CNTNT*/,
+BOOL SwFltShell::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
BOOL bAbsolutePos /*= FALSE*/ )
{
@@ -1934,8 +1937,8 @@ void SwFltShell::BeginFootnote()
pSavedPos = new SwPosition(*pPaM->GetPoint());
pPaM->Move(fnMoveBackward, fnGoCntnt);
SwTxtNode* pTxt = pPaM->GetNode()->GetTxtNode();
- SwTxtAttr* pFN = pTxt->GetTxtAttr(pPaM->GetPoint()->nContent,
- RES_TXTATR_FTN);
+ SwTxtAttr *const pFN = pTxt->GetTxtAttrForCharAt(
+ pPaM->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN);
if( !pFN ){ // Passiert z.B. bei Fussnote in Fly
ASSERT(pFN, "Probleme beim Anlegen des Fussnoten-Textes");
return;
diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx
index 38d79a8b45..77c0f38160 100644
--- a/sw/source/filter/ww1/w1filter.cxx
+++ b/sw/source/filter/ww1/w1filter.cxx
@@ -870,10 +870,10 @@ oncemore:
String aName( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "WW" )));
- SwSection* pSection = new SwSection( FILE_LINK_SECTION,
+ SwSectionData * pSection = new SwSectionData( FILE_LINK_SECTION,
rOut.GetDoc().GetUniqueSectionName( &aStr ) );
pSection->SetLinkFileName( aFName );
- pSection->SetProtect( TRUE );
+ pSection->SetProtectFlag( true );
rOut << SwFltSection( pSection );
rOut.EndItem( RES_FLTR_SECTION );
rOut.NextParagraph();
diff --git a/sw/source/filter/ww8/WW8Sttbf.cxx b/sw/source/filter/ww8/WW8Sttbf.cxx
index ad4d9b95af..66bf6eedf2 100644
--- a/sw/source/filter/ww8/WW8Sttbf.cxx
+++ b/sw/source/filter/ww8/WW8Sttbf.cxx
@@ -29,6 +29,7 @@
#include <iostream>
#include <dbgoutsw.hxx>
#include "WW8Sttbf.hxx"
+#include <cstdio>
namespace ww8
{
diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx
index f0d65a7544..9129b565e2 100644
--- a/sw/source/filter/ww8/WW8TableInfo.cxx
+++ b/sw/source/filter/ww8/WW8TableInfo.cxx
@@ -29,9 +29,13 @@
#include "precompiled_sw.hxx"
#include <iostream>
+#include <set>
#include <stdio.h>
#include "WW8TableInfo.hxx"
+#include "fmtfsize.hxx"
+#include "attributeoutputbase.hxx"
#include "swtable.hxx"
+#include "frmfmt.hxx"
#include "pam.hxx"
#include "ndtxt.hxx"
#include "dbgoutsw.hxx"
@@ -45,8 +49,12 @@ WW8TableNodeInfoInner::WW8TableNodeInfoInner(WW8TableNodeInfo * pParent)
: mpParent(pParent)
, mnCell(0)
, mnRow(0)
+, mnShadowsBefore(0)
+, mnShadowsAfter(0)
, mbEndOfLine(false)
, mbEndOfCell(false)
+, mbFirstInTable(false)
+, mbVertMerge(false)
, mpTableBox(NULL)
, mpTable(NULL)
{
@@ -71,6 +79,16 @@ void WW8TableNodeInfoInner::setRow(sal_uInt32 nRow)
mnRow = nRow;
}
+void WW8TableNodeInfoInner::setShadowsBefore(sal_uInt32 nShadowsBefore)
+{
+ mnShadowsBefore = nShadowsBefore;
+}
+
+void WW8TableNodeInfoInner::setShadowsAfter(sal_uInt32 nShadowsAfter)
+{
+ mnShadowsAfter = nShadowsAfter;
+}
+
void WW8TableNodeInfoInner::setEndOfLine(bool bEndOfLine)
{
mbEndOfLine = bEndOfLine;
@@ -81,6 +99,17 @@ void WW8TableNodeInfoInner::setEndOfCell(bool bEndOfCell)
mbEndOfCell = bEndOfCell;
}
+void WW8TableNodeInfoInner::setFirstInTable(bool bFirstInTable)
+{
+ mbFirstInTable = bFirstInTable;
+}
+
+void WW8TableNodeInfoInner::setVertMerge(bool bVertMerge)
+
+{
+ mbVertMerge = bVertMerge;
+}
+
void WW8TableNodeInfoInner::setTableBox(const SwTableBox * pTableBox)
{
mpTableBox = pTableBox;
@@ -91,6 +120,11 @@ void WW8TableNodeInfoInner::setTable(const SwTable * pTable)
mpTable = pTable;
}
+void WW8TableNodeInfoInner::setRect(const SwRect & rRect)
+{
+ maRect = rRect;
+}
+
sal_uInt32 WW8TableNodeInfoInner::getDepth() const
{
return mnDepth;
@@ -106,6 +140,16 @@ sal_uInt32 WW8TableNodeInfoInner::getRow() const
return mnRow;
}
+sal_uInt32 WW8TableNodeInfoInner::getShadowsBefore() const
+{
+ return mnShadowsBefore;
+}
+
+sal_uInt32 WW8TableNodeInfoInner::getShadowsAfter() const
+{
+ return mnShadowsAfter;
+}
+
bool WW8TableNodeInfoInner::isEndOfCell() const
{
return mbEndOfCell;
@@ -116,6 +160,11 @@ bool WW8TableNodeInfoInner::isEndOfLine() const
return mbEndOfLine;
}
+bool WW8TableNodeInfoInner::isFirstInTable() const
+{
+ return mbFirstInTable;
+}
+
const SwNode * WW8TableNodeInfoInner::getNode() const
{
const SwNode * pResult = NULL;
@@ -126,6 +175,127 @@ const SwNode * WW8TableNodeInfoInner::getNode() const
return pResult;
}
+TableBoxVectorPtr WW8TableNodeInfoInner::getTableBoxesOfRow()
+{
+ TableBoxVectorPtr pResult(new TableBoxVector);
+
+ WW8TableCellGrid::Pointer_t pCellGrid =
+ mpParent->getParent()->getCellGridForTable(getTable(), false);
+
+ if (pCellGrid.get() == NULL)
+ {
+ const SwTableLine * pTabLine = getTableBox()->GetUpper();
+ const SwTableBoxes & rTblBoxes = pTabLine->GetTabBoxes();
+
+ sal_uInt8 nBoxes = rTblBoxes.Count();
+ for ( sal_uInt8 n = 0; n < nBoxes; n++ )
+ {
+ pResult->push_back(rTblBoxes[n]);
+ }
+ }
+ else
+ pResult = pCellGrid->getTableBoxesOfRow(this);
+
+ return pResult;
+}
+
+GridColsPtr WW8TableNodeInfoInner::getGridColsOfRow(AttributeOutputBase & rBase)
+{
+ GridColsPtr pResult(new GridCols);
+ WidthsPtr pWidths(getWidthsOfRow());
+
+ const SwFrmFmt *pFmt = getTable()->GetFrmFmt();
+ ASSERT(pFmt,"Impossible");
+ if (!pFmt)
+ return pResult;
+
+ const SwFmtFrmSize &rSize = pFmt->GetFrmSize();
+ unsigned long nTblSz = static_cast<unsigned long>(rSize.GetWidth());
+
+ sal_uInt32 nPageSize = 0;
+ bool bRelBoxSize = false;
+
+ rBase.GetTablePageSize
+ ( this, nPageSize, bRelBoxSize );
+
+ SwTwips nSz = 0;
+ Widths::const_iterator aWidthsEnd = pWidths->end();
+ for ( Widths::const_iterator aIt = pWidths->begin();
+ aIt != aWidthsEnd;
+ aIt++)
+ {
+ nSz += *aIt;
+ SwTwips nCalc = nSz;
+ if ( bRelBoxSize )
+ nCalc = ( nCalc * nPageSize ) / nTblSz;
+
+ pResult->push_back( nCalc );
+ }
+
+ return pResult;
+}
+
+WidthsPtr WW8TableNodeInfoInner::getWidthsOfRow()
+{
+ WidthsPtr pWidths;
+
+ WW8TableCellGrid::Pointer_t pCellGrid =
+ mpParent->getParent()->getCellGridForTable(getTable(), false);
+
+ if (pCellGrid.get() == NULL)
+ {
+ const SwTableBox * pTabBox = getTableBox();
+ const SwTableLine * pTabLine = pTabBox->GetUpper();
+ const SwTableBoxes & rTabBoxes = pTabLine->GetTabBoxes();
+
+ pWidths = WidthsPtr(new Widths);
+ // number of cell written
+ sal_uInt32 nBoxes = rTabBoxes.Count();
+ if ( nBoxes > 32 )
+ nBoxes = 32;
+
+ for (sal_uInt32 n = 0; n < nBoxes; n++)
+ {
+ const SwFrmFmt* pBoxFmt = rTabBoxes[ n ]->GetFrmFmt();
+ const SwFmtFrmSize& rLSz = pBoxFmt->GetFrmSize();
+
+ pWidths->push_back(rLSz.GetWidth());
+ }
+ }
+ else
+ pWidths = pCellGrid->getWidthsOfRow(this);
+
+ return pWidths;
+}
+
+RowSpansPtr WW8TableNodeInfoInner::getRowSpansOfRow()
+{
+ RowSpansPtr pResult(new RowSpans);
+
+ WW8TableCellGrid::Pointer_t pCellGrid =
+ mpParent->getParent()->getCellGridForTable(getTable(), false);
+
+ if (pCellGrid.get() == NULL)
+ {
+ const SwTableBox * pTabBox = getTableBox();
+ const SwTableLine * pTabLine = pTabBox->GetUpper();
+ const SwTableBoxes & rTabBoxes = pTabLine->GetTabBoxes();
+
+ sal_uInt32 nBoxes = rTabBoxes.Count();
+ if (nBoxes > 32)
+ nBoxes = 32;
+
+ for (sal_uInt32 n = 0; n < nBoxes; ++n)
+ {
+ pResult->push_back(rTabBoxes[n]->getRowSpan());
+ }
+ }
+ else
+ pResult = pCellGrid->getRowSpansOfRow(this);
+
+ return pResult;
+ }
+
const SwTableBox * WW8TableNodeInfoInner::getTableBox() const
{
return mpTableBox;
@@ -136,30 +306,41 @@ const SwTable * WW8TableNodeInfoInner::getTable() const
return mpTable;
}
+const SwRect & WW8TableNodeInfoInner::getRect() const
+{
+ return maRect;
+}
+
string WW8TableNodeInfoInner::toString() const
{
static char buffer[256];
snprintf(buffer, sizeof(buffer),
- "<tableinner depth=\"%" SAL_PRIxUINT32 "\""
- " cell=\"%" SAL_PRIxUINT32 "\""
- " row=\"%" SAL_PRIxUINT32 "\""
+ "<tableinner depth=\"%" SAL_PRIuUINT32 "\""
+ " cell=\"%" SAL_PRIuUINT32 "\""
+ " row=\"%" SAL_PRIuUINT32 "\""
" endOfCell=\"%s\""
- " endOfLine=\"%s\"/>",
+ " endOfLine=\"%s\""
+ " shadowsBefore=\"%" SAL_PRIuUINT32 "\""
+ " shadowsAfter=\"%" SAL_PRIuUINT32 "\""
+ " vertMerge=\"%s\"/>",
mnDepth, mnCell, mnRow,
mbEndOfCell ? "yes" : "no",
- mbEndOfLine ? "yes" : "no");
+ mbEndOfLine ? "yes" : "no",
+ mnShadowsBefore,
+ mnShadowsAfter,
+ mbVertMerge ? "yes" : "no");
return string(buffer);
}
-
// WW8TableTextNodeInfo
-WW8TableNodeInfo::WW8TableNodeInfo(const SwNode * pNode)
-:
- mnDepth(0),
- mpNode(pNode),
- mpNext(NULL),
- mpNextNode(NULL)
+WW8TableNodeInfo::WW8TableNodeInfo(WW8TableInfo * pParent,
+ const SwNode * pNode)
+: mpParent(pParent),
+ mnDepth(0),
+ mpNode(pNode),
+ mpNext(NULL),
+ mpNextNode(NULL)
{
}
@@ -171,8 +352,8 @@ WW8TableNodeInfo::~WW8TableNodeInfo()
{
static char buffer[1024];
snprintf(buffer, sizeof(buffer),
- "<tableNodeInfo depth=\"%" SAL_PRIxUINT32 "\">"
- , getDepth());
+ "<tableNodeInfo p=\"%p\" depth=\"%" SAL_PRIuUINT32 "\">"
+ ,this, getDepth());
::std::string sResult(buffer);
@@ -186,16 +367,13 @@ WW8TableNodeInfo::~WW8TableNodeInfo()
aIt++;
}
-
-#ifdef DEBUG
+#ifdef DEBUG
sResult += dbg_out(*mpNode);
#endif
-
- sResult +="</tableNodeInfo>";
+ sResult += "</tableNodeInfo>";
return sResult;
}
-
void WW8TableNodeInfo::setDepth(sal_uInt32 nDepth)
{
mnDepth = nDepth;
@@ -230,6 +408,31 @@ void WW8TableNodeInfo::setEndOfCell(bool bEndOfCell)
#endif
}
+void WW8TableNodeInfo::setFirstInTable(bool bFirstInTable)
+{
+ WW8TableNodeInfoInner::Pointer_t pInner = getInnerForDepth(mnDepth);
+
+ pInner->setFirstInTable(bFirstInTable);
+
+#ifdef DEBUG
+ ::std::clog << "<firstInTable depth=\"" << mnDepth << "\">"
+ << toString() << "</firstInTable>" << ::std::endl;
+#endif
+}
+
+void WW8TableNodeInfo::setVertMerge(bool bVertMerge)
+{
+ WW8TableNodeInfoInner::Pointer_t pInner = getInnerForDepth(mnDepth);
+
+ pInner->setVertMerge(bVertMerge);
+
+
+#ifdef DEBUG
+ ::std::clog << "<vertMerge depth=\"" << mnDepth << "\">"
+ << toString() << "</vertMerge>" << ::std::endl;
+#endif
+}
+
void WW8TableNodeInfo::setTableBox(const SwTableBox * pTableBox)
{
getInnerForDepth(mnDepth)->setTableBox(pTableBox);
@@ -251,9 +454,14 @@ void WW8TableNodeInfo::setNext(WW8TableNodeInfo * pNext)
#endif
}
-void WW8TableNodeInfo::setNextNode(SwNode * pNode)
+void WW8TableNodeInfo::setNextNode(const SwNode * pNode)
{
- mpNode = pNode;
+ mpNextNode = pNode;
+}
+
+void WW8TableNodeInfo::setRect(const SwRect & rRect)
+{
+ getInnerForDepth(mnDepth)->setRect(rRect);
}
void WW8TableNodeInfo::setCell(sal_uInt32 nCell)
@@ -266,6 +474,21 @@ void WW8TableNodeInfo::setRow(sal_uInt32 nRow)
getInnerForDepth(mnDepth)->setRow(nRow);
}
+void WW8TableNodeInfo::setShadowsBefore(sal_uInt32 nShadowsBefore)
+{
+ getInnerForDepth(mnDepth)->setShadowsBefore(nShadowsBefore);
+}
+
+void WW8TableNodeInfo::setShadowsAfter(sal_uInt32 nShadowsAfter)
+{
+ getInnerForDepth(mnDepth)->setShadowsAfter(nShadowsAfter);
+}
+
+WW8TableInfo * WW8TableNodeInfo::getParent() const
+{
+ return mpParent;
+}
+
sal_uInt32 WW8TableNodeInfo::getDepth() const
{
if (mInners.size() > 0)
@@ -294,11 +517,16 @@ WW8TableNodeInfo * WW8TableNodeInfo::getNext() const
return mpNext;
}
-SwNode * WW8TableNodeInfo::getNextNode() const
+const SwNode * WW8TableNodeInfo::getNextNode() const
{
return mpNextNode;
}
+const SwRect & WW8TableNodeInfo::getRect() const
+{
+ return getInnerForDepth(mnDepth)->getRect();
+}
+
bool WW8TableNodeInfo::isEndOfLine() const
{
return getInnerForDepth(mnDepth)->isEndOfLine();
@@ -357,31 +585,101 @@ WW8TableInfo::~WW8TableInfo()
{
}
+WW8TableNodeInfo *
+WW8TableInfo::processSwTableByLayout(const SwTable * pTable)
+{
+ SwTableCellInfo aTableCellInfo(pTable);
+ WW8TableNodeInfo * pPrev = NULL;
+
+ while (aTableCellInfo.getNext())
+ {
+ SwRect aRect = aTableCellInfo.getRect();
+
+#ifdef DEBUG
+ static char sBuffer[1024];
+ ::std::clog << "<CellFrm>" << ::std::endl;
+
+ snprintf(sBuffer, sizeof(sBuffer),
+ "<rect top=\"%ld\" bottom=\"%ld\" left=\"%ld\" right=\"%ld\"/>",
+ aRect.Top(), aRect.Bottom(), aRect.Left(), aRect.Right());
+ ::std::clog << sBuffer << ::std::endl;
+#endif
+ const SwTableBox * pTableBox = aTableCellInfo.getTableBox();
+ const SwStartNode * pSttNd = pTableBox->GetSttNd();
+
+ if (pSttNd != NULL)
+ {
+ SwPaM aPam(*pSttNd, 0);
+
+ bool bDone = false;
+ do
+ {
+ SwNode & rNode = aPam.GetPoint()->nNode.GetNode();
+
+ insertTableNodeInfo(&rNode, pTable, pTableBox, 0, 0, 1, & aRect);
+
+ if (rNode.IsEndNode())
+ {
+ SwEndNode * pEndNode = rNode.GetEndNode();
+ SwStartNode * pTmpSttNd = pEndNode->StartOfSectionNode();
+
+ if (pTmpSttNd == pSttNd)
+ bDone = true;
+ }
+
+ aPam.GetPoint()->nNode++;
+ }
+ while (!bDone);
+ }
+
+#ifdef DEBUG
+ ::std::clog << "</CellFrm>" << ::std::endl;
+#endif
+ }
+
+ pPrev = reorderByLayout(pTable);
+
+ return pPrev;
+}
+
void WW8TableInfo::processSwTable(const SwTable * pTable)
{
#ifdef DEBUG
::std::clog << "<processSwTable>" << ::std::endl;
#endif
- const SwTableLines & rLines = pTable->GetTabLines();
-
WW8TableNodeInfo * pPrev = NULL;
-
- for (USHORT n = 0; n < rLines.Count(); n++)
+
+ SwFrmFmt * pFrmFmt = pTable->GetFrmFmt();
+ if (pFrmFmt != NULL && pTable->IsTblComplex())
+ {
+ pPrev = processSwTableByLayout(pTable);
+
+#ifdef DEBUG
+ WW8TableCellGrid::Pointer_t pCellGrid(getCellGridForTable(pTable));
+ ::std::clog << pCellGrid->toString() << ::std::endl;
+#endif
+ }
+ else
{
- const SwTableLine * pLine = rLines[n];
+ const SwTableLines & rLines = pTable->GetTabLines();
+
+ for (USHORT n = 0; n < rLines.Count(); n++)
+ {
+ const SwTableLine * pLine = rLines[n];
+
+ pPrev = processTableLine(pTable, pLine, n, 1, pPrev);
+ }
- pPrev = processTableLine(pTable, pLine, n, 1, pPrev);
}
if (pPrev != NULL)
{
SwTableNode * pTableNode = pTable->GetTableNode();
SwEndNode * pEndNode = pTableNode->EndOfSectionNode();
-
+
pPrev->setNextNode(pEndNode);
}
-
#ifdef DEBUG
::std::clog << "</processSwTable>" << ::std::endl;
#endif
@@ -414,7 +712,7 @@ WW8TableInfo::processTableLine(const SwTable * pTable,
#endif
return pPrev;
-}
+}
WW8TableNodeInfo::Pointer_t
WW8TableInfo::processTableBoxLines(const SwTableBox * pBox,
@@ -471,7 +769,6 @@ WW8TableInfo::processTableBoxLines(const SwTableBox * pBox,
return pNodeInfo;
}
-
WW8TableNodeInfo *
WW8TableInfo::processTableBox(const SwTable * pTable,
const SwTableBox * pBox,
@@ -573,13 +870,15 @@ WW8TableNodeInfo::Pointer_t WW8TableInfo::insertTableNodeInfo
const SwTableBox * pTableBox,
sal_uInt32 nRow,
sal_uInt32 nCell,
- sal_uInt32 nDepth)
+ sal_uInt32 nDepth,
+ SwRect * pRect)
{
WW8TableNodeInfo::Pointer_t pNodeInfo = getTableNodeInfo(pNode);
if (pNodeInfo.get() == NULL)
{
- pNodeInfo = WW8TableNodeInfo::Pointer_t(new WW8TableNodeInfo(pNode));
+ pNodeInfo =
+ WW8TableNodeInfo::Pointer_t(new WW8TableNodeInfo(this, pNode));
mMap.insert(Map_t::value_type(pNode, pNodeInfo));
}
@@ -590,7 +889,25 @@ WW8TableNodeInfo::Pointer_t WW8TableInfo::insertTableNodeInfo
pNodeInfo->setCell(nCell);
pNodeInfo->setRow(nRow);
-
+
+ if (pNode->IsTxtNode())
+ {
+ FirstInTableMap_t::const_iterator aIt = mFirstInTableMap.find(pTable);
+ if (aIt == mFirstInTableMap.end())
+ {
+ mFirstInTableMap[pTable] = pNode;
+ pNodeInfo->setFirstInTable(true);
+ }
+ }
+
+ if (pRect)
+ {
+ WW8TableCellGrid::Pointer_t pCellGrid = getCellGridForTable(pTable);
+
+ pCellGrid->insert(*pRect, pNodeInfo.get());
+ pNodeInfo->setRect(*pRect);
+ }
+
#ifdef DEBUG
::std::clog << pNodeInfo->toString() << ::std::endl;
#endif
@@ -598,6 +915,26 @@ WW8TableNodeInfo::Pointer_t WW8TableInfo::insertTableNodeInfo
return pNodeInfo;
}
+WW8TableCellGrid::Pointer_t WW8TableInfo::getCellGridForTable
+(const SwTable * pTable, bool bCreate)
+{
+ WW8TableCellGrid::Pointer_t pResult;
+ CellGridMap_t::iterator aIt = mCellGridMap.find(pTable);
+
+ if (aIt == mCellGridMap.end())
+ {
+ if (bCreate)
+ {
+ pResult = WW8TableCellGrid::Pointer_t(new WW8TableCellGrid);
+ mCellGridMap[pTable] = pResult;
+ }
+ }
+ else
+ pResult = mCellGridMap[pTable];
+
+ return pResult;
+}
+
WW8TableNodeInfo::Pointer_t WW8TableInfo::getTableNodeInfo
(const SwNode * pNode)
{
@@ -624,7 +961,7 @@ const SwNode * WW8TableInfo::getNextNode(const SwNode * pNode)
pResult = pNextInfo->getNode();
else
{
- SwNode * pNextNode = pNodeInfo->getNextNode();
+ const SwNode * pNextNode = pNodeInfo->getNextNode();
if (pNextNode != NULL)
pResult = pNextNode;
@@ -634,4 +971,547 @@ const SwNode * WW8TableInfo::getNextNode(const SwNode * pNode)
return pResult;
}
+bool WW8TableNodeInfo::operator < (const WW8TableNodeInfo & rInfo) const
+{
+ bool bRet = false;
+
+ if (rInfo.mpNode != NULL)
+ {
+ if (mpNode == NULL)
+ {
+ bRet = true;
+ }
+ else
+ {
+ if (mpNode->GetIndex() < rInfo.mpNode->GetIndex())
+ bRet = true;
+ }
+ }
+
+ return bRet;
+}
+
+bool CellInfo::operator < (const CellInfo & aCellInfo) const
+{
+ bool aRet = false;
+
+ if (top() < aCellInfo.top())
+ aRet = true;
+ else if (top() == aCellInfo.top())
+ {
+ if (left() < aCellInfo.left())
+ aRet = true;
+ else if (left() == aCellInfo.left())
+ {
+ if (width() < aCellInfo.width())
+ aRet = true;
+ else if (width() == aCellInfo.width())
+ {
+ if (height() < aCellInfo.height())
+ aRet = true;
+ else if (height() == aCellInfo.height())
+ {
+ if (aCellInfo.getTableNodeInfo() != NULL)
+ {
+ if (m_pNodeInfo == NULL)
+ aRet = true;
+ else
+ {
+ aRet = *m_pNodeInfo < *aCellInfo.getTableNodeInfo();
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return aRet;
+}
+
+::std::string CellInfo::toString() const
+{
+ static char sBuffer[256];
+
+ snprintf(sBuffer, sizeof(sBuffer),
+ "<cellinfo left=\"%ld\""
+ " right=\"%ld\""
+ " top=\"%ld\""
+ " bottom=\"%ld\""
+ " node=\"%p\"/>",
+ left(),
+ right(),
+ top(),
+ bottom(),
+ m_pNodeInfo);
+
+ return sBuffer;
+}
+
+WW8TableNodeInfo * WW8TableInfo::reorderByLayout(const SwTable * pTable)
+{
+ WW8TableNodeInfo * pPrev = NULL;
+ WW8TableCellGrid::Pointer_t pCellGrid = getCellGridForTable(pTable);
+
+#ifdef DEBUG
+ ::std::clog << pCellGrid->toString() << ::std::endl;
+#endif
+
+ pCellGrid->addShadowCells();
+ pPrev = pCellGrid->connectCells();
+
+ return pPrev;
+}
+
+WW8TableCellGrid::WW8TableCellGrid()
+{
+}
+
+WW8TableCellGrid::~WW8TableCellGrid()
+{
+}
+
+WW8TableCellGridRow::Pointer_t WW8TableCellGrid::getRow(long nTop, bool bCreate)
+{
+ WW8TableCellGridRow::Pointer_t pResult;
+
+ RowTops_t::iterator aIt = m_aRowTops.find(nTop);
+
+ if (aIt == m_aRowTops.end())
+ {
+ if (bCreate)
+ {
+ pResult = WW8TableCellGridRow::Pointer_t(new WW8TableCellGridRow);
+ m_aRows[nTop] = pResult;
+ m_aRowTops.insert(nTop);
+ }
+ }
+ else
+ pResult = m_aRows[nTop];
+
+ return pResult;
+}
+
+WW8TableCellGrid::RowTops_t::const_iterator WW8TableCellGrid::getRowTopsBegin() const
+{
+ return m_aRowTops.begin();
+}
+
+WW8TableCellGrid::RowTops_t::const_iterator WW8TableCellGrid::getRowTopsEnd() const
+{
+ return m_aRowTops.end();
+}
+
+CellInfoMultiSet::const_iterator WW8TableCellGrid::getCellsBegin(long nTop)
+{
+ return getRow(nTop)->begin();
+}
+
+CellInfoMultiSet::const_iterator WW8TableCellGrid::getCellsEnd(long nTop)
+{
+ return getRow(nTop)->end();
+}
+
+void WW8TableCellGrid::insert(const SwRect & rRect,
+ WW8TableNodeInfo * pNodeInfo,
+ unsigned long * pFmtFrmWidth)
+{
+ CellInfo aCellInfo(rRect, pNodeInfo);
+
+ if (pFmtFrmWidth != NULL)
+ aCellInfo.setFmtFrmWidth(*pFmtFrmWidth);
+
+ WW8TableCellGridRow::Pointer_t pRow = getRow(rRect.Top());
+ pRow->insert(aCellInfo);
+}
+
+void WW8TableCellGrid::addShadowCells()
+{
+#ifdef DEBUG
+ ::std::clog << "<addShadowCells>" << ::std::endl;
+#endif
+
+ RowTops_t::const_iterator aTopsIt = getRowTopsBegin();
+
+ while (aTopsIt != getRowTopsEnd())
+ {
+#ifdef DEBUG
+ long nTop = *aTopsIt;
+ (void) nTop;
+#endif
+ CellInfoMultiSet::const_iterator aCellIt = getCellsBegin(*aTopsIt);
+ CellInfoMultiSet::const_iterator aCellEndIt = getCellsEnd(*aTopsIt);
+
+ RowSpansPtr pRowSpans(new RowSpans);
+
+ bool bBeginningOfCell = true;
+ bool bVertMerge = false;
+ SwRect aRect = aCellIt->getRect();
+ long nRowSpan = 1;
+ while (aCellIt != aCellEndIt)
+ {
+ WW8TableNodeInfo * pNodeInfo = aCellIt->getTableNodeInfo();
+
+ if (bBeginningOfCell)
+ {
+ RowTops_t::const_iterator aRowSpanIt(aTopsIt);
+ aRowSpanIt++;
+
+ if (aRowSpanIt != getRowTopsEnd() &&
+ *aRowSpanIt < aCellIt->bottom())
+ {
+ aRect.Top(*aRowSpanIt);
+ unsigned long nFmtFrmWidth = aCellIt->getFmtFrmWidth();
+ insert(aRect, NULL, &nFmtFrmWidth);
+
+ bVertMerge = true;
+ }
+ else
+ bVertMerge = false;
+
+ nRowSpan = 1;
+ while (aRowSpanIt != getRowTopsEnd() &&
+ *aRowSpanIt < aCellIt->bottom())
+ {
+ aRowSpanIt++;
+ nRowSpan++;
+ }
+
+ if (pNodeInfo != NULL)
+ pRowSpans->push_back(nRowSpan);
+ else
+ pRowSpans->push_back(-nRowSpan);
+ }
+
+ if (pNodeInfo != NULL)
+ {
+ pNodeInfo->setVertMerge(bVertMerge);
+ }
+
+ aCellIt++;
+
+ bBeginningOfCell = (aRect.Left() != aCellIt->left());
+ aRect = aCellIt->getRect();
+ }
+
+ WW8TableCellGridRow::Pointer_t pRow = getRow(*aTopsIt);
+ if (pRow.get() != NULL)
+ pRow->setRowSpans(pRowSpans);
+
+ aTopsIt++;
+ }
+#ifdef DEBUG
+ ::std::clog << "</addShadowCells>" << ::std::endl;
+#endif
+}
+
+WW8TableNodeInfo * WW8TableCellGrid::connectCells()
+{
+ RowTops_t::const_iterator aTopsIt = getRowTopsBegin();
+ sal_uInt32 nRow = 0;
+ WW8TableNodeInfo * pLastNodeInfo = NULL;
+
+ while (aTopsIt != getRowTopsEnd())
+ {
+ CellInfoMultiSet::const_iterator aCellIt = getCellsBegin(*aTopsIt);
+ CellInfoMultiSet::const_iterator aCellEndIt = getCellsEnd(*aTopsIt);
+ GridColsPtr pWidths(new Widths);
+ TableBoxVectorPtr pTableBoxes(new TableBoxVector);
+
+ sal_uInt32 nShadows = 0;
+ sal_uInt32 nCell = 0;
+ bool bBeginningOfCell = true;
+ WW8TableNodeInfo * pEndOfCellInfo = NULL;
+ sal_uInt32 nDepthInCell = 0;
+ while (aCellIt != aCellEndIt)
+ {
+ long nCellX = aCellIt->left();
+ WW8TableNodeInfo * pNodeInfo = aCellIt->getTableNodeInfo();
+ if (pNodeInfo != NULL)
+ {
+ const SwNode * pNode = pNodeInfo->getNode();
+
+ if (pNode->IsStartNode())
+ {
+ nDepthInCell++;
+ pEndOfCellInfo = NULL;
+ }
+
+ if (nDepthInCell == 1 && pNode->IsTxtNode())
+ pEndOfCellInfo = pNodeInfo;
+
+ pNodeInfo->setShadowsBefore(nShadows);
+ pNodeInfo->setCell(nCell);
+ pNodeInfo->setRow(nRow);
+ if (pLastNodeInfo != NULL)
+ {
+ pLastNodeInfo->setNext(pNodeInfo);
+ pLastNodeInfo->setNextNode(pNode);
+ }
+ pLastNodeInfo = pNodeInfo;
+ nShadows = 0;
+
+ if (pNode->IsEndNode())
+ {
+ nDepthInCell--;
+
+ if (nDepthInCell == 0 && pEndOfCellInfo == NULL)
+ pEndOfCellInfo = pNodeInfo;
+ }
+ }
+ else
+ {
+ nShadows++;
+ }
+
+ if (bBeginningOfCell)
+ {
+ pWidths->push_back(aCellIt->getFmtFrmWidth());
+
+ if (pNodeInfo != NULL)
+ pTableBoxes->push_back(pNodeInfo->getTableBox());
+ else
+ pTableBoxes->push_back(NULL);
+ }
+
+ aCellIt++;
+ bBeginningOfCell = false;
+
+ if (aCellIt != aCellEndIt && aCellIt->left() != nCellX)
+ {
+ nCell++;
+ bBeginningOfCell = true;
+
+ if (pEndOfCellInfo != NULL)
+ {
+ pEndOfCellInfo->setEndOfCell(true);
+ }
+
+ pEndOfCellInfo = NULL;
+ }
+ }
+
+ pLastNodeInfo->setShadowsAfter(nShadows);
+
+ if (pEndOfCellInfo == NULL)
+ {
+ pEndOfCellInfo = pLastNodeInfo;
+ }
+
+ pEndOfCellInfo->setEndOfCell(true);
+ pLastNodeInfo->setEndOfLine(true);
+
+ WW8TableCellGridRow::Pointer_t pRow(getRow(*aTopsIt));
+ pRow->setTableBoxVector(pTableBoxes);
+ pRow->setWidths(pWidths);
+
+ nShadows = 0;
+
+ aTopsIt++;
+ nRow++;
+ }
+
+ return pLastNodeInfo;
+}
+
+string WW8TableCellGrid::toString()
+{
+ string sResult = "<WW8TableCellGrid>";
+
+ RowTops_t::const_iterator aTopsIt = getRowTopsBegin();
+ static char sBuffer[1024];
+ while (aTopsIt != getRowTopsEnd())
+ {
+ sprintf(sBuffer, "<row y=\"%ld\">", *aTopsIt);
+ sResult += sBuffer;
+
+ CellInfoMultiSet::const_iterator aCellIt = getCellsBegin(*aTopsIt);
+ CellInfoMultiSet::const_iterator aCellsEnd = getCellsEnd(*aTopsIt);
+
+ while (aCellIt != aCellsEnd)
+ {
+ snprintf(sBuffer, sizeof(sBuffer), "<cellInfo top=\"%ld\" bottom=\"%ld\" left=\"%ld\" right=\"%ld\">",
+ aCellIt->top(), aCellIt->bottom(), aCellIt->left(), aCellIt->right());
+ sResult += sBuffer;
+
+ WW8TableNodeInfo * pInfo = aCellIt->getTableNodeInfo();
+ if (pInfo != NULL)
+ sResult += pInfo->toString();
+ else
+ sResult += "<shadow/>\n";
+
+ sResult += "</cellInfo>\n";
+ aCellIt++;
+ }
+
+ WW8TableCellGridRow::Pointer_t pRow = getRow(*aTopsIt);
+ WidthsPtr pWidths = pRow->getWidths();
+ if (pWidths != NULL)
+ {
+ sResult += "<widths>";
+
+ Widths::const_iterator aItEnd = pWidths->end();
+ for (Widths::const_iterator aIt = pWidths->begin();
+ aIt != aItEnd;
+ aIt++)
+ {
+ if (aIt != pWidths->begin())
+ sResult += ", ";
+
+ snprintf(sBuffer, sizeof(sBuffer), "%" SAL_PRIxUINT32 "", *aIt);
+ sResult += sBuffer;
+ }
+
+ sResult += "</widths>";
+ }
+
+ RowSpansPtr pRowSpans = pRow->getRowSpans();
+ if (pRowSpans.get() != NULL)
+ {
+ sResult += "<rowspans>";
+
+ RowSpans::const_iterator aItEnd = pRowSpans->end();
+ for (RowSpans::const_iterator aIt = pRowSpans->begin();
+ aIt != aItEnd;
+ aIt++)
+ {
+ if (aIt != pRowSpans->begin())
+ sResult += ", ";
+
+ snprintf(sBuffer, sizeof(sBuffer), "%" SAL_PRIxUINT32 "", *aIt);
+ sResult += sBuffer;
+ }
+
+ sResult += "</rowspans>";
+ }
+
+ sResult += "</row>\n";
+ aTopsIt++;
+ }
+
+ sResult += "</WW8TableCellGrid>\n";
+
+ return sResult;
+}
+
+TableBoxVectorPtr WW8TableCellGrid::getTableBoxesOfRow
+(WW8TableNodeInfoInner * pNodeInfoInner)
+{
+ TableBoxVectorPtr pResult;
+ WW8TableCellGridRow::Pointer_t pRow =
+ getRow(pNodeInfoInner->getRect().Top(), false);
+
+ if (pRow.get() != NULL)
+ {
+ pResult = pRow->getTableBoxVector();
+ }
+
+ return pResult;
+}
+
+WidthsPtr WW8TableCellGrid::getWidthsOfRow
+(WW8TableNodeInfoInner * pNodeInfoInner)
+{
+ GridColsPtr pResult;
+
+ WW8TableCellGridRow::Pointer_t pRow =
+ getRow(pNodeInfoInner->getRect().Top(), false);
+
+ if (pRow.get() != NULL)
+ {
+ pResult = pRow->getWidths();
+ }
+
+ return pResult;
+}
+
+RowSpansPtr WW8TableCellGrid::getRowSpansOfRow
+(WW8TableNodeInfoInner * pNodeInfoInner)
+{
+ RowSpansPtr pResult;
+
+ WW8TableCellGridRow::Pointer_t pRow =
+ getRow(pNodeInfoInner->getRect().Top(), false);
+
+ if (pRow.get() != NULL)
+ {
+ pResult = pRow->getRowSpans();
+ }
+
+ return pResult;
+}
+
+WW8TableCellGridRow::WW8TableCellGridRow()
+: m_pCellInfos(new CellInfoMultiSet)
+{
+}
+
+WW8TableCellGridRow::~WW8TableCellGridRow()
+{
+}
+
+void WW8TableCellGridRow::insert(const CellInfo & rCellInfo)
+{
+ m_pCellInfos->insert(rCellInfo);
+
+#ifdef DEBUG
+ ::std::clog << "<gridRowInsert>"
+ << rCellInfo.toString()
+ << "</gridRowInsert>"
+ << ::std::endl;
+#endif
+}
+
+CellInfoMultiSet::const_iterator WW8TableCellGridRow::begin() const
+{
+ return m_pCellInfos->begin();
+}
+
+CellInfoMultiSet::const_iterator WW8TableCellGridRow::end() const
+{
+ return m_pCellInfos->end();
+}
+
+void WW8TableCellGridRow::setTableBoxVector(TableBoxVectorPtr pTableBoxVector)
+{
+ m_pTableBoxVector = pTableBoxVector;
+}
+
+void WW8TableCellGridRow::setWidths(WidthsPtr pWidths)
+{
+ m_pWidths = pWidths;
+}
+
+void WW8TableCellGridRow::setRowSpans(RowSpansPtr pRowSpans)
+{
+ m_pRowSpans = pRowSpans;
+}
+
+TableBoxVectorPtr WW8TableCellGridRow::getTableBoxVector() const
+{
+ return m_pTableBoxVector;
+}
+
+WidthsPtr WW8TableCellGridRow::getWidths() const
+{
+ return m_pWidths;
+}
+
+RowSpansPtr WW8TableCellGridRow::getRowSpans() const
+{
+ return m_pRowSpans;
+}
+
+CellInfo::CellInfo(const SwRect & aRect, WW8TableNodeInfo * pNodeInfo)
+: m_aRect(aRect), m_pNodeInfo(pNodeInfo), m_nFmtFrmWidth(0)
+{
+ if (pNodeInfo != NULL)
+ {
+ const SwTableBox * pBox = pNodeInfo->getTableBox();
+ const SwFrmFmt * pFrmFmt = pBox->GetFrmFmt();
+ const SwFmtFrmSize & rSize = pFrmFmt->GetFrmSize();
+
+ m_nFmtFrmWidth = rSize.GetWidth();
+ }
+}
+
}
diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx
index 620fa620e4..3f74d4a5fc 100644
--- a/sw/source/filter/ww8/WW8TableInfo.hxx
+++ b/sw/source/filter/ww8/WW8TableInfo.hxx
@@ -33,18 +33,29 @@
#include <functional>
#include <boost/shared_ptr.hpp>
#include <sal/types.h>
+#include <swrect.hxx>
class SwTable;
class SwTableLine;
class SwTableBox;
class SwNode;
class SwWW8Writer;
+class AttributeOutputBase;
namespace ww8
{
using namespace ::std;
class WW8TableNodeInfo;
+typedef boost::shared_ptr<SwRect> SwRectPtr;
+typedef ::std::vector<const SwTableBox *> TableBoxVector;
+typedef boost::shared_ptr<TableBoxVector> TableBoxVectorPtr;
+typedef ::std::vector<sal_uInt32> GridCols;
+typedef boost::shared_ptr<GridCols> GridColsPtr;
+typedef ::std::vector<sal_uInt32> RowSpans;
+typedef boost::shared_ptr<RowSpans> RowSpansPtr;
+typedef ::std::vector<sal_uInt32> Widths;
+typedef boost::shared_ptr<Widths> WidthsPtr;
class WW8TableNodeInfoInner
{
@@ -52,10 +63,15 @@ class WW8TableNodeInfoInner
sal_uInt32 mnDepth;
sal_uInt32 mnCell;
sal_uInt32 mnRow;
+ sal_uInt32 mnShadowsBefore;
+ sal_uInt32 mnShadowsAfter;
bool mbEndOfLine;
bool mbEndOfCell;
+ bool mbFirstInTable;
+ bool mbVertMerge;
const SwTableBox * mpTableBox;
const SwTable * mpTable;
+ SwRect maRect;
public:
typedef boost::shared_ptr<WW8TableNodeInfoInner> Pointer_t;
@@ -66,60 +82,90 @@ public:
void setDepth(sal_uInt32 nDepth);
void setCell(sal_uInt32 nCell);
void setRow(sal_uInt32 nRow);
+ void setShadowsBefore(sal_uInt32 nShadowsBefore);
+ void setShadowsAfter(sal_uInt32 nShadowsAfter);
void setEndOfLine(bool bEndOfLine);
void setEndOfCell(bool bEndOfCell);
+ void setFirstInTable(bool bFirstInTable);
+ void setVertMerge(bool bVertMErge);
void setTableBox(const SwTableBox * pTableBox);
void setTable(const SwTable * pTable);
+ void setRect(const SwRect & rRect);
sal_uInt32 getDepth() const;
sal_uInt32 getCell() const;
sal_uInt32 getRow() const;
+ sal_uInt32 getShadowsBefore() const;
+ sal_uInt32 getShadowsAfter() const;
bool isEndOfCell() const;
bool isEndOfLine() const;
+ bool isFirstInTable() const;
+ bool isVertMerge() const;
const SwTableBox * getTableBox() const;
const SwTable * getTable() const;
+ const SwRect & getRect() const;
const SwNode * getNode() const;
+ TableBoxVectorPtr getTableBoxesOfRow();
+ WidthsPtr getWidthsOfRow();
+ GridColsPtr getGridColsOfRow(AttributeOutputBase & rBase);
+ RowSpansPtr getRowSpansOfRow();
+
string toString() const;
};
-
+
+class CellInfo;
+typedef ::std::multiset<CellInfo, less<CellInfo> > CellInfoMultiSet;
+typedef boost::shared_ptr<CellInfoMultiSet> CellInfoMultiSetPtr;
+
+class WW8TableInfo;
class WW8TableNodeInfo
{
public:
- typedef map<sal_uInt32, WW8TableNodeInfoInner::Pointer_t, greater<sal_uInt32> > Inners_t;
+ typedef map<sal_uInt32, WW8TableNodeInfoInner::Pointer_t,
+ greater<sal_uInt32> > Inners_t;
private:
+ WW8TableInfo * mpParent;
sal_uInt32 mnDepth;
const SwNode * mpNode;
Inners_t mInners;
WW8TableNodeInfo * mpNext;
- SwNode * mpNextNode;
-
+ const SwNode * mpNextNode;
+
public:
typedef boost::shared_ptr<WW8TableNodeInfo> Pointer_t;
- WW8TableNodeInfo(const SwNode * pTxtNode);
+ WW8TableNodeInfo(WW8TableInfo * pParent, const SwNode * pTxtNode);
virtual ~WW8TableNodeInfo();
void setDepth(sal_uInt32 nDepth);
void setEndOfLine(bool bEndOfLine);
void setEndOfCell(bool bEndOfCell);
+ void setFirstInTable(bool bFirstInTable);
+ void setVertMerge(bool bVertMerge);
void setTableBox(const SwTableBox *pTableBox);
void setTable(const SwTable * pTable);
void setCell(sal_uInt32 nCell);
void setRow(sal_uInt32 nRow);
+ void setShadowsBefore(sal_uInt32 nShadowsBefore);
+ void setShadowsAfter(sal_uInt32 nShadowsAfter);
void setNext(WW8TableNodeInfo * pNext);
- void setNextNode(SwNode * pNode);
+ void setNextNode(const SwNode * pNode);
+ void setRect(const SwRect & rRect);
+ WW8TableInfo * getParent() const;
sal_uInt32 getDepth() const;
bool isEndOfLine() const;
bool isEndOfCell() const;
+ bool isFirstInTable() const;
const SwNode * getNode() const;
const SwTableBox * getTableBox() const;
const SwTable * getTable() const;
WW8TableNodeInfo * getNext() const;
- SwNode * getNextNode() const;
+ const SwNode * getNextNode() const;
+ const SwRect & getRect() const;
const Inners_t & getInners() const;
const WW8TableNodeInfoInner::Pointer_t getFirstInner() const;
@@ -129,6 +175,8 @@ public:
sal_uInt32 getRow() const;
::std::string toString() const;
+
+ bool operator < (const WW8TableNodeInfo & rInfo) const;
};
struct hashNode
@@ -137,11 +185,81 @@ struct hashNode
{ return reinterpret_cast<size_t>(pNode); }
};
+struct hashTable
+{
+ size_t operator()(const SwTable * pTable) const
+ { return reinterpret_cast<size_t>(pTable); }
+};
+
+class WW8TableCellGridRow
+{
+ CellInfoMultiSetPtr m_pCellInfos;
+ TableBoxVectorPtr m_pTableBoxVector;
+ WidthsPtr m_pWidths;
+ RowSpansPtr m_pRowSpans;
+
+public:
+ typedef boost::shared_ptr<WW8TableCellGridRow> Pointer_t;
+ WW8TableCellGridRow();
+ ~WW8TableCellGridRow();
+
+ void insert(const CellInfo & rCellInfo);
+ CellInfoMultiSet::const_iterator begin() const;
+ CellInfoMultiSet::const_iterator end() const;
+
+ void setTableBoxVector(TableBoxVectorPtr pTableBoxVector);
+ void setWidths(WidthsPtr pGridCols);
+ void setRowSpans(RowSpansPtr pRowSpans);
+
+ TableBoxVectorPtr getTableBoxVector() const;
+ WidthsPtr getWidths() const;
+ RowSpansPtr getRowSpans() const;
+};
+
+class WW8TableCellGrid
+{
+ typedef ::std::set<long> RowTops_t;
+ typedef ::std::map<long, WW8TableCellGridRow::Pointer_t> Rows_t;
+
+ RowTops_t m_aRowTops;
+ Rows_t m_aRows;
+
+ WW8TableCellGridRow::Pointer_t getRow(long nTop, bool bCreate = true);
+ RowTops_t::const_iterator getRowTopsBegin() const;
+ RowTops_t::const_iterator getRowTopsEnd() const;
+ CellInfoMultiSet::const_iterator getCellsBegin(long nTop);
+ CellInfoMultiSet::const_iterator getCellsEnd(long nTop);
+
+public:
+ typedef ::boost::shared_ptr<WW8TableCellGrid> Pointer_t;
+
+ WW8TableCellGrid();
+ ~WW8TableCellGrid();
+
+ void insert(const SwRect & rRect, WW8TableNodeInfo * pNodeInfo,
+ unsigned long * pFmtFrmWidth = NULL);
+ void addShadowCells();
+ WW8TableNodeInfo * connectCells();
+
+ string toString();
+
+ TableBoxVectorPtr getTableBoxesOfRow(WW8TableNodeInfoInner * pNodeInfo);
+ WidthsPtr getWidthsOfRow(WW8TableNodeInfoInner * pNodeInfo);
+ RowSpansPtr getRowSpansOfRow(WW8TableNodeInfoInner * pNodeInfo);
+};
+
class WW8TableInfo
{
+ friend class WW8TableNodeInfoInner;
typedef hash_map<const SwNode *, WW8TableNodeInfo::Pointer_t, hashNode > Map_t;
Map_t mMap;
+ typedef hash_map<const SwTable *, WW8TableCellGrid::Pointer_t, hashTable > CellGridMap_t;
+ CellGridMap_t mCellGridMap;
+
+ typedef hash_map<const SwTable *, const SwNode *, hashTable > FirstInTableMap_t;
+ FirstInTableMap_t mFirstInTableMap;
+
WW8TableNodeInfo *
processTableLine(const SwTable * pTable,
const SwTableLine * pTableLine,
@@ -169,7 +287,11 @@ class WW8TableInfo
const SwTableBox * pTableBox,
sal_uInt32 nRow,
sal_uInt32 nCell,
- sal_uInt32 nDepth);
+ sal_uInt32 nDepth,
+ SwRect * pRect = NULL);
+
+ WW8TableCellGrid::Pointer_t getCellGridForTable(const SwTable * pTable,
+ bool bCreate = true);
public:
typedef boost::shared_ptr<WW8TableInfo> Pointer_t;
@@ -178,9 +300,55 @@ public:
virtual ~WW8TableInfo();
void processSwTable(const SwTable * pTable);
+ WW8TableNodeInfo * processSwTableByLayout(const SwTable * pTable);
WW8TableNodeInfo::Pointer_t getTableNodeInfo(const SwNode * pNode);
const SwNode * getNextNode(const SwNode * pNode);
+ const WW8TableNodeInfo * getFirstTableNodeInfo() const;
+
+ WW8TableNodeInfo * reorderByLayout(const SwTable * pTable);
};
+class CellInfo
+{
+ SwRect m_aRect;
+ WW8TableNodeInfo * m_pNodeInfo;
+ unsigned long m_nFmtFrmWidth;
+
+public:
+ CellInfo(const SwRect & aRect, WW8TableNodeInfo * pNodeInfo);
+
+ CellInfo(const CellInfo & aRectAndTableInfo)
+ : m_aRect(aRectAndTableInfo.m_aRect),
+ m_pNodeInfo(aRectAndTableInfo.m_pNodeInfo),
+ m_nFmtFrmWidth(aRectAndTableInfo.m_nFmtFrmWidth)
+ {
+ }
+
+ ~CellInfo() {}
+
+ bool operator < (const CellInfo & aCellInfo) const;
+
+ long top() const { return m_aRect.Top(); }
+ long bottom() const { return m_aRect.Bottom(); }
+ long left() const { return m_aRect.Left(); }
+ long right() const { return m_aRect.Right(); }
+ long width() const { return m_aRect.Width(); }
+ long height() const { return m_aRect.Height(); }
+ SwRect getRect() const { return m_aRect; }
+ WW8TableNodeInfo * getTableNodeInfo() const
+ { return m_pNodeInfo; }
+ unsigned long getFmtFrmWidth() const
+ {
+ return m_nFmtFrmWidth;
+ }
+
+ void setFmtFrmWidth(unsigned long nFmtFrmWidth)
+ {
+ m_nFmtFrmWidth = nFmtFrmWidth;
+ }
+
+ ::std::string toString() const;
+};
+
}
#endif // WW8_TABLE_INFO_HXX
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx
index 47a42b2079..e5f40b9ed7 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -232,6 +232,8 @@ public:
virtual void TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) = 0;
+ virtual void TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) = 0;
+
virtual void TableRowEnd( sal_uInt32 nDepth ) = 0;
/// Start of the styles table.
@@ -552,9 +554,7 @@ protected:
virtual bool AnalyzeURL( const String& rUrl, const String& rTarget, String* pLinkURL, String* pMark );
- std::vector<SwTwips> GetGridCols( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
- void GetTablePageSize( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner, sal_uInt32& rPageSize, bool& rRelBoxSize );
+ ww8::GridColsPtr GetGridCols( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
public:
AttributeOutputBase() {}
@@ -571,6 +571,11 @@ public:
/// Output frames.
void OutputFlyFrame( const sw::Frame& rFmt );
+
+ void GetTablePageSize
+ ( ww8::WW8TableNodeInfoInner * pTableTextNodeInfoInner,
+ sal_uInt32& rPageSize, bool& rRelBoxSize );
+
};
#endif // _ATTRIBUTEOUTPUTBASE_HXX_
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 76eea38544..291a6a7e3f 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -731,9 +731,7 @@ void DocxAttributeOutput::RunText( const String& rText, rtl_TextEncoding /*eChar
if ( *pIt < 0x0020 ) // filter out the control codes
{
impl_WriteRunText( m_pSerializer, nTextToken, pBegin, pIt );
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "Ignored control code %x in a text run.", *pIt );
-#endif
+ OSL_TRACE( "Ignored control code %x in a text run.", *pIt );
}
break;
}
@@ -744,23 +742,17 @@ void DocxAttributeOutput::RunText( const String& rText, rtl_TextEncoding /*eChar
void DocxAttributeOutput::RawText( const String& /*rText*/, bool /*bForceUnicode*/, rtl_TextEncoding /*eCharSet*/ )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet )\n" );
-#endif
+ OSL_TRACE("TODO DocxAttributeOutput::RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet )\n" );
}
void DocxAttributeOutput::StartRuby( const SwTxtNode& /*rNode*/, const SwFmtRuby& /*rRuby*/ )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRuby )\n" );
-#endif
+ OSL_TRACE("TODO DocxAttributeOutput::StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRuby )\n" );
}
void DocxAttributeOutput::EndRuby()
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::EndRuby()\n" );
-#endif
+ OSL_TRACE( "TODO DocxAttributeOutput::EndRuby()\n" );
}
bool DocxAttributeOutput::AnalyzeURL( const String& rUrl, const String& rTarget, String* pLinkURL, String* pMark )
@@ -849,9 +841,7 @@ void DocxAttributeOutput::FieldVanish( const String& rTxt, ww::eField eType )
void DocxAttributeOutput::Redline( const SwRedlineData* /*pRedline*/ )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::Redline( const SwRedlineData* pRedline )\n" );
-#endif
+ OSL_TRACE( "TODO DocxAttributeOutput::Redline( const SwRedlineData* pRedline )\n" );
}
/// Append the number as 2-digit when less than 10.
@@ -936,9 +926,7 @@ void DocxAttributeOutput::StartRedline( const SwRedlineData* pRedlineData )
break;
case nsRedlineType_t::REDLINE_FORMAT:
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::StartRedline()\n" );
-#endif
+ OSL_TRACE( "TODO DocxAttributeOutput::StartRedline()\n" );
default:
break;
}
@@ -960,9 +948,7 @@ void DocxAttributeOutput::EndRedline()
break;
case nsRedlineType_t::REDLINE_FORMAT:
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::EndRedline()\n" );
-#endif
+ OSL_TRACE( "TODO DocxAttributeOutput::EndRedline()\n" );
break;
default:
break;
@@ -973,9 +959,7 @@ void DocxAttributeOutput::EndRedline()
void DocxAttributeOutput::FormatDrop( const SwTxtNode& /*rNode*/, const SwFmtDrop& /*rSwFmtDrop*/, USHORT /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, USHORT nStyle )\n" );
-#endif
+ OSL_TRACE( "TODO DocxAttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, USHORT nStyle )\n" );
}
void DocxAttributeOutput::ParagraphStyle( USHORT nStyle )
@@ -990,7 +974,7 @@ void DocxAttributeOutput::ParagraphStyle( USHORT nStyle )
void DocxAttributeOutput::InTable()
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::InTable()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::InTable()\n" );
#endif
}
@@ -998,7 +982,7 @@ void DocxAttributeOutput::InTable()
void DocxAttributeOutput::TableRowProperties( bool /*bHeader*/, long /*nCellHeight*/, bool /*bCannotSplit*/, bool /*bRightToLeft*/ )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::TableRowProperties()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::TableRowProperties()\n" );
#endif
}
#endif
@@ -1439,9 +1423,7 @@ void DocxAttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer
void DocxAttributeOutput::TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t /*pNodeInfo*/ )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO: DocxAttributeOutput::TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeInfo )\n" );
-#endif
+ OSL_TRACE( "TODO: DocxAttributeOutput::TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeInfo )\n" );
}
void DocxAttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner )
@@ -1455,16 +1437,19 @@ void DocxAttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointe
void DocxAttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/ )
{
+ OSL_TRACE( "TODO: DocxAttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )\n" );
+}
+
+void DocxAttributeOutput::TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/ )
+{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO: DocxAttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )\n" );
+ fprintf( stderr, "TODO: DocxAttributeOutput::TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )\n" );
#endif
}
void DocxAttributeOutput::TableRowEnd( sal_uInt32 /*nDepth*/ )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO: DocxAttributeOutput::TableRowEnd( sal_uInt32 nDepth = 1 )\n" );
-#endif
+ OSL_TRACE( "TODO: DocxAttributeOutput::TableRowEnd( sal_uInt32 nDepth = 1 )\n" );
}
void DocxAttributeOutput::StartStyles()
@@ -1483,7 +1468,7 @@ void DocxAttributeOutput::DefaultStyle( USHORT nStyle )
{
// are these the values of enum ww::sti (see ../inc/wwstyles.hxx)?
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::DefaultStyle( USHORT nStyle )- %d\n", nStyle );
+ OSL_TRACE( "TODO DocxAttributeOutput::DefaultStyle( USHORT nStyle )- %d\n", nStyle );
#else
(void) nStyle; // to quiet the warning
#endif
@@ -1492,7 +1477,7 @@ void DocxAttributeOutput::DefaultStyle( USHORT nStyle )
void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& rSize )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& rSize ) - some stuff still missing\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& rSize ) - some stuff still missing\n" );
#endif
// create the relation ID
OString aRelId;
@@ -1710,7 +1695,7 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame &rFrame, const Po
break;
default:
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Point& rNdTopLeft ) - frame type '%s'\n",
+ OSL_TRACE( "TODO DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Point& rNdTopLeft ) - frame type '%s'\n",
rFrame.GetWriterType() == sw::Frame::eTxtBox? "eTxtBox":
( rFrame.GetWriterType() == sw::Frame::eOle? "eOle":
( rFrame.GetWriterType() == sw::Frame::eFormControl? "eFormControl": "???" ) ) );
@@ -1839,7 +1824,7 @@ void DocxAttributeOutput::SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo
break;
default:
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "Unknown section break to write: %d\n", nC );
+ OSL_TRACE( "Unknown section break to write: %d\n", nC );
#endif
break;
}
@@ -1879,7 +1864,7 @@ void DocxAttributeOutput::SectionLineNumbering( ULONG /*nRestartNo*/, const SwLi
{
// see 2.6.8 lnNumType (Line Numbering Settings)
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::SectionLineNumbering()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::SectionLineNumbering()\n" );
#endif
}
@@ -1965,7 +1950,7 @@ void DocxAttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRes
// see 2.6.12 pgNumType (Page Numbering Settings)
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::SectionPageNumbering()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::SectionPageNumbering()\n" );
#endif
}
@@ -2073,7 +2058,7 @@ void DocxAttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &rRul
#if OSL_DEBUG_LEVEL > 0
// TODO ww8 version writes this, anything to do about it here?
if ( rRule.IsContinusNum() )
- fprintf( stderr, "TODO DocxAttributeOutput::NumberingDefinition()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::NumberingDefinition()\n" );
#else
(void) rRule; // to quiet the warning...
#endif
@@ -2265,7 +2250,7 @@ void DocxAttributeOutput::CharCrossedOut( const SvxCrossedOutItem& rCrossedOut )
void DocxAttributeOutput::CharEscapement( const SvxEscapementItem& /*rEscapement*/ )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::CharEscapement()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::CharEscapement()\n" );
#endif
}
@@ -2382,7 +2367,7 @@ void DocxAttributeOutput::CharWeight( const SvxWeightItem& rWeight )
void DocxAttributeOutput::CharAutoKern( const SvxAutoKernItem& )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::CharAutoKern()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::CharAutoKern()\n" );
#endif
}
@@ -2554,7 +2539,7 @@ void DocxAttributeOutput::TextINetFormat( const SwFmtINetFmt& rLink )
void DocxAttributeOutput::TextCharFormat( const SwFmtCharFmt& )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::TextCharFormat()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::TextCharFormat()\n" );
#endif
}
@@ -2577,14 +2562,14 @@ void DocxAttributeOutput::RefField( const SwField& rFld, const String& rRef )
void DocxAttributeOutput::HiddenField( const SwField& /*rFld*/ )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::HiddenField()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::HiddenField()\n" );
#endif
}
void DocxAttributeOutput::PostitField( const SwField* /* pFld*/ )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::PostitField()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::PostitField()\n" );
#endif
}
@@ -2970,7 +2955,7 @@ void DocxAttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
if ( m_rExport.bOutFlyFrmAttrs )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::FormatFrameSize() - Fly frames\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::FormatFrameSize() - Fly frames\n" );
#endif
}
else if ( m_rExport.bOutPageDescs )
@@ -2993,7 +2978,7 @@ void DocxAttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
void DocxAttributeOutput::FormatPaperBin( const SvxPaperBinItem& )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::FormatPaperBin()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::FormatPaperBin()\n" );
#endif
}
@@ -3002,7 +2987,7 @@ void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace )
if ( m_rExport.bOutFlyFrmAttrs )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "DocxAttributeOutput::FormatLRSpace() - Fly frames\n" );
+ OSL_TRACE( "DocxAttributeOutput::FormatLRSpace() - Fly frames\n" );
#endif
}
else if ( m_rExport.bOutPageDescs )
@@ -3093,28 +3078,28 @@ void DocxAttributeOutput::FormatULSpace( const SvxULSpaceItem& rULSpace )
void DocxAttributeOutput::FormatSurround( const SwFmtSurround& )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::FormatSurround()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::FormatSurround()\n" );
#endif
}
void DocxAttributeOutput::FormatVertOrientation( const SwFmtVertOrient& )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::FormatVertOrientation()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::FormatVertOrientation()\n" );
#endif
}
void DocxAttributeOutput::FormatHorizOrientation( const SwFmtHoriOrient& )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::FormatHorizOrientation()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::FormatHorizOrientation()\n" );
#endif
}
void DocxAttributeOutput::FormatAnchor( const SwFmtAnchor& )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::FormatAnchor()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::FormatAnchor()\n" );
#endif
}
@@ -3129,7 +3114,7 @@ void DocxAttributeOutput::FormatBackground( const SvxBrushItem& rBrush )
}
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::FormatBackground()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::FormatBackground()\n" );
#endif
}
@@ -3215,9 +3200,7 @@ void DocxAttributeOutput::FormatKeep( const SvxFmtKeepItem& )
void DocxAttributeOutput::FormatTextGrid( const SwTextGridItem& )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::FormatTextGrid()\n" );
-#endif
+ OSL_TRACE( "TODO DocxAttributeOutput::FormatTextGrid()\n" );
}
void DocxAttributeOutput::FormatLineNumbering( const SwFmtLineNumber& rNumbering )
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index 195dd04ecf..8752ff2f3c 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -342,9 +342,7 @@ void DocxExport::OutputField( const SwField* pFld, ww::eField eFldType, const St
void DocxExport::WriteFormData( const ::sw::mark::IFieldmark& /*rFieldmark*/ )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxExport::WriteFormData()\n" );
-#endif
+ OSL_TRACE( "TODO DocxExport::WriteFormData()\n" );
}
void DocxExport::DoComboBox(const rtl::OUString& rName,
@@ -404,9 +402,7 @@ void DocxExport::DoComboBox(const rtl::OUString& rName,
void DocxExport::DoFormText(const SwInputField* /*pFld*/)
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxExport::ForFormText()\n" );
-#endif
+ OSL_TRACE( "TODO DocxExport::ForFormText()\n" );
}
void DocxExport::ExportDocument_Impl()
@@ -430,16 +426,14 @@ void DocxExport::ExportDocument_Impl()
void DocxExport::OutputPageSectionBreaks( const SwTxtNode& )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxExport::OutputPageSectionBreaks( const SwTxtNode& )\n" );
-#endif
+ OSL_TRACE( "TODO DocxExport::OutputPageSectionBreaks( const SwTxtNode& )\n" );
}
void DocxExport::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum )
{
AttrOutput().SectionBreak( msword::PageBreak, m_pSections->CurrentSectionInfo() );
- m_pSections->AppendSep( pPageDesc, pFmt, nLnNum );
+ m_pSections->AppendSection( pPageDesc, pFmt, nLnNum );
}
void DocxExport::OutputEndNode( const SwEndNode& rEndNode )
@@ -473,30 +467,24 @@ void DocxExport::OutputEndNode( const SwEndNode& rEndNode )
nRstLnNum = 0;
AttrOutput().SectionBreak( msword::PageBreak, m_pSections->CurrentSectionInfo( ) );
- m_pSections->AppendSep( pAktPageDesc, pParentFmt, nRstLnNum );
+ m_pSections->AppendSection( pAktPageDesc, pParentFmt, nRstLnNum );
}
}
}
void DocxExport::OutputTableNode( const SwTableNode& )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxExport::OutputTableNode( const SwTableNode& )\n" );
-#endif
+ OSL_TRACE( "TODO DocxExport::OutputTableNode( const SwTableNode& )\n" );
}
void DocxExport::OutputGrfNode( const SwGrfNode& )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxExport::OutputGrfNode( const SwGrfNode& )\n" );
-#endif
+ OSL_TRACE( "TODO DocxExport::OutputGrfNode( const SwGrfNode& )\n" );
}
void DocxExport::OutputOLENode( const SwOLENode& )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxExport::OutputOLENode( const SwOLENode& )\n" );
-#endif
+ OSL_TRACE( "TODO DocxExport::OutputOLENode( const SwOLENode& )\n" );
}
ULONG DocxExport::ReplaceCr( BYTE )
@@ -521,11 +509,11 @@ void DocxExport::PrepareNewPageDesc( const SfxItemSet* pSet,
if ( pNewPgDescFmt )
{
- m_pSections->AppendSep( *pNewPgDescFmt, rNd, pFmt, nLnNm );
+ m_pSections->AppendSection( *pNewPgDescFmt, rNd, pFmt, nLnNm );
}
else if ( pNewPgDesc )
{
- m_pSections->AppendSep( pNewPgDesc, rNd, pFmt, nLnNm );
+ m_pSections->AppendSection( pNewPgDesc, rNd, pFmt, nLnNm );
}
}
diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx
index ac01fab4f1..3d7d44f50c 100644
--- a/sw/source/filter/ww8/docxexportfilter.cxx
+++ b/sw/source/filter/ww8/docxexportfilter.cxx
@@ -47,7 +47,7 @@ DocxExportFilter::DocxExportFilter( const uno::Reference< lang::XMultiServiceFac
bool DocxExportFilter::exportDocument()
{
- fprintf( stderr, "DocxExportFilter::exportDocument()\n" ); // DEBUG remove me
+ OSL_TRACE(, "DocxExportFilter::exportDocument()\n" ); // DEBUG remove me
// get SwDoc*
uno::Reference< uno::XInterface > xIfc( getModel(), uno::UNO_QUERY );
diff --git a/sw/source/filter/ww8/dump/ww8scan.cxx b/sw/source/filter/ww8/dump/ww8scan.cxx
index dc33079091..e2f5f3e8cf 100644
--- a/sw/source/filter/ww8/dump/ww8scan.cxx
+++ b/sw/source/filter/ww8/dump/ww8scan.cxx
@@ -31,12 +31,8 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-#ifndef __SGI_STL_ALGORITHM
#include <algorithm>
-#endif
-#ifndef __SGI_STL_FUNCTIONAL
#include <functional>
-#endif
#include <string.h> // memset()
#include <osl/endian.h>
diff --git a/sw/source/filter/ww8/dump/ww8scan.hxx b/sw/source/filter/ww8/dump/ww8scan.hxx
index 8a0ede2343..2f7922133d 100644
--- a/sw/source/filter/ww8/dump/ww8scan.hxx
+++ b/sw/source/filter/ww8/dump/ww8scan.hxx
@@ -297,8 +297,7 @@ class WW8PLCFx // virtueller Iterator fuer Piece Table Exceptions
public:
WW8PLCFx( BYTE nFibVersion, BOOL bSprm )
{ bIsSprm = bSprm; nVersion = nFibVersion; }
-
-// virtual ~WW8PLCFx() {}
+ virtual ~WW8PLCFx() {}
BOOL IsSprm() { return bIsSprm; }
virtual ULONG GetIdx() const = 0;
virtual void SetIdx( ULONG nIdx ) = 0;
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index 8a962e5b85..652d8a4a12 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -567,6 +567,7 @@ namespace sw
return aRet;
}
+#if 0
Frames GetFramesBetweenNodes(const Frames &rFrames,
const SwNode &rStart, const SwNode &rEnd)
{
@@ -580,7 +581,7 @@ namespace sw
return aRet;
}
-
+#endif
Frames GetFramesInNode(const Frames &rFrames, const SwNode &rNode)
{
Frames aRet;
diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx
index a81fd845a3..94ea0bf08d 100644
--- a/sw/source/filter/ww8/writerhelper.hxx
+++ b/sw/source/filter/ww8/writerhelper.hxx
@@ -663,6 +663,7 @@ namespace sw
*/
Frames GetFramesInNode(const Frames &rFrames, const SwNode &rNode);
+#if 0
/** Get the Frames anchored for all nodes between two points
Given a container of frames, find the ones anchored to the nodes
@@ -685,7 +686,7 @@ namespace sw
*/
Frames GetFramesBetweenNodes(const Frames &rFrames,
const SwNode &rStart, const SwNode &rEnd);
-
+#endif
/** Get the Numbering Format used on a paragraph
There are two differing types of numbering formats that may be on a
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 6686ae5b13..72dbabefd9 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -170,10 +170,20 @@ void WW8Export::DoComboBox(uno::Reference<beans::XPropertySet> xPropSet)
rtl::OUString sHelp;
{
- uno::Any aTmp = xPropSet->getPropertyValue(C2U("Help"));
- const rtl::OUString *pStr = (const rtl::OUString *)aTmp.getValue();
- if (pStr)
- sHelp = *pStr;
+ // --> OD 2010-05-14 #160026#
+ // property "Help" does not exist and due to the no-existence an exception is thrown.
+// uno::Any aTmp = xPropSet->getPropertyValue(C2U("Help"));
+ try
+ {
+ uno::Any aTmp = xPropSet->getPropertyValue(C2U("HelpText"));
+ // <--
+ const rtl::OUString *pStr = (const rtl::OUString *)aTmp.getValue();
+ if (pStr)
+ sHelp = *pStr;
+ }
+ catch( uno::Exception& )
+ {}
+ // <--
}
rtl::OUString sToolTip;
@@ -270,25 +280,10 @@ void WW8Export::DoCheckBox(uno::Reference<beans::XPropertySet> xPropSet)
sal_Int16 nTemp = 0;
xPropSet->getPropertyValue(C2U("DefaultState")) >>= nTemp;
- sal_uInt32 nIsDefaultChecked(nTemp);
+ aFFData.setDefaultResult(nTemp);
xPropSet->getPropertyValue(C2U("State")) >>= nTemp;
- sal_uInt32 nIsChecked(nTemp);
-
- if (nIsDefaultChecked != nIsChecked)
- {
- switch (nIsChecked)
- {
- case false:
- aFFData.setResult(0);
- break;
- case true:
- aFFData.setResult(1);
- break;
- default:
- ASSERT(!this, "how did that happen");
- }
- }
+ aFFData.setResult(nTemp);
::rtl::OUString aStr;
static ::rtl::OUString sName(C2U("Name"));
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 96ae026c1d..d22decdf9a 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -35,6 +35,10 @@
#include <algorithm>
#include <functional>
#include <iostream>
+#if OSL_DEBUG_LEVEL > 0
+# include <cstdio>
+#endif
+
#include <hintids.hxx>
#include <tools/urlobj.hxx>
#include <editeng/boxitem.hxx>
@@ -73,6 +77,7 @@
#include <doc.hxx>
#include <docary.hxx>
#include <swtable.hxx>
+#include <swtblfmt.hxx>
#include <section.hxx>
#include <pagedesc.hxx>
#include <swrect.hxx>
@@ -102,7 +107,7 @@
#include <ndgrf.hxx>
#include <ndole.hxx>
-
+#include <cstdio>
using namespace ::com::sun::star;
using namespace ::com::sun::star::i18n;
@@ -1895,6 +1900,17 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
#endif
AttrOutput().TableInfoCell( pTextNodeInfoInner );
+ if (pTextNodeInfoInner->isFirstInTable())
+ {
+ const SwTable * pTable = pTextNodeInfoInner->getTable();
+ const SwTableFmt * pTabFmt =
+ dynamic_cast<const SwTableFmt *>(pTable->GetRegisteredIn());
+ if (pTabFmt != NULL)
+ {
+ if (pTabFmt->GetBreak().GetBreak() == SVX_BREAK_PAGE_BEFORE)
+ AttrOutput().PageBreakBefore(true);
+ }
+ }
}
if ( !bFlyInTable )
@@ -2709,7 +2725,7 @@ void MSWordExportBase::OutputContentNode( const SwCntntNode& rNode )
break;
default:
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "Unhandled node, type == %d\n", rNode.GetNodeType() );
+ OSL_TRACE("Unhandled node, type == %d\n", rNode.GetNodeType() );
#endif
break;
}
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 8f39cb61c9..651c09e0ae 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -432,10 +432,11 @@ void MSWordStyles::WriteProperties( const SwFmt* pFmt, bool bParProp, USHORT nPo
ASSERT( m_rExport.pCurrentStyle == NULL, "Current style not NULL" ); // set current style before calling out
m_rExport.pCurrentStyle = pFmt;
-
+
m_rExport.OutputFormat( *pFmt, bParProp, !bParProp );
-
- ASSERT( m_rExport.pCurrentStyle != pFmt, "current style was changed" ); // reset current style...
+
+ ASSERT( m_rExport.pCurrentStyle == pFmt, "current style was changed" );
+ // reset current style...
m_rExport.pCurrentStyle = NULL;
if ( bInsDefCharSiz ) // nicht abgeleitet v. anderem Style
@@ -912,10 +913,10 @@ MSWordSections::MSWordSections( MSWordExportBase& rExport )
SFX_ITEM_ON == pSet->GetItemState( RES_PAGEDESC, true, &pI ) &&
( (SwFmtPageDesc*)pI )->GetPageDesc() )
{
- AppendSep( *(SwFmtPageDesc*)pI, *pNd, pFmt, nRstLnNum );
+ AppendSection( *(SwFmtPageDesc*)pI, *pNd, pFmt, nRstLnNum );
}
else
- AppendSep( rExport.pAktPageDesc, pFmt, nRstLnNum );
+ AppendSection( rExport.pAktPageDesc, pFmt, nRstLnNum );
}
WW8_WrPlcSepx::WW8_WrPlcSepx( MSWordExportBase& rExport )
@@ -924,7 +925,7 @@ WW8_WrPlcSepx::WW8_WrPlcSepx( MSWordExportBase& rExport )
pAttrs( 0 ),
pTxtPos( 0 )
{
- // to be in sync with the AppendSep() call in the MSWordSections
+ // to be in sync with the AppendSection() call in the MSWordSections
// constructor
aCps.Insert( ULONG( 0 ), aCps.Count() );
}
@@ -987,7 +988,7 @@ const WW8_SepInfo* MSWordSections::CurrentSectionInfo()
return NULL;
}
-void MSWordSections::AppendSep( const SwPageDesc* pPd,
+void MSWordSections::AppendSection( const SwPageDesc* pPd,
const SwSectionFmt* pSectionFmt, ULONG nLnNumRestartNo )
{
aSects.Insert( WW8_SepInfo( pPd, pSectionFmt, nLnNumRestartNo ),
@@ -1000,10 +1001,10 @@ void WW8_WrPlcSepx::AppendSep( WW8_CP nStartCp, const SwPageDesc* pPd,
{
aCps.Insert( nStartCp, aCps.Count() );
- MSWordSections::AppendSep( pPd, pSectionFmt, nLnNumRestartNo );
+ AppendSection( pPd, pSectionFmt, nLnNumRestartNo );
}
-void MSWordSections::AppendSep( const SwFmtPageDesc& rPD,
+void MSWordSections::AppendSection( const SwFmtPageDesc& rPD,
const SwNode& rNd, const SwSectionFmt* pSectionFmt, ULONG nLnNumRestartNo )
{
WW8_SepInfo aI( rPD.GetPageDesc(), pSectionFmt, nLnNumRestartNo,
@@ -1017,7 +1018,7 @@ void WW8_WrPlcSepx::AppendSep( WW8_CP nStartCp, const SwFmtPageDesc& rPD,
{
aCps.Insert(nStartCp, aCps.Count());
- MSWordSections::AppendSep( rPD, rNd, pSectionFmt, nLnNumRestartNo );
+ AppendSection( rPD, rNd, pSectionFmt, nLnNumRestartNo );
}
// MSWordSections::SetNum() setzt in jeder Section beim 1. Aufruf den
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 916ad970df..dc63f31800 100644..100755
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -58,10 +58,12 @@
#include <filter/msfilter/msoleexp.hxx>
#include <filter/msfilter/msocximex.hxx>
#include <editeng/lrspitem.hxx>
+#include <editeng/ulspitem.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/brshitem.hxx>
#include <swtypes.hxx>
#include <swrect.hxx>
+#include <swtblfmt.hxx>
#include <txatbase.hxx>
#include <fmtcntnt.hxx>
#include <fmtpdsc.hxx>
@@ -1023,7 +1025,8 @@ bool WW8_WrFkp::Combine()
return false;
if( nIMax )
memcpy( pFkp + ( nIMax + 1 ) * 4, pOfs, nIMax * nItemSize );
- DELETEZ( pOfs );
+ delete[] pOfs;
+ pOfs = 0;
((BYTE*)pFkp)[511] = nIMax;
bCombined = true;
@@ -1910,32 +1913,34 @@ void WW8AttributeOutput::TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTa
TableBidi( pTableTextNodeInfoInner );
TableVerticalCell( pTableTextNodeInfoInner );
TableOrientation( pTableTextNodeInfoInner );
+ TableSpacing( pTableTextNodeInfoInner );
}
}
}
-static sal_uInt16 lcl_TCFlags(const SwTableBox * pBox)
+static sal_uInt16 lcl_TCFlags(const SwTableBox * pBox, long nRowSpan)
{
sal_uInt16 nFlags = 0;
- long nRowSpan = pBox->getRowSpan();
-
if (nRowSpan > 1)
nFlags |= (3 << 5);
else if (nRowSpan < 0)
nFlags |= (1 << 5);
- const SwFrmFmt * pFmt = pBox->GetFrmFmt();
- switch (pFmt->GetVertOrient().GetVertOrient())
+ if (pBox != NULL)
{
- case text::VertOrientation::CENTER:
- nFlags |= (1 << 7);
- break;
- case text::VertOrientation::BOTTOM:
- nFlags |= (2 << 7);
- break;
- default:
- break;
+ const SwFrmFmt * pFmt = pBox->GetFrmFmt();
+ switch (pFmt->GetVertOrient().GetVertOrient())
+ {
+ case text::VertOrientation::CENTER:
+ nFlags |= (1 << 7);
+ break;
+ case text::VertOrientation::BOTTOM:
+ nFlags |= (2 << 7);
+ break;
+ default:
+ break;
+ }
}
return nFlags;
@@ -2091,11 +2096,43 @@ void WW8AttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t
}
}
+void WW8AttributeOutput::TableSpacing(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner)
+{
+ const SwTable * pTable = pTableTextNodeInfoInner->getTable();
+ const SwTableFmt * pTableFmt = dynamic_cast<const SwTableFmt *>(pTable->GetRegisteredIn());
+
+ if (pTableFmt != NULL)
+ {
+ const SvxULSpaceItem & rUL = pTableFmt->GetULSpace();
+
+ if (rUL.GetUpper() > 0)
+ {
+ sal_uInt8 nPadding = 2;
+ sal_uInt8 nPcVert = 0;
+ sal_uInt8 nPcHorz = 0;
+
+ sal_uInt8 nTPc = (nPadding << 4) | (nPcVert << 2) | nPcHorz;
+
+ m_rWW8Export.InsUInt16(NS_sprm::LN_TPc);
+ m_rWW8Export.pO->Insert( nTPc, m_rWW8Export.pO->Count() );
+
+ m_rWW8Export.InsUInt16(NS_sprm::LN_TDyaAbs);
+ m_rWW8Export.InsUInt16(rUL.GetUpper());
+
+ m_rWW8Export.InsUInt16(NS_sprm::LN_TDyaFromText);
+ m_rWW8Export.InsUInt16(rUL.GetUpper());
+ }
+
+ if (rUL.GetLower() > 0)
+ {
+ m_rWW8Export.InsUInt16(NS_sprm::LN_TDyaFromTextBottom);
+ m_rWW8Export.InsUInt16(rUL.GetLower());
+ }
+ }
+}
+
void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )
{
- const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox();
- const SwTableLine * pTabLine = pTabBox->GetUpper();
- const SwTableBoxes & rTabBoxes = pTabLine->GetTabBoxes();
const SwTable * pTable = pTableTextNodeInfoInner->getTable();
if ( pTable->GetRowsToRepeat() > pTableTextNodeInfoInner->getRow() )
@@ -2107,11 +2144,11 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
m_rWW8Export.pO->Insert( 1, m_rWW8Export.pO->Count() );
}
+ ww8::TableBoxVectorPtr pTableBoxes =
+ pTableTextNodeInfoInner->getTableBoxesOfRow();
// number of cell written
- sal_uInt32 nBoxes = rTabBoxes.Count();
- if ( nBoxes > 32 )
- nBoxes = 32;
-
+ sal_uInt32 nBoxes = pTableBoxes->size();
+
// sprm header
m_rWW8Export.InsUInt16( NS_sprm::LN_TDefTable );
sal_uInt16 nSprmSize = 2 + (nBoxes + 1) * 2 + nBoxes * 20;
@@ -2161,86 +2198,71 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
}
}
- sal_uInt32 n = 0;
- m_rWW8Export.InsUInt16( nTblOffset );
-
- std::vector<SwTwips> gridCols = GetGridCols( pTableTextNodeInfoInner );
- for ( std::vector<SwTwips>::const_iterator it = gridCols.begin(), end = gridCols.end(); it != end; ++it )
- {
- m_rWW8Export.InsUInt16( static_cast<USHORT>( *it ) + nTblOffset );
- }
+ m_rWW8Export.InsUInt16( nTblOffset );
+
+ ww8::GridColsPtr pGridCols = GetGridCols( pTableTextNodeInfoInner );
+ for ( ww8::GridCols::const_iterator it = pGridCols->begin(),
+ end = pGridCols->end(); it != end; ++it )
+ {
+ m_rWW8Export.InsUInt16( static_cast<USHORT>( *it ) + nTblOffset );
+ }
+
+ /* TCs */
+ ww8::RowSpansPtr pRowSpans = pTableTextNodeInfoInner->getRowSpansOfRow();
+ ww8::RowSpans::const_iterator aItRowSpans = pRowSpans->begin();
+ ww8::TableBoxVector::const_iterator aIt;
+ ww8::TableBoxVector::const_iterator aItEnd = pTableBoxes->end();
+
+#ifdef DEBUG
+ size_t nRowSpans = pRowSpans->size();
+ size_t nTableBoxes = pTableBoxes->size();
+ (void) nRowSpans;
+ (void) nTableBoxes;
+#endif
- /* TCs */
- for ( n = 0; n < nBoxes; n++ )
+ for( aIt = pTableBoxes->begin(); aIt != aItEnd; ++aIt, ++aItRowSpans)
{
#ifdef DEBUG
sal_uInt16 npOCount = m_rWW8Export.pO->Count();
#endif
- SwTableBox * pTabBox1 = rTabBoxes[n];
- const SwFrmFmt & rBoxFmt = *(pTabBox1->GetFrmFmt());
+ const SwTableBox * pTabBox1 = *aIt;
+ const SwFrmFmt * pBoxFmt = NULL;
+ if (pTabBox1 != NULL)
+ pBoxFmt = pTabBox1->GetFrmFmt();
+
if ( m_rWW8Export.bWrtWW8 )
{
- sal_uInt16 nFlags = lcl_TCFlags(pTabBox1);
- m_rWW8Export.InsUInt16( nFlags );
+ sal_uInt16 nFlags =
+ lcl_TCFlags(pTabBox1, *aItRowSpans);
+ m_rWW8Export.InsUInt16( nFlags );
}
static BYTE aNullBytes[] = { 0x0, 0x0 };
m_rWW8Export.pO->Insert( aNullBytes, 2, m_rWW8Export.pO->Count() ); // dummy
- m_rWW8Export.Out_SwFmtTableBox( *m_rWW8Export.pO, rBoxFmt.GetBox() ); // 8/16 Byte
+ if (pBoxFmt != NULL)
+ {
+ const SvxBoxItem & rBoxItem = pBoxFmt->GetBox();
+
+ m_rWW8Export.Out_SwFmtTableBox( *m_rWW8Export.pO, &rBoxItem ); // 8/16 Byte
+ }
+ else
+ m_rWW8Export.Out_SwFmtTableBox( *m_rWW8Export.pO, NULL); // 8/16 Byte
#ifdef DEBUG
- ::std::clog << "<tclength>" << m_rWW8Export.pO->Count() - npOCount << "</tclength>"
- << ::std::endl;
+ ::std::clog << "<tclength>" << m_rWW8Export.pO->Count() - npOCount << "</tclength>"
+ << ::std::endl;
#endif
}
}
-std::vector<SwTwips> AttributeOutputBase::GetGridCols( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )
+ww8::GridColsPtr AttributeOutputBase::GetGridCols( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )
{
- std::vector<SwTwips> gridCols;
-
- const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox();
- const SwTableLine * pTabLine = pTabBox->GetUpper();
- const SwTableBoxes & rTabBoxes = pTabLine->GetTabBoxes();
- const SwTable *pTable = pTableTextNodeInfoInner->getTable( );
-
- // number of cell written
- sal_uInt32 nBoxes = rTabBoxes.Count();
- if ( nBoxes > 32 )
- nBoxes = 32;
-
- const SwFrmFmt *pFmt = pTable->GetFrmFmt();
- ASSERT(pFmt,"Impossible");
- if (!pFmt)
- return gridCols;
-
- const SwFmtFrmSize &rSize = pFmt->GetFrmSize();
- unsigned long nTblSz = static_cast<unsigned long>(rSize.GetWidth());
-
- sal_uInt32 nPageSize = 0;
- bool bRelBoxSize = false;
-
- GetTablePageSize( pTableTextNodeInfoInner, nPageSize, bRelBoxSize );
-
- SwTwips nSz = 0;
- for ( sal_uInt32 n = 0; n < nBoxes; n++ )
- {
- const SwFrmFmt* pBoxFmt = rTabBoxes[ n ]->GetFrmFmt();
- const SwFmtFrmSize& rLSz = pBoxFmt->GetFrmSize();
- nSz += rLSz.GetWidth();
- SwTwips nCalc = nSz;
- if ( bRelBoxSize )
- nCalc = ( nCalc * nPageSize ) / nTblSz;
-
- gridCols.push_back( nCalc );
- }
-
- return gridCols;
+ return pTableTextNodeInfoInner->getGridColsOfRow(*this);
}
-
-void AttributeOutputBase::GetTablePageSize( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner, sal_uInt32& rPageSize, bool& rRelBoxSize )
+
+void AttributeOutputBase::GetTablePageSize( ww8::WW8TableNodeInfoInner * pTableTextNodeInfoInner, sal_uInt32& rPageSize, bool& rRelBoxSize )
{
sal_uInt32 nPageSize = 0;
@@ -2433,13 +2455,15 @@ typedef ::std::deque<SwNode *> SwNodeDeque;
void MSWordExportBase::WriteText()
{
-#ifdef DEBUG
- ::std::clog << "<WriteText>" << ::std::endl;
- ::std::clog << dbg_out(pCurPam->GetDoc()->GetNodes()) << ::std::endl;
-
- SwNodeHashSet aNodeSet;
- SwNodeDeque aNodeDeque;
-#endif
+// whoever has need of the missing function should go and implement it!
+// This damned piece of code always breaks builds...
+//#ifdef DEBUG
+// ::std::clog << "<WriteText>" << ::std::endl;
+// ::std::clog << dbg_out(pCurPam->GetDoc()->GetNodes()) << ::std::endl;
+//
+// SwNodeHashSet aNodeSet;
+// SwNodeDeque aNodeDeque;
+//#endif
while( pCurPam->GetPoint()->nNode < pCurPam->GetMark()->nNode ||
( pCurPam->GetPoint()->nNode == pCurPam->GetMark()->nNode &&
@@ -2447,6 +2471,9 @@ void MSWordExportBase::WriteText()
{
SwNode * pNd = pCurPam->GetNode();
+// whoever has need of the missing function should go and implement it!
+// This damned piece of code always breaks builds...
+#if 0
#ifdef DEBUG
if (aNodeSet.find(pNd) == aNodeSet.end())
{
@@ -2455,20 +2482,10 @@ void MSWordExportBase::WriteText()
}
else
{
- ::std::clog << "<already-done><which>" << dbg_out(*pNd)
- << "</which><nodes>" << ::std::endl;
-
- SwNodeDeque::const_iterator aEnd = aNodeDeque.end();
-
- for (SwNodeDeque::const_iterator aIt = aNodeDeque.begin();
- aIt != aEnd; aIt++)
- {
- ::std::clog << dbg_out(**aIt) << ::std::endl;
- }
-
- ::std::clog << "</nodes></already-done>" << ::std::endl;
+ ::std::clog << "<already-done>" << dbg_out(*pNd) << "</already-done>" << ::std::endl;
}
#endif
+#endif
if ( pNd->IsTxtNode() )
SectionBreaksAndFrames( *pNd->GetTxtNode() );
@@ -2522,6 +2539,10 @@ void MSWordExportBase::WriteText()
AppendSection( pAktPageDesc, pParentFmt, nRstLnNum );
}
}
+ else if ( pNd->IsStartNode() )
+ {
+ OutputStartNode( *pNd->GetStartNode() );
+ }
else if ( pNd->IsEndNode() )
{
OutputEndNode( *pNd->GetEndNode() );
@@ -2980,7 +3001,6 @@ void WW8Export::ExportDocument_Impl()
pFib = new WW8Fib( bWrtWW8 ? 8 : 6 );
- SvStream* pOldStrm = &(Strm()); // JP 19.05.99: wozu das ???
SvStorageStreamRef xWwStrm( GetWriter().GetStorage().OpenSotStream( aMainStg ) );
SvStorageStreamRef xTableStrm( xWwStrm ), xDataStrm( xWwStrm );
xWwStrm->SetBufferSize( 32768 );
@@ -3000,7 +3020,7 @@ void WW8Export::ExportDocument_Impl()
xDataStrm->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
}
- GetWriter().SetStrm( *xWwStrm );
+ GetWriter().SetStream( & *xWwStrm );
pTableStrm = &xTableStrm;
pDataStrm = &xDataStrm;
@@ -3022,7 +3042,8 @@ void WW8Export::ExportDocument_Impl()
{
bEncrypt =true;
- GetWriter().SetStrm( *aTempMain.GetStream( STREAM_READWRITE | STREAM_SHARE_DENYWRITE ) );
+ GetWriter().SetStream(
+ aTempMain.GetStream( STREAM_READWRITE | STREAM_SHARE_DENYWRITE ) );
pTableStrm = aTempTable.GetStream( STREAM_READWRITE | STREAM_SHARE_DENYWRITE );
@@ -3174,7 +3195,7 @@ void WW8Export::ExportDocument_Impl()
delete pPiece;
delete pDop;
delete pFib;
- GetWriter().SetStrm( *pOldStrm );
+ GetWriter().SetStream( 0 );
xWwStrm->SetBufferSize( 0 );
@@ -3684,6 +3705,30 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // leeren
+ sal_uInt32 nShadowsBefore = pNodeInfoInner->getShadowsBefore();
+ if (nShadowsBefore > 0)
+ {
+ ww8::WW8TableNodeInfoInner::Pointer_t
+ pTmpNodeInfoInner(new ww8::WW8TableNodeInfoInner(NULL));
+
+ pTmpNodeInfoInner->setDepth(pNodeInfoInner->getDepth());
+ pTmpNodeInfoInner->setEndOfCell(true);
+
+ for (sal_uInt32 n = 0; n < nShadowsBefore; ++n)
+ {
+ m_rWW8Export.WriteCR(pTmpNodeInfoInner);
+
+ m_rWW8Export.pO->Insert( (BYTE*)&nStyle, 2,
+ m_rWW8Export.pO->Count() ); // Style #
+ TableInfoCell(pTmpNodeInfoInner);
+ m_rWW8Export.pPapPlc->AppendFkpEntry
+ ( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
+ m_rWW8Export.pO->GetData() );
+
+ m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // leeren
+ }
+ }
+
if (pNodeInfoInner->isEndOfCell())
{
#ifdef DEBUG
@@ -3699,6 +3744,28 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // leeren
}
+ sal_uInt32 nShadowsAfter = pNodeInfoInner->getShadowsAfter();
+ if (nShadowsAfter > 0)
+ {
+ ww8::WW8TableNodeInfoInner::Pointer_t
+ pTmpNodeInfoInner(new ww8::WW8TableNodeInfoInner(NULL));
+
+ pTmpNodeInfoInner->setDepth(pNodeInfoInner->getDepth());
+ pTmpNodeInfoInner->setEndOfCell(true);
+
+ for (sal_uInt32 n = 0; n < nShadowsAfter; ++n)
+ {
+ m_rWW8Export.WriteCR(pTmpNodeInfoInner);
+
+ m_rWW8Export.pO->Insert( (BYTE*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
+ TableInfoCell(pTmpNodeInfoInner);
+ m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
+ m_rWW8Export.pO->GetData() );
+
+ m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // leeren
+ }
+ }
+
if (pNodeInfoInner->isEndOfLine())
{
#ifdef DEBUG
@@ -3719,33 +3786,63 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
#endif
}
+void MSWordExportBase::OutputStartNode( const SwStartNode & rNode)
+{
+#ifdef DEBUG
+ ::std::clog << "<OutWW8_SwStartNode>" << dbg_out(&rNode) << ::std::endl;
+#endif
+
+ ww8::WW8TableNodeInfo::Pointer_t pNodeInfo =
+ mpTableInfo->getTableNodeInfo( &rNode );
+
+ if (pNodeInfo.get() != NULL)
+ {
+#ifdef DEBUG
+ ::std::clog << pNodeInfo->toString() << ::std::endl;
+#endif
+
+ const ww8::WW8TableNodeInfo::Inners_t aInners = pNodeInfo->getInners();
+ ww8::WW8TableNodeInfo::Inners_t::const_reverse_iterator aIt(aInners.rbegin());
+ ww8::WW8TableNodeInfo::Inners_t::const_reverse_iterator aEnd(aInners.rend());
+ while (aIt != aEnd)
+ {
+ ww8::WW8TableNodeInfoInner::Pointer_t pInner = aIt->second;
+
+ AttrOutput().TableNodeInfoInner(pInner);
+ aIt++;
+ }
+ }
+#ifdef DEBUG
+ ::std::clog << "</OutWW8_SwStartNode>" << ::std::endl;
+#endif
+}
+
void MSWordExportBase::OutputEndNode( const SwEndNode &rNode )
{
#ifdef DEBUG
- ::std::clog << "<OutWW8_SwEndNode>" << dbg_out(&rNode) << ::std::endl;
+// whoever has need of the missing function should go and implement it!
+// This piece of code always breaks builds...
+// ::std::clog << "<OutWW8_SwEndNode>" << dbg_out(&rNode) << ::std::endl;
#endif
ww8::WW8TableNodeInfo::Pointer_t pNodeInfo = mpTableInfo->getTableNodeInfo( &rNode );
- if (pNodeInfo)
- {
- if (pNodeInfo.get() != NULL)
- {
-#ifdef DEBUG
- ::std::clog << pNodeInfo->toString() << ::std::endl;
+ if (pNodeInfo.get() != NULL)
+ {
+#ifdef DEBUG
+ ::std::clog << pNodeInfo->toString() << ::std::endl;
#endif
-
- const ww8::WW8TableNodeInfo::Inners_t aInners = pNodeInfo->getInners();
- ww8::WW8TableNodeInfo::Inners_t::const_iterator aIt(aInners.begin());
- ww8::WW8TableNodeInfo::Inners_t::const_iterator aEnd(aInners.end());
- while (aIt != aEnd)
- {
- ww8::WW8TableNodeInfoInner::Pointer_t pInner = aIt->second;
- AttrOutput().TableNodeInfoInner(pInner);
- aIt++;
- }
- }
- }
+
+ const ww8::WW8TableNodeInfo::Inners_t aInners = pNodeInfo->getInners();
+ ww8::WW8TableNodeInfo::Inners_t::const_iterator aIt(aInners.begin());
+ ww8::WW8TableNodeInfo::Inners_t::const_iterator aEnd(aInners.end());
+ while (aIt != aEnd)
+ {
+ ww8::WW8TableNodeInfoInner::Pointer_t pInner = aIt->second;
+ AttrOutput().TableNodeInfoInner(pInner);
+ aIt++;
+ }
+ }
#ifdef DEBUG
::std::clog << "</OutWW8_SwEndNode>" << ::std::endl;
#endif
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index e513db155d..43211a962e 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -190,12 +190,12 @@ protected:
MSWordSections& operator=( const MSWordSections& );
public:
MSWordSections( MSWordExportBase& rExport );
- ~MSWordSections();
+ virtual ~MSWordSections();
- void AppendSep( const SwPageDesc* pPd,
+ void AppendSection( const SwPageDesc* pPd,
const SwSectionFmt* pSectionFmt = 0,
ULONG nLnNumRestartNo = 0 );
- void AppendSep( const SwFmtPageDesc& rPd,
+ void AppendSection( const SwFmtPageDesc& rPd,
const SwNode& rNd,
const SwSectionFmt* pSectionFmt,
ULONG nLnNumRestartNo );
@@ -763,6 +763,9 @@ protected:
virtual bool DisallowInheritingOutlineNumbering(const SwFmt &rFmt) = 0;
protected:
+ /// Output SwStartNode
+ virtual void OutputStartNode( const SwStartNode& );
+
/// Output SwEndNode
virtual void OutputEndNode( const SwEndNode& );
@@ -1017,7 +1020,7 @@ public:
const SwPageDesc* pNewPgDesc = 0 );
void Out_SwFmtBox(const SvxBoxItem& rBox, bool bShadow);
- void Out_SwFmtTableBox( WW8Bytes& rO, const SvxBoxItem& rBox );
+ void Out_SwFmtTableBox( WW8Bytes& rO, const SvxBoxItem * rBox );
BYTE TransCol( const Color& rCol );
bool TransBrush(const Color& rCol, WW8_SHD& rShd);
WW8_BRC TranslateBorderLine(const SvxBorderLine& pLine,
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index b920a8e8ad..18437ff621 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -30,6 +30,10 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
+#if OSL_DEBUG_LEVEL > 0
+# include <cstdio>
+#endif
+
#include <com/sun/star/embed/XEmbedPersist.hpp>
#include <com/sun/star/embed/Aspects.hpp>
#include <rtl/math.hxx>
@@ -73,6 +77,7 @@
#include "escher.hxx"
#include "docsh.hxx"
+#include <cstdio>
using namespace ::com::sun::star;
using namespace nsFieldFlags;
@@ -94,9 +99,7 @@ using namespace nsFieldFlags;
void WW8Export::OutputGrfNode( const SwGrfNode& /*rNode*/ )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "WW8Export::OutputGrfNode( const SwGrfNode& )\n" );
-#endif
+ OSL_TRACE("WW8Export::OutputGrfNode( const SwGrfNode& )\n" );
ASSERT( mpParentFrame, "frame not set!" );
if ( mpParentFrame )
{
@@ -216,9 +219,7 @@ bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet,
void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "WW8Export::OutputOLENode( const SwOLENode& rOLENode )\n" );
-#endif
+ OSL_TRACE("WW8Export::OutputOLENode( const SwOLENode& rOLENode )\n" );
BYTE *pSpecOLE;
BYTE *pDataAdr;
short nSize;
@@ -602,7 +603,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
substitute the final size and loose on retaining the scaling factor but
still keep the correct display size anyway.
*/
- if ( (aGrTwipSz.Width() > USHRT_MAX) || (aGrTwipSz.Height() > USHRT_MAX)
+ if ( (aGrTwipSz.Width() > SHRT_MAX) || (aGrTwipSz.Height() > SHRT_MAX)
|| (aGrTwipSz.Width() < 0 ) || (aGrTwipSz.Height() < 0) )
{
aGrTwipSz.Width() = nWidth;
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 61e8d6016c..1e5d01101f 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -1743,9 +1743,9 @@ static void InsertSpecialChar( WW8Export& rWrt, BYTE c,
aItems.GetData());
}
-String lcl_GetExpandedField(const SwField &rFld)
+String lcl_GetExpandedField(const SwField &rFld, SwDoc const& rDoc)
{
- String sRet(rFld.Expand());
+ String sRet(rFld.ExpandField(rDoc.IsClipBoard()));
//replace LF 0x0A with VT 0x0B
sRet.SearchAndReplaceAll(0x0A, 0x0B);
@@ -1871,7 +1871,7 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
{
String sOut;
if( pFld )
- sOut = lcl_GetExpandedField(*pFld);
+ sOut = lcl_GetExpandedField(*pFld, *pDoc);
else
sOut = rFldCmd;
if( sOut.Len() )
@@ -2598,7 +2598,7 @@ void WW8AttributeOutput::RefField( const SwField &rFld, const String &rRef)
sStr.APPEND_CONST_ASC( "\" " );
m_rWW8Export.OutputField( &rFld, ww::eREF, sStr, WRITEFIELD_START |
WRITEFIELD_CMD_START | WRITEFIELD_CMD_END );
- String sVar = lcl_GetExpandedField( rFld );
+ String sVar = lcl_GetExpandedField( rFld, *GetExport().pDoc );
if ( sVar.Len() )
{
if ( m_rWW8Export.IsUnicode() )
@@ -2614,7 +2614,7 @@ void WW8AttributeOutput::RefField( const SwField &rFld, const String &rRef)
void WW8AttributeOutput::WriteExpand( const SwField* pFld )
{
- String sExpand( lcl_GetExpandedField( *pFld ) );
+ String sExpand( lcl_GetExpandedField( *pFld, *GetExport().pDoc ) );
if ( m_rWW8Export.IsUnicode() )
SwWW8Writer::WriteString16( m_rWW8Export.Strm(), sExpand, false );
else
@@ -4297,17 +4297,24 @@ void WW8Export::Out_SwFmtBox(const SvxBoxItem& rBox, bool bShadow)
// ( Tabellenumrandungen fransen sonst aus )
// Ein WW8Bytes-Ptr wird als Ausgabe-Parameter uebergeben
-void WW8Export::Out_SwFmtTableBox( WW8Bytes& rO, const SvxBoxItem& rBox )
+void WW8Export::Out_SwFmtTableBox( WW8Bytes& rO, const SvxBoxItem * pBox )
{
// moeglich und vielleicht besser waere 0xffff
static const USHORT aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
+ static const SvxBorderLine aBorderLine;
+
const USHORT* pBrd = aBorders;
for( int i = 0; i < 4; ++i, ++pBrd )
{
- const SvxBorderLine* pLn = rBox.GetLine( *pBrd );
+ const SvxBorderLine* pLn;
+ if (pBox != NULL)
+ pLn = pBox->GetLine( *pBrd );
+ else
+ pLn = & aBorderLine;
+
Out_BorderLine(rO, pLn, 0, 0, false);
}
}
@@ -5254,9 +5261,7 @@ void AttributeOutputBase::OutputItem( const SfxPoolItem& rHt )
break;
default:
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "Unhandled SfxPoolItem with id %d.\n", rHt.Which() );
-#endif
+ OSL_TRACE("Unhandled SfxPoolItem with id %d.\n", rHt.Which() );
break;
}
}
diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx b/sw/source/filter/ww8/ww8attributeoutput.hxx
index c8b39265d0..c064da270b 100644
--- a/sw/source/filter/ww8/ww8attributeoutput.hxx
+++ b/sw/source/filter/ww8/ww8attributeoutput.hxx
@@ -124,6 +124,8 @@ public:
virtual void TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
+ virtual void TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
+
virtual void TableRowEnd( sal_uInt32 nDepth = 1 );
/// Start of the styles table.
diff --git a/sw/source/filter/ww8/ww8graf.hxx b/sw/source/filter/ww8/ww8graf.hxx
index fc3b508b3c..7e648d9dd8 100644
--- a/sw/source/filter/ww8/ww8graf.hxx
+++ b/sw/source/filter/ww8/ww8graf.hxx
@@ -30,12 +30,8 @@
#ifndef _WW8GRAF_HXX
#define _WW8GRAF_HXX
-#ifndef __SGI_STL_VECTOR
#include <vector>
-#endif
-#ifndef __SGI_STL_STACK
#include <stack>
-#endif
#include "writerhelper.hxx"
struct EscherShape
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 58257baebb..2945cdec83 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -573,60 +573,63 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
aSet.Put( SdrTextVertAdjustItem( eTVA ) );
aSet.Put( SdrTextHorzAdjustItem( eTHA ) );
- pObj->SetMergedItemSet(aSet);
- pObj->SetModel(pSdrModel);
-
- if (bVerticalText && dynamic_cast< SdrTextObj* >( pObj ) )
- dynamic_cast< SdrTextObj* >( pObj )->SetVerticalWriting(sal_True);
-
- if ( bIsSimpleDrawingTextBox )
+ if (pObj != NULL)
{
- if ( nTextRotationAngle )
+ pObj->SetMergedItemSet(aSet);
+ pObj->SetModel(pSdrModel);
+
+ if (bVerticalText && dynamic_cast< SdrTextObj* >( pObj ) )
+ dynamic_cast< SdrTextObj* >( pObj )->SetVerticalWriting(sal_True);
+
+ if ( bIsSimpleDrawingTextBox )
{
- long nMinWH = rTextRect.GetWidth() < rTextRect.GetHeight() ?
- rTextRect.GetWidth() : rTextRect.GetHeight();
- nMinWH /= 2;
- Point aPivot(rTextRect.TopLeft());
- aPivot.X() += nMinWH;
- aPivot.Y() += nMinWH;
- double a = nTextRotationAngle * nPi180;
- pObj->NbcRotate(aPivot, nTextRotationAngle, sin(a), cos(a));
+ if ( nTextRotationAngle )
+ {
+ long nMinWH = rTextRect.GetWidth() < rTextRect.GetHeight() ?
+ rTextRect.GetWidth() : rTextRect.GetHeight();
+ nMinWH /= 2;
+ Point aPivot(rTextRect.TopLeft());
+ aPivot.X() += nMinWH;
+ aPivot.Y() += nMinWH;
+ double a = nTextRotationAngle * nPi180;
+ pObj->NbcRotate(aPivot, nTextRotationAngle, sin(a), cos(a));
+ }
}
- }
- if ( ( ( rObjData.nSpFlags & SP_FFLIPV ) || mnFix16Angle || nTextRotationAngle ) && dynamic_cast< SdrObjCustomShape* >( pObj ) )
- {
- SdrObjCustomShape* pCustomShape = dynamic_cast< SdrObjCustomShape* >( pObj );
-
- double fExtraTextRotation = 0.0;
- if ( mnFix16Angle && !( GetPropertyValue( DFF_Prop_FitTextToShape ) & 4 ) )
- { // text is already rotated, we have to take back the object rotation if DFF_Prop_RotateText is false
- fExtraTextRotation = -mnFix16Angle;
- }
- if ( rObjData.nSpFlags & SP_FFLIPV ) // sj: in ppt the text is flipped, whereas in word the text
- { // remains unchanged, so we have to take back the flipping here
- fExtraTextRotation += 18000.0; // because our core will flip text if the shape is flipped.
+ if ( ( ( rObjData.nSpFlags & SP_FFLIPV ) || mnFix16Angle || nTextRotationAngle ) && dynamic_cast< SdrObjCustomShape* >( pObj ) )
+ {
+ SdrObjCustomShape* pCustomShape = dynamic_cast< SdrObjCustomShape* >( pObj );
+
+ double fExtraTextRotation = 0.0;
+ if ( mnFix16Angle && !( GetPropertyValue( DFF_Prop_FitTextToShape ) & 4 ) )
+ { // text is already rotated, we have to take back the object rotation if DFF_Prop_RotateText is false
+ fExtraTextRotation = -mnFix16Angle;
+ }
+ if ( rObjData.nSpFlags & SP_FFLIPV ) // sj: in ppt the text is flipped, whereas in word the text
+ { // remains unchanged, so we have to take back the flipping here
+ fExtraTextRotation += 18000.0; // because our core will flip text if the shape is flipped.
+ }
+ fExtraTextRotation += nTextRotationAngle;
+ if ( !::basegfx::fTools::equalZero( fExtraTextRotation ) )
+ {
+ fExtraTextRotation /= 100.0;
+ SdrCustomShapeGeometryItem aGeometryItem( (SdrCustomShapeGeometryItem&)pCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
+ const rtl::OUString sTextRotateAngle( RTL_CONSTASCII_USTRINGPARAM ( "TextRotateAngle" ) );
+ com::sun::star::beans::PropertyValue aPropVal;
+ aPropVal.Name = sTextRotateAngle;
+ aPropVal.Value <<= fExtraTextRotation;
+ aGeometryItem.SetPropertyValue( aPropVal );
+ pCustomShape->SetMergedItem( aGeometryItem );
+ }
}
- fExtraTextRotation += nTextRotationAngle;
- if ( !::basegfx::fTools::equalZero( fExtraTextRotation ) )
+ else if ( mnFix16Angle )
{
- fExtraTextRotation /= 100.0;
- SdrCustomShapeGeometryItem aGeometryItem( (SdrCustomShapeGeometryItem&)pCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
- const rtl::OUString sTextRotateAngle( RTL_CONSTASCII_USTRINGPARAM ( "TextRotateAngle" ) );
- com::sun::star::beans::PropertyValue aPropVal;
- aPropVal.Name = sTextRotateAngle;
- aPropVal.Value <<= fExtraTextRotation;
- aGeometryItem.SetPropertyValue( aPropVal );
- pCustomShape->SetMergedItem( aGeometryItem );
+ // rotate text with shape ?
+ double a = mnFix16Angle * nPi180;
+ pObj->NbcRotate( rObjData.aBoundRect.Center(), mnFix16Angle,
+ sin( a ), cos( a ) );
}
}
- else if ( mnFix16Angle )
- {
- // rotate text with shape ?
- double a = mnFix16Angle * nPi180;
- pObj->NbcRotate( rObjData.aBoundRect.Center(), mnFix16Angle,
- sin( a ), cos( a ) );
- }
}
else if( !pObj )
{
@@ -844,13 +847,35 @@ long lcl_GetTrueMargin(const SvxLRSpaceItem &rLR, const SwNumFmt &rFmt,
return nExtraListIndent > 0 ? nExtraListIndent : 0;
}
-void SyncIndentWithList(SvxLRSpaceItem &rLR, const SwNumFmt &rFmt)
+// --> OD 2010-05-06 #i103711#
+// --> OD 2010-05-11 #i105414#
+void SyncIndentWithList( SvxLRSpaceItem &rLR,
+ const SwNumFmt &rFmt,
+ const bool bFirstLineOfstSet,
+ const bool bLeftIndentSet )
{
- long nWantedFirstLinePos;
- long nExtraListIndent = lcl_GetTrueMargin(rLR, rFmt, nWantedFirstLinePos);
- rLR.SetTxtLeft(nWantedFirstLinePos - nExtraListIndent);
- rLR.SetTxtFirstLineOfst(0);
+ if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
+ {
+ long nWantedFirstLinePos;
+ long nExtraListIndent = lcl_GetTrueMargin(rLR, rFmt, nWantedFirstLinePos);
+ rLR.SetTxtLeft(nWantedFirstLinePos - nExtraListIndent);
+ rLR.SetTxtFirstLineOfst(0);
+ }
+ else if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
+ {
+ if ( !bFirstLineOfstSet && bLeftIndentSet &&
+ rFmt.GetFirstLineIndent() != 0 )
+ {
+ rLR.SetTxtFirstLineOfst( rFmt.GetFirstLineIndent() );
+ }
+ else if ( bFirstLineOfstSet && !bLeftIndentSet &&
+ rFmt.GetIndentAt() != 0 )
+ {
+ rLR.SetTxtLeft( rFmt.GetIndentAt() );
+ }
+ }
}
+// <--
const SwNumFmt* SwWW8FltControlStack::GetNumFmtFromStack(const SwPosition &rPos,
const SwTxtNode &rTxtNode)
@@ -907,16 +932,24 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
pNum = GetNumFmtFromStack(*aRegion.GetPoint(),
*pTxtNode);
if (!pNum)
+ {
pNum = GetNumFmtFromTxtNode(*pTxtNode);
+ }
- // --> OD 2008-06-03 #i86652#
-// if (pNum)
- if ( pNum &&
- pNum->GetPositionAndSpaceMode() ==
- SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
- // <--
+ if ( pNum )
{
- SyncIndentWithList(aNewLR, *pNum);
+ // --> OD 2010-05-06 #i103711#
+ const bool bFirstLineIndentSet =
+ ( rReader.maTxtNodesHavingFirstLineOfstSet.end() !=
+ rReader.maTxtNodesHavingFirstLineOfstSet.find( pNode ) );
+ // --> OD 2010-05-11 #i105414#
+ const bool bLeftIndentSet =
+ ( rReader.maTxtNodesHavingLeftIndentSet.end() !=
+ rReader.maTxtNodesHavingLeftIndentSet.find( pNode ) );
+ SyncIndentWithList( aNewLR, *pNum,
+ bFirstLineIndentSet,
+ bLeftIndentSet );
+ // <--
}
if (aNewLR == aOldLR)
@@ -1681,6 +1714,13 @@ void SwWW8ImplReader::Read_HdFtText(long nStart, long nLen, SwFrmFmt* pHdFtFmt)
*pPaM->GetPoint() = aTmpPos;
}
+
+bool SwWW8ImplReader::isValid_HdFt_CP(WW8_CP nHeaderCP) const
+{
+ //each CP of Plcfhdd MUST be less than FibRgLw97.ccpHdd
+ return (nHeaderCP < pWwFib->ccpHdr) ? true : false;
+}
+
bool SwWW8ImplReader::HasOwnHeaderFooter(BYTE nWhichItems, BYTE grpfIhdt,
int nSect)
{
@@ -1700,7 +1740,7 @@ bool SwWW8ImplReader::HasOwnHeaderFooter(BYTE nWhichItems, BYTE grpfIhdt,
else
{
pHdFt->GetTextPosExact( static_cast< short >(nNumber + (nSect+1)*6), start, nLen);
- bOk = ( 2 <= nLen );
+ bOk = ( 2 <= nLen ) && isValid_HdFt_CP(start);
}
if (bOk)
@@ -1752,7 +1792,7 @@ void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect,
else
{
pHdFt->GetTextPosExact( static_cast< short >(nNumber + (nSect+1)*6), start, nLen);
- bOk = ( 2 <= nLen );
+ bOk = ( 2 <= nLen ) && isValid_HdFt_CP(start);
}
bool bUseLeft
@@ -2443,6 +2483,7 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs)
{
rPos = WW8_CP_MAX-10; // -> eof or other error
sPlainCharsBuf.ReleaseBufferAccess( 0 );
+ delete [] p8Bits;
return true;
}
@@ -2588,6 +2629,16 @@ bool SwWW8ImplReader::HandlePageBreakChar()
//itself ignores them in this case.
if (!nInTable)
{
+ //xushanchuan add for issue106569
+ BOOL IsTemp=TRUE;
+ SwTxtNode* pTemp = pPaM->GetNode()->GetTxtNode();
+ if ( pTemp && !( pTemp->GetTxt().Len() ) && ( bFirstPara || bFirstParaOfPage ) )
+ {
+ IsTemp = FALSE;
+ AppendTxtNode(*pPaM->GetPoint());
+ pTemp->SetAttr(*GetDfltAttr(RES_PARATR_NUMRULE));
+ }
+ //xushanchuan end
bPgSecBreak = true;
pCtrlStck->KillUnlockedAttrs(*pPaM->GetPoint());
/*
@@ -2596,7 +2647,9 @@ bool SwWW8ImplReader::HandlePageBreakChar()
paragraph end, but nevertheless, numbering (and perhaps other
similiar constructs) do not exist on the para.
*/
- if (!bWasParaEnd)
+ //xushanchuan add for issue106569
+ if (!bWasParaEnd && IsTemp)
+ //xushanchuan end
{
bParaEndAdded = true;
if (0 >= pPaM->GetPoint()->nContent.GetIndex())
@@ -2632,6 +2685,10 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
sal_Char cInsert = '\x0';
bool bRet = false;
+ //xushanchuan add for issue106569
+ if ( 0xc != nWCharVal )
+ bFirstParaOfPage = false;
+ //xushanchuan end
switch (nWCharVal)
{
case 0:
@@ -3148,6 +3205,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
// <--
rDoc.InsertPoolItem(*pPaM,
SvxFmtBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK), 0);
+ bFirstParaOfPage = true;//xushanchuan add for issue106569
bPgSecBreak = false;
}
}
@@ -3185,6 +3243,12 @@ SwWW8ImplReader::SwWW8ImplReader(BYTE nVersionPara, SvStorage* pStorage,
maGrfNameGenerator(bNewDoc,String('G')),
maParaStyleMapper(rD),
maCharStyleMapper(rD),
+ // --> OD 2010-05-06 #i103711#
+ maTxtNodesHavingFirstLineOfstSet(),
+ // <--
+ // --> OD 2010-05-11 #i105414#
+ maTxtNodesHavingLeftIndentSet(),
+ // <--
pMSDffManager(0),
mpAtnNames(0),
pAuthorInfos(0),
@@ -3239,13 +3303,14 @@ SwWW8ImplReader::SwWW8ImplReader(BYTE nVersionPara, SvStorage* pStorage,
bWasParaEnd = false;
bDropCap = false;
bFirstPara = true;
+ bFirstParaOfPage = false;//xushanchuan add for issue106569
bParaAutoBefore = false;
bParaAutoAfter = false;
nProgress = 0;
nSwNumLevel = nWwNumType = 0xff;
pTableDesc = 0;
pNumOlst = 0;
- pNode_FLY_AT_CNTNT = 0;
+ pNode_FLY_AT_PARA = 0;
pDrawModel = 0;
pDrawPg = 0;
mpDrawEditEngine = 0;
@@ -3725,8 +3790,8 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
if (mbNewDoc && pStg && !pGloss)
ReadDocInfo();
- ::ww8::WW8FibData * pFibData = new ::ww8::WW8FibData();
-
+ ::ww8::WW8FibData * pFibData = new ::ww8::WW8FibData();
+
if (pWwFib->fReadOnlyRecommended)
pFibData->setReadOnlyRecommended(true);
else
@@ -3736,16 +3801,16 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
pFibData->setWriteReservation(true);
else
pFibData->setWriteReservation(false);
-
+
::sw::tExternalDataPointer pExternalFibData(pFibData);
rDoc.setExternalData(::sw::FIB, pExternalFibData);
::sw::tExternalDataPointer pSttbfAsoc
(new ::ww8::WW8Sttb<ww8::WW8Struct>(*pTableStream, pWwFib->fcSttbfAssoc, pWwFib->lcbSttbfAssoc));
-
+
rDoc.setExternalData(::sw::STTBF_ASSOC, pSttbfAsoc);
-
+
if (pWwFib->fWriteReservation || pWwFib->fReadOnlyRecommended)
{
SwDocShell * pDocShell = rDoc.GetDocShell();
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 56555bdb2f..8af5c6225d 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,21 +35,11 @@
#include <editeng/frmdir.hxx>
#include <fltshell.hxx> // fuer den Attribut Stack
-#ifndef __SGI_STL_VECTOR
#include <vector>
-#endif
-#ifndef __SGI_STL_STACK
#include <stack>
-#endif
-#ifndef __SGI_STL_DEQUE
#include <deque>
-#endif
-#ifndef __SGI_STL_MAP
#include <map>
-#endif
-#ifndef __SGI_STL_UTILITY
#include <utility>
-#endif
#include "tracer.hxx"
#include "ww8struc.hxx" // WW8_BRC
@@ -956,6 +946,13 @@ private:
WW8PLCFMan* pPlcxMan;
std::map<short, String> aLinkStringMap;
+ // --> OD 2010-05-06 #i103711#
+ std::set<const SwNode*> maTxtNodesHavingFirstLineOfstSet;
+ // <--
+ // --> OD 2010-05-11 #i105414#
+ std::set<const SwNode*> maTxtNodesHavingLeftIndentSet;
+ // <--
+
WW8RStyle* pStyles; // Pointer auf die Style-Einleseklasse
SwFmt* pAktColl; // gerade zu erzeugende Collection
// ( ist ausserhalb einer Style-Def immer 0 )
@@ -977,7 +974,7 @@ private:
ANLDRuleMap maANLDRules;
WW8_OLST* pNumOlst; // Gliederung im Text
- SwNode* pNode_FLY_AT_CNTNT; // set: WW8SwFlyPara() read: CreateSwTable()
+ SwNode* pNode_FLY_AT_PARA; // set: WW8SwFlyPara() read: CreateSwTable()
SdrModel* pDrawModel;
SdrPage* pDrawPg;
@@ -1086,7 +1083,7 @@ private:
// the very 1st Line Numbering and ignore the rest)
bool bFirstPara; // first paragraph?
-
+ bool bFirstParaOfPage;//cs2c--xushanchuan add for bug11210
bool bParaAutoBefore;
bool bParaAutoAfter;
@@ -1112,6 +1109,8 @@ private:
void Read_HdFtTextAsHackedFrame(long nStart, long nLen,
SwFrmFmt &rHdFtFmt, sal_uInt16 nPageWidth);
+ bool isValid_HdFt_CP(WW8_CP nHeaderCP) const;
+
bool HasOwnHeaderFooter(BYTE nWhichItems, BYTE grpfIhdt, int nSect);
void HandleLineNumbering(const wwSection &rSection);
@@ -1155,7 +1154,12 @@ private:
void ImportTox( int nFldId, String aStr );
void EndSprm( USHORT nId );
- void NewAttr( const SfxPoolItem& rAttr );
+ // --> OD 2010-05-06 #i103711#
+ // --> OD 2010-05-11 #i105414#
+ void NewAttr( const SfxPoolItem& rAttr,
+ const bool bFirstLineOfStSet = false,
+ const bool bLeftIndentSet = false );
+ // <--
bool GetFontParams(USHORT, FontFamily&, String&, FontPitch&,
rtl_TextEncoding&);
@@ -1612,7 +1616,13 @@ public: // eigentlich private, geht aber leider nur public
bool CanUseRemoteLink(const String &rGrfName);
void UseListIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt);
void SetStyleIndent(SwWW8StyInf &rStyleInfo, const SwNumFmt &rFmt);
-void SyncIndentWithList(SvxLRSpaceItem &rLR, const SwNumFmt &rFmt);
+// --> OD 2010-05-06 #i103711#
+// --> OD 2010-05-11 #i105414#
+void SyncIndentWithList( SvxLRSpaceItem &rLR,
+ const SwNumFmt &rFmt,
+ const bool bFirstLineOfStSet,
+ const bool bLeftIndentSet );
+// <--
long GetListFirstLineIndent(const SwNumFmt &rFmt);
String BookmarkToWriter(const String &rBookmark);
bool RTLGraphicsHack(SwTwips &rLeft, SwTwips nWidth,
diff --git a/sw/source/filter/ww8/ww8par2.hxx b/sw/source/filter/ww8/ww8par2.hxx
index 49c40b53fc..2da82b3d54 100644
--- a/sw/source/filter/ww8/ww8par2.hxx
+++ b/sw/source/filter/ww8/ww8par2.hxx
@@ -285,7 +285,6 @@ public:
const WW8SwFlyPara* pFS, bool bGraf);
WW8FlySet(SwWW8ImplReader& rReader, const SwPaM* pPaM, const WW8_PIC& rPic,
long nWidth, long nHeight);
- WW8FlySet(const SwWW8ImplReader& rReader, const SwPaM* pPaM);
};
enum WW8LvlType {WW8_None, WW8_Outline, WW8_Numbering, WW8_Sequence, WW8_Pause};
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index fafaa10fe9..fb565ea296 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -1697,7 +1697,12 @@ void SetStyleIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt)
{
SvxLRSpaceItem aLR(ItemGet<SvxLRSpaceItem>(*rStyle.pFmt, RES_LR_SPACE));
if (rStyle.bListReleventIndentSet)
- SyncIndentWithList(aLR, rFmt);
+ {
+ // --> OD 2010-05-06 #i103711#
+ // --> OD 2010-05-11 #i105414#
+ SyncIndentWithList( aLR, rFmt, false, false );
+ // <--
+ }
else
{
aLR.SetTxtLeft(0);
@@ -2207,20 +2212,17 @@ void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich,
{
*pDataStream >> nDefaultChecked;
nChecked = nDefaultChecked;
- //Don't know the details yet
- switch (nHeaderByte)
+
+ sal_uInt8 iRes = (nHeaderByte >> 2) & 0x1F;
+ switch (iRes)
{
- case 0x65: //01100101
- //use defaults ?
+ case 1: //checked
+ nChecked = true;
break;
- case 0x1: //00000001
- //swap to unchecked from checked (#114841)?
+ case 25: //undefined, Undefined checkboxes are treated as unchecked
+ case 0: //unchecked
nChecked = false;
break;
- case 0x5: //00000101
- //change to checked
- nChecked = true;
- break;
default:
ASSERT(!this, "unknown option, please report to cmc");
break;
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 4d05fcc221..692e1df591 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -2354,11 +2354,13 @@ eF_ResT SwWW8ImplReader::Read_F_IncludeText( WW8FieldDesc* /*pF*/, String& rStr
*/
SwPosition aTmpPos(*pPaM->GetPoint());
- SwSection aSection(FILE_LINK_SECTION, maSectionNameGenerator.UniqueName());
+ SwSectionData aSection(FILE_LINK_SECTION,
+ maSectionNameGenerator.UniqueName());
aSection.SetLinkFileName( aPara );
- aSection.SetProtect(true);
+ aSection.SetProtectFlag(true);
- SwSection*const pSection = rDoc.InsertSwSection(*pPaM, aSection, 0, false);
+ SwSection *const pSection =
+ rDoc.InsertSwSection(*pPaM, aSection, 0, 0, false);
ASSERT(pSection, "no section inserted");
if (!pSection)
return FLD_TEXT;
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 6f4e4edd03..037dbe19bc 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -672,7 +672,8 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
SwSectionFmt *wwSectionManager::InsertSection(
SwPaM& rMyPaM, wwSection &rSection)
{
- SwSection aSection( CONTENT_SECTION, mrReader.rDoc.GetUniqueSectionName() );
+ SwSectionData aSection( CONTENT_SECTION,
+ mrReader.rDoc.GetUniqueSectionName() );
SfxItemSet aSet( mrReader.rDoc.GetAttrPool(), aFrmFmtSetRange );
@@ -685,10 +686,10 @@ SwSectionFmt *wwSectionManager::InsertSection(
if (0 == mrReader.pWDop->epc)
aSet.Put( SwFmtEndAtTxtEnd(FTNEND_ATTXTEND));
- aSection.SetProtect(SectionIsProtected(rSection));
+ aSection.SetProtectFlag(SectionIsProtected(rSection));
rSection.mpSection =
- mrReader.rDoc.InsertSwSection( rMyPaM, aSection, &aSet );
+ mrReader.rDoc.InsertSwSection( rMyPaM, aSection, 0, & aSet );
ASSERT(rSection.mpSection, "section not inserted!");
if (!rSection.mpSection)
return 0;
@@ -836,12 +837,12 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
pWkb->Get(nTest, pData);
String sSectionName = mrReader.aLinkStringMap[SVBT16ToShort( ((WW8_WKB*)pData)->nLinkId) ];
mrReader.ConvertFFileName(sSectionName, sSectionName);
- SwSection aSection(FILE_LINK_SECTION, sSectionName);
+ SwSectionData aSection(FILE_LINK_SECTION, sSectionName);
aSection.SetLinkFileName( sSectionName );
- aSection.SetProtect(true);
+ aSection.SetProtectFlag(true);
// --> CMC, OD 2004-06-18 #i19922# improvement:
// return value of method <Insert> not used.
- mrReader.rDoc.InsertSwSection(*mrReader.pPaM, aSection, 0, false);
+ mrReader.rDoc.InsertSwSection(*mrReader.pPaM, aSection, 0, 0, false);
}
wwSection aLastSection(*mrReader.pPaM->GetPoint());
@@ -2264,12 +2265,6 @@ WW8FlySet::WW8FlySet( SwWW8ImplReader& rReader, const SwPaM* pPaM,
+ aSizeArray[WW8_BOT]) );
}
-WW8FlySet::WW8FlySet(const SwWW8ImplReader& rReader, const SwPaM* pPaM)
- : SfxItemSet(rReader.rDoc.GetAttrPool(),RES_FRMATR_BEGIN,RES_FRMATR_END-1)
-{
- Init(rReader, pPaM);
-}
-
void WW8FlySet::Init(const SwWW8ImplReader& rReader, const SwPaM* pPaM)
{
if (!rReader.mbNewDoc)
@@ -2715,7 +2710,9 @@ bool SwWW8ImplReader::TestSameApo(const ApoTestResults &rApo,
# Attribut - Verwaltung
#**************************************************************************/
-void SwWW8ImplReader::NewAttr( const SfxPoolItem& rAttr )
+void SwWW8ImplReader::NewAttr( const SfxPoolItem& rAttr,
+ const bool bFirstLineOfStSet,
+ const bool bLeftIndentSet )
{
if( !bNoAttrImport ) // zum Ignorieren von Styles beim Doc-Einfuegen
{
@@ -2725,11 +2722,31 @@ void SwWW8ImplReader::NewAttr( const SfxPoolItem& rAttr )
pAktColl->SetFmtAttr(rAttr);
}
else if (pAktItemSet)
+ {
pAktItemSet->Put(rAttr);
+ }
else if (rAttr.Which() == RES_FLTR_REDLINE)
+ {
mpRedlineStack->open(*pPaM->GetPoint(), rAttr);
+ }
else
+ {
pCtrlStck->NewAttr(*pPaM->GetPoint(), rAttr);
+ // --> OD 2010-05-06 #i103711#
+ if ( bFirstLineOfStSet )
+ {
+ const SwNode* pNd = &(pPaM->GetPoint()->nNode.GetNode());
+ maTxtNodesHavingFirstLineOfstSet.insert( pNd );
+ }
+ // <--
+ // --> OD 2010-05-11 #i105414#
+ if ( bLeftIndentSet )
+ {
+ const SwNode* pNd = &(pPaM->GetPoint()->nNode.GetNode());
+ maTxtNodesHavingLeftIndentSet.insert( pNd );
+ }
+ // <--
+ }
if (mpPostProcessAttrsInfo && mpPostProcessAttrsInfo->mbCopy)
mpPostProcessAttrsInfo->mItemSet.Put(rAttr);
@@ -3958,6 +3975,13 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen )
}
}
+ // --> OD 2010-05-06 #i103711#
+ bool bFirstLinOfstSet( false );
+ // <--
+ // --> OD 2010-05-11 #i105414#
+ bool bLeftIndentSet( false );
+ // <--
+
switch (nId)
{
//sprmPDxaLeft
@@ -3966,7 +3990,12 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen )
case 0x845E:
aLR.SetTxtLeft( nPara );
if (pAktColl)
+ {
pCollA[nAktColl].bListReleventIndentSet = true;
+ }
+ // --> OD 2010-05-11 #i105414#
+ bLeftIndentSet = true;
+ // <--
break;
//sprmPDxaLeft1
case 19:
@@ -3998,7 +4027,12 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen )
aLR.SetTxtFirstLineOfst(nPara);
if (pAktColl)
+ {
pCollA[nAktColl].bListReleventIndentSet = true;
+ }
+ // --> OD 2010-05-06 #i103711#
+ bFirstLinOfstSet = true;
+ // <--
break;
//sprmPDxaRight
case 16:
@@ -4010,7 +4044,10 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen )
return;
}
- NewAttr(aLR);
+ // --> OD 2010-05-06 #i103711#
+ // --> OD 2010-05-11 #i105414#
+ NewAttr( aLR, bFirstLinOfstSet, bLeftIndentSet );
+ // <--
}
// Sprm 20
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 5fd6d59733..8ca3f12911 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -32,6 +32,7 @@
#include <functional>
+#include <algorithm>
#include <string.h> // memset()
#include <rtl/tencinfo.h>
@@ -2121,7 +2122,7 @@ xub_StrLen WW8ScannerBase::WW8ReadString( SvStream& rStrm, String& rStr,
// Bei nStartPos < 0 wird das erste Element des PLCFs genommen
WW8PLCFspecial::WW8PLCFspecial(SvStream* pSt, long nFilePos, long nPLCF,
- long nStruct, long nStartPos, bool bNoEnd)
+ long nStruct, long nStartPos)
: nIdx(0), nStru(nStruct)
{
nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
@@ -2137,8 +2138,6 @@ WW8PLCFspecial::WW8PLCFspecial(SvStream* pSt, long nFilePos, long nPLCF,
pPLCF_PosArray[nIdx] = SWAPLONG( pPLCF_PosArray[nIdx] );
nIdx = 0;
#endif // OSL_BIGENDIAN
- if( bNoEnd )
- nIMax++;
if( nStruct ) // Pointer auf Inhalts-Array
pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
else
@@ -4004,8 +4003,7 @@ WW8PLCFx_Book::WW8PLCFx_Book(SvStream* pTblSt, const WW8Fib& rFib)
{
pBook[0] = new WW8PLCFspecial(pTblSt,rFib.fcPlcfbkf,rFib.lcbPlcfbkf,4);
- pBook[1] = new WW8PLCFspecial( pTblSt, rFib.fcPlcfbkl, rFib.lcbPlcfbkl,
- 0, -1, true);
+ pBook[1] = new WW8PLCFspecial(pTblSt,rFib.fcPlcfbkl,rFib.lcbPlcfbkl,0);
rtl_TextEncoding eStructChrSet = WW8Fib::GetFIBCharset(rFib.chseTables);
@@ -6400,8 +6398,10 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
#ifdef __WW8_NEEDS_COPY
{
BYTE nLen = 0x28;
+ BYTE nLength = sizeof( pVer8->szFfn ) / sizeof( SVBT16 );
+ nLength = std::min( nLength, BYTE( pVer8->cbFfnM1+1 ) );
for( UINT16* pTmp = pVer8->szFfn;
- nLen < pVer8->cbFfnM1 + 1 ; ++pTmp, nLen+=2 )
+ nLen < nLength; ++pTmp, nLen+=2 )
{
*pTmp = SVBT16ToShort( *(SVBT16*)pTmp );
}
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index 9e8c9ce320..f5595439e7 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -220,7 +220,7 @@ private:
long nStru;
public:
WW8PLCFspecial( SvStream* pSt, long nFilePos, long nPLCF,
- long nStruct, long nStartPos = -1, bool bNoEnd = false);
+ long nStruct, long nStartPos = -1 );
~WW8PLCFspecial() { delete[] pPLCF_PosArray; }
long GetIdx() const { return nIdx; }
void SetIdx( long nI ) { nIdx = nI; }
@@ -382,6 +382,7 @@ private:
public:
WW8PLCFx(ww::WordVersion eVersion, bool bSprm)
: meVer(eVersion), bIsSprm(bSprm), bDirty(false) {}
+ virtual ~WW8PLCFx() {}
bool IsSprm() const { return bIsSprm; }
virtual ULONG GetIdx() const = 0;
virtual void SetIdx( ULONG nIdx ) = 0;
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index fc0db71ba4..c3beb63cc0 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -457,7 +457,7 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl(
bHasTextContent( sal_False ),
bHasTableContent( sal_False )
{
- sSaveParaDefault = GetImport().GetTextImport()->sCellParaStyleDefault;
+ sSaveParaDefault = GetImport().GetTextImport()->GetCellParaStyleDefault();
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
for( sal_Int16 i=0; i < nAttrCount; i++ )
{
@@ -477,7 +477,7 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl(
break;
case XML_TOK_TABLE_STYLE_NAME:
aStyleName = rValue;
- GetImport().GetTextImport()->sCellParaStyleDefault = rValue;
+ GetImport().GetTextImport()->SetCellParaStyleDefault(rValue);
break;
case XML_TOK_TABLE_NUM_COLS_SPANNED:
nColSpan = (sal_uInt32)rValue.toInt32();
@@ -715,7 +715,7 @@ void SwXMLTableCellContext_Impl::EndElement()
}
}
}
- GetImport().GetTextImport()->sCellParaStyleDefault = sSaveParaDefault;
+ GetImport().GetTextImport()->SetCellParaStyleDefault(sSaveParaDefault);
}
// ---------------------------------------------------------------------
diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx
index 846c7a149d..e597547d89 100644
--- a/sw/source/ui/app/applab.cxx
+++ b/sw/source/ui/app/applab.cxx
@@ -378,19 +378,20 @@ static sal_uInt16 nBCTitleNo = 0;
else
pSh->SetMark(); // set only the mark
- SwSection aSect( CONTENT_SECTION,
- String::CreateFromAscii(MASTER_LABEL));
+ SwSectionData aSect(CONTENT_SECTION,
+ String::CreateFromAscii(MASTER_LABEL));
pSh->InsertSection(aSect);
}
}
else if (rItem.bSynchron)
{
- SwSection aSect(FILE_LINK_SECTION, pSh->GetUniqueSectionName());
+ SwSectionData aSect(FILE_LINK_SECTION,
+ pSh->GetUniqueSectionName());
String sLinkName(sfx2::cTokenSeperator);
sLinkName += sfx2::cTokenSeperator;
sLinkName += String::CreateFromAscii(MASTER_LABEL);
aSect.SetLinkFileName(sLinkName);
- aSect.SetProtect();
+ aSect.SetProtectFlag(true);
pSh->Insert(aDotStr); // Dummytext zum Zuweisen der Section
pSh->SttDoc();
pSh->EndDoc(sal_True); // Alles im Rahmen selektieren
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index b80b567ebf..22a8213cac 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -69,7 +69,6 @@
#include <view.hxx> // fuer die aktuelle Sicht
#include <edtwin.hxx>
#include <PostItMgr.hxx>
-#include <postit.hxx>
#include <wrtsh.hxx> // Verbindung zur Core
#include <docsh.hxx> // Dokumenterzeugung
#include <basesh.hxx>
@@ -102,7 +101,6 @@
#include <cmdid.h>
#include <globals.hrc>
#include <app.hrc>
-#include "warnpassword.hxx"
#include <cfgid.h>
#include <unotools/moduleoptions.hxx>
@@ -429,8 +427,12 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
pView->GetEditWin().StopQuickHelp();
//#i91811# mod if we have an active margin window, write back the text
- if (pView && pView->GetPostItMgr() && pView->GetPostItMgr()->GetActivePostIt())
- pView->GetPostItMgr()->GetActivePostIt()->UpdateData();
+ if ( pView &&
+ pView->GetPostItMgr() &&
+ pView->GetPostItMgr()->HasActiveSidebarWin() )
+ {
+ pView->GetPostItMgr()->UpdateDataOnActiveSidebarWin();
+ }
if( pDoc->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) &&
!pDoc->get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS) )
@@ -575,8 +577,12 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
pView->GetEditWin().StopQuickHelp();
//#i91811# mod if we have an active margin window, write back the text
- if (pView && pView->GetPostItMgr() && pView->GetPostItMgr()->GetActivePostIt())
- pView->GetPostItMgr()->GetActivePostIt()->UpdateData();
+ if ( pView &&
+ pView->GetPostItMgr() &&
+ pView->GetPostItMgr()->HasActiveSidebarWin() )
+ {
+ pView->GetPostItMgr()->UpdateDataOnActiveSidebarWin();
+ }
ULONG nVBWarning = 0;
diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src
index a0351700ff..aeb8fca52d 100644
--- a/sw/source/ui/app/mn.src
+++ b/sw/source/ui/app/mn.src
@@ -597,6 +597,7 @@ Menu MN_TAB_POPUPMENU
MN_EDIT_CONTOUR\
MenuItem\
{\
+ Checkable = TRUE ; \
Identifier = FN_WRAP_ANCHOR_ONLY ; \
HelpID = FN_WRAP_ANCHOR_ONLY ; \
Text [ en-US ] = "~First Paragraph" ; \
@@ -661,6 +662,7 @@ String MN_DRAW_POPUPMENU
MN_WRAP_CONTOUR_1\
MenuItem\
{\
+ Checkable = TRUE ; \
Identifier = FN_WRAP_ANCHOR_ONLY ; \
HelpID = FN_WRAP_ANCHOR_ONLY ; \
Text [ en-US ] = "~First Paragraph" ; \
@@ -686,6 +688,7 @@ String MN_DRAW_POPUPMENU
#define MN_AT_FRAME \
MenuItem\
{\
+ RadioCheck = TRUE ; \
Identifier = FN_TOOL_ANKER_FRAME ; \
HelpID = FN_TOOL_ANKER_FRAME ; \
Text [ en-US ] = "To ~Frame" ; \
@@ -704,24 +707,28 @@ String MN_DRAW_POPUPMENU
{\
MenuItem\
{\
+ RadioCheck = TRUE ; \
Identifier = FN_TOOL_ANKER_PAGE ; \
HelpID = FN_TOOL_ANKER_PAGE ; \
Text [ en-US ] = "To P~age" ; \
};\
MenuItem\
{\
+ RadioCheck = TRUE ; \
Identifier = FN_TOOL_ANKER_PARAGRAPH ; \
HelpID = FN_TOOL_ANKER_PARAGRAPH ; \
Text [ en-US ] = "To ~Paragraph" ; \
};\
MenuItem\
{\
+ RadioCheck = TRUE ; \
Identifier = FN_TOOL_ANKER_AT_CHAR ; \
HelpID = FN_TOOL_ANKER_AT_CHAR ; \
Text [ en-US ] = "To ~Character" ; \
};\
MenuItem\
{\
+ RadioCheck = TRUE ; \
Identifier = FN_TOOL_ANKER_CHAR ; \
HelpID = FN_TOOL_ANKER_CHAR ; \
Text [ en-US ] = "As C~haracter" ; \
diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx
index 0790eb4c4d..56252239f4 100644
--- a/sw/source/ui/app/swmodule.cxx
+++ b/sw/source/ui/app/swmodule.cxx
@@ -59,13 +59,13 @@
#include <svx/tbxcolor.hxx>
#include <svx/clipboardctl.hxx>
#include <svx/lboxctrl.hxx>
-#include <svx/extrusioncontrols.hxx>
#include <svx/hyprlink.hxx>
#include <svx/tbxcustomshapes.hxx>
-#include <svx/fontworkgallery.hxx>
#include <svx/imapdlg.hxx>
#include <svx/srchdlg.hxx>
#include <svx/hyperdlg.hxx>
+#include <svx/extrusioncolorcontrol.hxx>
+#include <svx/fontworkgallery.hxx>
#include <com/sun/star/scanner/XScannerManager.hpp>
#include <com/sun/star/container/XSet.hpp>
#include <comphelper/processfactory.hxx>
@@ -138,6 +138,7 @@
#include <mailmergechildwindow.hxx>
#include <modcfg.hxx>
#include <fontcfg.hxx>
+#include <sfx2/taskpane.hxx>
#include <sfx2/evntconf.hxx>
#include <sfx2/appuno.hxx>
#include <swatrset.hxx>
@@ -378,15 +379,8 @@ void SwDLL::RegisterControls()
SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_CALLOUT, pMod );
SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_STAR, pMod );
- svx::ExtrusionDepthControl::RegisterControl( SID_EXTRUSION_DEPTH_FLOATER, pMod );
- svx::ExtrusionDirectionControl::RegisterControl( SID_EXTRUSION_DIRECTION_FLOATER, pMod );
- svx::ExtrusionLightingControl::RegisterControl( SID_EXTRUSION_LIGHTING_FLOATER, pMod );
- svx::ExtrusionSurfaceControl::RegisterControl( SID_EXTRUSION_SURFACE_FLOATER, pMod );
svx::ExtrusionColorControl::RegisterControl( SID_EXTRUSION_3D_COLOR, pMod );
-
svx::FontWorkShapeTypeControl::RegisterControl( SID_FONTWORK_SHAPE_TYPE, pMod );
- svx::FontWorkAlignmentControl::RegisterControl( SID_FONTWORK_ALIGNMENT_FLOATER, pMod );
- svx::FontWorkCharacterSpacingControl::RegisterControl( SID_FONTWORK_CHARACTER_SPACING_FLOATER, pMod );
SvxClipBoardControl::RegisterControl(SID_PASTE, pMod );
SvxUndoRedoControl::RegisterControl(SID_UNDO, pMod );
@@ -469,18 +463,13 @@ void SwDLL::RegisterControls()
SvxCTLTextTbxCtrl::RegisterControl(SID_ATTR_PARA_LEFT_TO_RIGHT, pMod);
SvxCTLTextTbxCtrl::RegisterControl(SID_ATTR_PARA_RIGHT_TO_LEFT, pMod);
- svx::ExtrusionDepthControl::RegisterControl( SID_EXTRUSION_DEPTH_FLOATER, pMod );
- svx::ExtrusionDirectionControl::RegisterControl( SID_EXTRUSION_DIRECTION_FLOATER, pMod );
- svx::ExtrusionLightingControl::RegisterControl( SID_EXTRUSION_LIGHTING_FLOATER, pMod );
- svx::ExtrusionSurfaceControl::RegisterControl( SID_EXTRUSION_SURFACE_FLOATER, pMod );
- svx::ExtrusionColorControl::RegisterControl( SID_EXTRUSION_3D_COLOR, pMod );
-
GalleryChildWindow::RegisterChildWindow(0, pMod);
::avmedia::MediaToolBoxControl::RegisterControl(SID_AVMEDIA_TOOLBOX, pMod);
::avmedia::MediaPlayer::RegisterChildWindow(0, pMod);
SvxSmartTagsControl::RegisterControl(SID_OPEN_SMARTTAGMENU, pMod);
+ ::sfx2::TaskPaneWrapper::RegisterChildWindow( FALSE, pMod );
}
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 40c17f9866..8d3943834c 100644..100755
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -542,10 +542,15 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet& )
aFaxLB.SelectEntry( pAddPrinterAttr->sFaxName );
}
if (aProspectCB.IsChecked())
+ {
aProspectCB_RTL.Enable(TRUE);
+ aNoRB.Enable( FALSE );
+ aOnlyRB.Enable( FALSE );
+ aEndRB.Enable( FALSE );
+ aEndPageRB.Enable( FALSE );
+ }
else
- aProspectCB_RTL.Disable();
-
+ aProspectCB_RTL.Enable( FALSE );
}
//-----------------------------------------------------------------------
@@ -560,13 +565,14 @@ void SwAddPrinterTabPage::Init()
IMPL_LINK_INLINE_START( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG )
{
bAttrModified = TRUE;
- if (aProspectCB.IsChecked())
- aProspectCB_RTL.Enable(TRUE);
- else
- {
+ bool bIsProspect = aProspectCB.IsChecked();
+ if (!bIsProspect)
aProspectCB_RTL.Check( FALSE );
- aProspectCB_RTL.Disable();
- }
+ aProspectCB_RTL.Enable( bIsProspect );
+ aNoRB.Enable( !bIsProspect );
+ aOnlyRB.Enable( !bIsProspect );
+ aEndRB.Enable( !bIsProspect );
+ aEndPageRB.Enable( !bIsProspect );
return 0;
}
IMPL_LINK_INLINE_END( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG )
diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx
index e0af7fe275..6960e56ceb 100644
--- a/sw/source/ui/config/viewopt.cxx
+++ b/sw/source/ui/config/viewopt.cxx
@@ -112,6 +112,7 @@ BOOL SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const
&& bFormView == rOpt.IsFormView()
&& mbViewLayoutBookMode == rOpt.mbViewLayoutBookMode
&& bShowPlaceHolderFields == rOpt.bShowPlaceHolderFields
+ && bIdle == rOpt.bIdle
#ifdef DBG_UTIL
// korrespondieren zu den Angaben in ui/config/cfgvw.src
&& bTest1 == rOpt.IsTest1()
@@ -226,7 +227,7 @@ SwViewOption::SwViewOption() :
{
// Initialisierung ist jetzt etwas einfacher
// alle Bits auf 0
- nCoreOptions = VIEWOPT_1_IDLE | VIEWOPT_1_HARDBLANK | VIEWOPT_1_SOFTHYPH |
+ nCoreOptions = VIEWOPT_1_HARDBLANK | VIEWOPT_1_SOFTHYPH |
VIEWOPT_1_REF |
VIEWOPT_1_GRAPHIC |
VIEWOPT_1_TABLE | VIEWOPT_1_DRAW | VIEWOPT_1_CONTROL |
@@ -243,6 +244,8 @@ SwViewOption::SwViewOption() :
bSelectionInReadonly = SW_MOD()->GetAccessibilityOptions().IsSelectionInReadonly();
+ bIdle = true;
+
#ifdef DBG_UTIL
// korrespondieren zu den Angaben in ui/config/cfgvw.src
bTest1 = bTest2 = bTest3 = bTest4 =
@@ -277,6 +280,7 @@ SwViewOption::SwViewOption(const SwViewOption& rVOpt)
bBookview = rVOpt.bBookview;
mbViewLayoutBookMode = rVOpt.mbViewLayoutBookMode;
bShowPlaceHolderFields = rVOpt.bShowPlaceHolderFields;
+ bIdle = rVOpt.bIdle;
#ifdef DBG_UTIL
bTest1 = rVOpt.bTest1 ;
@@ -317,6 +321,7 @@ SwViewOption& SwViewOption::operator=( const SwViewOption &rVOpt )
bBookview = rVOpt.bBookview;
mbViewLayoutBookMode = rVOpt.mbViewLayoutBookMode;
bShowPlaceHolderFields = rVOpt.bShowPlaceHolderFields;
+ bIdle = rVOpt.bIdle;
#ifdef DBG_UTIL
bTest1 = rVOpt.bTest1 ;
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index e423ca70ba..42d4db33f0 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -33,15 +33,10 @@
#include "dbinsdlg.hxx"
-#ifndef INCLUDED_MEMORY
#include <memory>
-#define INCLUDED_MEMORY
-#endif
-#ifndef INCLUDED_FLOAT_H
#include <float.h>
-#define INCLUDED_FLOAT_H
-#endif
+
#include <hintids.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
@@ -65,9 +60,7 @@
#include <svl/stritem.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx>
-#ifndef __SV_MNEMONIC_HXX
#include <vcl/mnemonic.hxx>
-#endif
#include <svl/style.hxx>
#include <svl/zformat.hxx>
#include <svx/htmlmode.hxx>
@@ -78,24 +71,16 @@
#include <editeng/boxitem.hxx>
#include <svx/rulritem.hxx>
#include <swdbtoolsclient.hxx>
-#ifndef _SWTABLEREP_HXX //autogen
#include <tabledlg.hxx>
-#endif
#include <fmtclds.hxx>
#include <tabcol.hxx>
#include <uiitems.hxx>
#include <viewopt.hxx>
#include <uitool.hxx>
#include <wrtsh.hxx>
-#ifndef _WVIEW_HXX
#include <wview.hxx>
-#endif
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
-#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
-#endif
#include <tblafmt.hxx>
#include <cellatr.hxx>
#include <swtable.hxx>
@@ -108,19 +93,11 @@
#include <poolfmt.hxx>
#include <crsskip.hxx>
-#ifndef _DBINSDLG_HRC
#include <dbinsdlg.hrc>
-#endif
-#ifndef _DBUI_HRC
#include <dbui.hrc>
-#endif
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
#include <cfgid.h>
#include <SwStyleNameMapper.hxx>
#include <comphelper/uno3.hxx>
@@ -1380,8 +1357,8 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
case _DB_Column::DB_COL_FIELD:
{
- SwDBField* pFld = (SwDBField*)pDBCol->DB_ColumnData.
- pField->Copy();
+ SwDBField *const pFld = static_cast<SwDBField *>(
+ pDBCol->DB_ColumnData.pField->CopyField());
double nValue = DBL_MAX;
Reference< XPropertySet > xColumnProps;
@@ -1934,7 +1911,7 @@ void SwInsertDBColAutoPilot::Load()
SwInsDBColumn& rSet = *aDBColumns[ n ];
for( USHORT m = 0; m < pNewData->aDBColumns.Count() ; ++m )
{
- const SwInsDBColumn& rGet = *pNewData->aDBColumns[ m ];
+ SwInsDBColumn& rGet = *pNewData->aDBColumns[ m ];
if(rGet.sColumn == rSet.sColumn)
{
if( rGet.bHasFmt && !rGet.bIsDBFmt )
@@ -1946,8 +1923,10 @@ void SwInsertDBColAutoPilot::Load()
{
xub_StrLen nCheckPos;
short nType;
- rNFmtr.PutEntry( (String&)rGet.sUsrNumFmt, nCheckPos, nType,
+ String sTmpFmt = rGet.sUsrNumFmt;
+ rNFmtr.PutEntry( sTmpFmt, nCheckPos, nType,
rSet.nUsrNumFmt, rGet.eUsrNumFmtLng );
+ rGet.sUsrNumFmt = sTmpFmt;
}
}
break;
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index 3cdba36e57..d550c3b3af 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -2907,9 +2907,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
}
else
{
- SwDoc* pNewDoc = rSourceView.GetDocShell()->GetDoc()->CreateCopy();
- xWorkDocSh = new SwDocShell( pNewDoc, SFX_CREATE_MODE_STANDARD );
- xWorkDocSh->DoInitNew();
+ xWorkDocSh = rSourceView.GetDocShell()->GetDoc()->CreateCopy(true);
}
//create a ViewFrame
SwView* pWorkView = static_cast< SwView* >( SfxViewFrame::LoadHiddenDocument( *xWorkDocSh, 0 )->GetViewShell() );
@@ -3032,8 +3030,9 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
pTargetShell->SttDoc();
//
}
- catch( Exception& )
+ catch( Exception& rEx)
{
+ (void)rEx;
DBG_ERROR("exception caught in SwNewDBMgr::MergeDocuments");
}
DELETEZ(pImpl->pMergeData);
diff --git a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
index 4ae70d26db..b7fd189741 100644
--- a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
@@ -32,13 +32,13 @@
#include <vcl/msgbox.hxx>
#include <editeng/svxacorr.hxx>
#include <editeng/acorrcfg.hxx>
-#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
-#endif
#include <sfx2/app.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
#include <editeng/unolingu.hxx>
+#include <editeng/editeng.hxx>
+#include <editeng/editview.hxx>
#include <wrtsh.hxx>
#include <sfx2/printer.hxx>
#include <svx/svdoutl.hxx>
@@ -56,9 +56,7 @@
#include <pam.hxx>
#include <drawbase.hxx>
#include <unotextrange.hxx>
-#ifndef _DIALOG_HXX
#include <dialog.hrc>
-#endif
#include <cmdid.h>
@@ -202,12 +200,19 @@ SfxChildWinInfo SwSpellDialogChildWindow::GetInfo (void) const
-----------------------------------------------------------------------*/
-svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void)
+svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence(bool bRecheck)
{
svx::SpellPortions aRet;
SwWrtShell* pWrtShell = GetWrtShell_Impl();
if(pWrtShell)
{
+ if (!bRecheck)
+ {
+ // first set continuation point for spell/grammar check to the
+ // end of the current sentence
+ pWrtShell->MoveContinuationPosToEndOfCheckedSentence();
+ }
+
ShellModes eSelMode = pWrtShell->GetView().GetShellMode();
bool bDrawText = SHELL_MODE_DRAWTEXT == eSelMode;
bool bNormalText =
@@ -239,7 +244,10 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void)
if(!pWrtShell->HasSelection())
pWrtShell->GoStartSentence();
else
+ {
+ pWrtShell->ExpandToSentenceBorders();
m_pSpellState->m_bStartedInSelection = true;
+ }
//determine if the selection is outside of the body text
bOtherText = !(pWrtShell->GetFrmType(0,sal_True) & FRMTYPE_BODY);
m_pSpellState->m_SpellStartPosition = bOtherText ? SPELL_START_OTHER : SPELL_START_BODY;
@@ -269,7 +277,24 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void)
m_pSpellState->m_SpellStartPosition = SPELL_START_DRAWTEXT;
m_pSpellState->m_pStartDrawing = pSdrView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj();
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
- m_pSpellState->m_aStartDrawingSelection = pOLV->GetSelection();
+ // start checking at the top of the drawing object
+ pOLV->SetSelection( ESelection() );
+ m_pSpellState->m_aStartDrawingSelection = ESelection();
+/*
+Note: spelling in a selection only, or starting in a mid of a drawing object requires
+further changes elsewhere. (Especially if it should work in sc and sd as well.)
+The code below would only be part of the solution.
+(Keeping it a as a comment for the time being)
+ ESelection aCurSel( pOLV->GetSelection() );
+ ESelection aSentenceSel( pOLV->GetEditView().GetEditEngine()->SelectSentence( aCurSel ) );
+ if (!aCurSel.HasRange())
+ {
+ aSentenceSel.nEndPara = aSentenceSel.nStartPara;
+ aSentenceSel.nEndPos = aSentenceSel.nStartPos;
+ }
+ pOLV->SetSelection( aSentenceSel );
+ m_pSpellState->m_aStartDrawingSelection = aSentenceSel;
+*/
}
m_pSpellState->m_bInitialCall = false;
@@ -316,61 +341,66 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void)
//spell inside of the Writer text
if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
{
- //find out which text has been spelled body or other
- bOtherText = !(pWrtShell->GetFrmType(0,sal_True) & FRMTYPE_BODY);
- if(bOtherText && m_pSpellState->m_bStartedInOther && m_pSpellState->pOtherCursor)
+ // if there is a selection (within body or header/footer text)
+ // then spell/grammar checking should not move outside of it.
+ if (!m_pSpellState->m_bStartedInSelection)
{
- m_pSpellState->m_bStartedInOther = false;
- pWrtShell->SetSelection(*m_pSpellState->pOtherCursor);
- pWrtShell->SpellEnd();
- delete m_pSpellState->pOtherCursor;
- m_pSpellState->pOtherCursor = 0;
- pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_CURR, DOCPOS_OTHERSTART, FALSE );
- pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn);
- }
- if(!aRet.size())
- {
- //end spelling
- pWrtShell->SpellEnd();
- if(bOtherText)
+ //find out which text has been spelled body or other
+ bOtherText = !(pWrtShell->GetFrmType(0,sal_True) & FRMTYPE_BODY);
+ if(bOtherText && m_pSpellState->m_bStartedInOther && m_pSpellState->pOtherCursor)
{
- m_pSpellState->m_bOtherSpelled = true;
- //has the body been spelled?
- if(!m_pSpellState->m_bBodySpelled)
+ m_pSpellState->m_bStartedInOther = false;
+ pWrtShell->SetSelection(*m_pSpellState->pOtherCursor);
+ pWrtShell->SpellEnd();
+ delete m_pSpellState->pOtherCursor;
+ m_pSpellState->pOtherCursor = 0;
+ pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_CURR, DOCPOS_OTHERSTART, FALSE );
+ pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn);
+ }
+ if(!aRet.size())
+ {
+ //end spelling
+ pWrtShell->SpellEnd();
+ if(bOtherText)
{
- pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, FALSE );
- if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
+ m_pSpellState->m_bOtherSpelled = true;
+ //has the body been spelled?
+ if(!m_pSpellState->m_bBodySpelled)
{
- m_pSpellState->m_bBodySpelled = true;
- pWrtShell->SpellEnd();
+ pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, FALSE );
+ if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
+ {
+ m_pSpellState->m_bBodySpelled = true;
+ pWrtShell->SpellEnd();
+ }
}
}
+ else
+ {
+ m_pSpellState->m_bBodySpelled = true;
+ if(!m_pSpellState->m_bOtherSpelled && pWrtShell->HasOtherCnt())
+ {
+ pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, FALSE );
+ if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
+ {
+ pWrtShell->SpellEnd();
+ m_pSpellState->m_bOtherSpelled = true;
+ }
+ }
+ else
+ m_pSpellState->m_bOtherSpelled = true;
+ }
}
- else
+
+ //search for a draw text object that contains error and spell it
+ if(!aRet.size() &&
+ (m_pSpellState->m_bDrawingsSpelled ||
+ !FindNextDrawTextError_Impl(*pWrtShell) || !SpellDrawText_Impl(*pWrtShell, aRet)))
{
- m_pSpellState->m_bBodySpelled = true;
- if(!m_pSpellState->m_bOtherSpelled && pWrtShell->HasOtherCnt())
- {
- pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, FALSE );
- if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
- {
- pWrtShell->SpellEnd();
- m_pSpellState->m_bOtherSpelled = true;
- }
- }
- else
- m_pSpellState->m_bOtherSpelled = true;
+ lcl_LeaveDrawText(*pWrtShell);
+ m_pSpellState->m_bDrawingsSpelled = true;
}
}
-
- //search for a draw text object that contains error and spell it
- if(!aRet.size() &&
- (m_pSpellState->m_bDrawingsSpelled ||
- !FindNextDrawTextError_Impl(*pWrtShell) || !SpellDrawText_Impl(*pWrtShell, aRet)))
- {
- lcl_LeaveDrawText(*pWrtShell);
- m_pSpellState->m_bDrawingsSpelled = true;
- }
}
}
// now only the rest of the body text can be spelled -
@@ -430,7 +460,7 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void)
/*-- 09.09.2003 10:39:40---------------------------------------------------
-----------------------------------------------------------------------*/
-void SwSpellDialogChildWindow::ApplyChangedSentence(const svx::SpellPortions& rChanged)
+void SwSpellDialogChildWindow::ApplyChangedSentence(const svx::SpellPortions& rChanged, bool bRecheck)
{
SwWrtShell* pWrtShell = GetWrtShell_Impl();
DBG_ASSERT(!m_pSpellState->m_bInitialCall, "ApplyChangedSentence in initial call or after resume");
@@ -443,13 +473,19 @@ void SwSpellDialogChildWindow::ApplyChangedSentence(const svx::SpellPortions& rC
SHELL_MODE_LIST_TEXT == eSelMode ||
SHELL_MODE_TABLE_LIST_TEXT == eSelMode ||
SHELL_MODE_TEXT == eSelMode;
+
+ // evaluate if the same sentence should be rechecked or not.
+ // Sentences that got grammar checked should always be rechecked in order
+ // to detect possible errors that get introduced with the changes
+ bRecheck |= pWrtShell->HasLastSentenceGotGrammarChecked();
+
if(bNormalText)
- pWrtShell->ApplyChangedSentence(rChanged, m_bIsGrammarCheckingOn);
+ pWrtShell->ApplyChangedSentence(rChanged, bRecheck);
else if(bDrawText )
{
SdrView* pDrView = pWrtShell->GetDrawView();
SdrOutliner *pOutliner = pDrView->GetTextEditOutliner();
- pOutliner->ApplyChangedSentence(pDrView->GetTextEditOutlinerView()->GetEditView(), rChanged, m_bIsGrammarCheckingOn);
+ pOutliner->ApplyChangedSentence(pDrView->GetTextEditOutlinerView()->GetEditView(), rChanged, bRecheck);
}
}
}
@@ -847,7 +883,7 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh)
Point aTmp( 0,0 );
rSh.SelectObj( aTmp, 0, pTextObj );
SdrPageView* pPV = pDrView->GetSdrPageView();
- rView.BeginTextEdit( pTextObj, pPV, &rView.GetEditWin(), FALSE );
+ rView.BeginTextEdit( pTextObj, pPV, &rView.GetEditWin(), FALSE, TRUE );
rView.AttrChangedNotify(&rSh);
bNextDoc = true;
}
diff --git a/sw/source/ui/dialog/regionsw.cxx b/sw/source/ui/dialog/regionsw.cxx
index 9f8affbc0b..b9ebb07f83 100644
--- a/sw/source/ui/dialog/regionsw.cxx
+++ b/sw/source/ui/dialog/regionsw.cxx
@@ -117,7 +117,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
else
aTmpStr = rSh.GetUniqueSectionName();
- SwSection aSection(CONTENT_SECTION,aTmpStr);
+ SwSectionData aSection(CONTENT_SECTION, aTmpStr);
rReq.SetReturnValue(SfxStringItem(FN_INSERT_REGION, aTmpStr));
aSet.Put( *pSet );
@@ -153,10 +153,10 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
(BOOL)((const SfxBoolItem *)pItem)->GetValue():FALSE;
// <--
- aSection.SetProtect(bProtect);
+ aSection.SetProtectFlag(bProtect);
aSection.SetHidden(bHidden);
// --> FME 2004-06-22 #114856# edit in readonly sections
- aSection.SetEditInReadonly(bEditInReadonly);
+ aSection.SetEditInReadonlyFlag(bEditInReadonly);
// <--
if(SFX_ITEM_SET ==
@@ -193,9 +193,10 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
}
}
-IMPL_STATIC_LINK( SwWrtShell, InsertRegionDialog, SwSection*, pSect )
+IMPL_STATIC_LINK( SwWrtShell, InsertRegionDialog, SwSectionData*, pSect )
{
- if( pSect )
+ ::std::auto_ptr<SwSectionData> pSectionData(pSect);
+ if (pSectionData.get())
{
SfxItemSet aSet(pThis->GetView().GetPool(),
RES_COL, RES_COL,
@@ -214,10 +215,9 @@ IMPL_STATIC_LINK( SwWrtShell, InsertRegionDialog, SwSection*, pSect )
AbstractInsertSectionTabDialog* aTabDlg = pFact->CreateInsertSectionTabDialog( DLG_INSERT_SECTION,
&pThis->GetView().GetViewFrame()->GetWindow(),aSet , *pThis);
DBG_ASSERT(aTabDlg, "Dialogdiet fail!");
- aTabDlg->SetSection(*pSect);
+ aTabDlg->SetSectionData(*pSectionData);
aTabDlg->Execute();
- delete pSect;
delete aTabDlg;
}
return 0;
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 4d787d859d..9af9dfbd0b 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -566,9 +566,10 @@ void AbstractEditRegionDlg_Impl::SelectSection(const String& rSectionName)
}
// AbstractEditRegionDlg_Impl end
//AbstractInsertSectionTabDialog_Impl begin
-void AbstractInsertSectionTabDialog_Impl::SetSection(const SwSection& rSect)
+void
+AbstractInsertSectionTabDialog_Impl::SetSectionData(SwSectionData const& rSect)
{
- pDlg->SetSection( rSect);
+ pDlg->SetSectionData(rSect);
}
// AbstractInsertSectionTabDialog_Impl end
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 3c12709bd6..8c3355bb6b 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -377,7 +377,7 @@ class SwInsertSectionTabDialog;
class AbstractInsertSectionTabDialog_Impl : public AbstractInsertSectionTabDialog
{
DECL_ABSTDLG_BASE(AbstractInsertSectionTabDialog_Impl,SwInsertSectionTabDialog)
- virtual void SetSection(const SwSection& rSect);
+ virtual void SetSectionData(SwSectionData const& rSect);
};
//for SwInsertSectionTabDialog end
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index ef42b18e5a..440457f0b1 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -80,13 +80,12 @@
using namespace ::com::sun::star;
+
// sw/inc/docary.hxx
SV_IMPL_PTRARR( SwSectionFmts, SwSectionFmtPtr )
#define FILE_NAME_LENGTH 17
-SV_IMPL_OP_PTRARR_SORT( SectReprArr, SectReprPtr )
-
static void lcl_ReadSections( SfxMedium& rMedium, ComboBox& rBox );
void lcl_FillList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAvailNames, const SwSectionFmt* pNewFmt )
@@ -103,7 +102,8 @@ void lcl_FillList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAvailNames
(eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION
&& TOX_HEADER_SECTION != eTmpType )
{
- String* pString = new String(pFmt->GetSection()->GetName());
+ String* pString =
+ new String(pFmt->GetSection()->GetSectionName());
if(pAvailNames)
pAvailNames->InsertEntry(*pString);
rSubRegions.InsertEntry(*pString);
@@ -123,7 +123,8 @@ void lcl_FillList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAvailNames
(eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION
&& TOX_HEADER_SECTION != eTmpType )
{
- String* pString = new String(pFmt->GetSection()->GetName());
+ String* pString =
+ new String(pFmt->GetSection()->GetSectionName());
if(pAvailNames)
pAvailNames->InsertEntry(*pString);
rSubRegions.InsertEntry(*pString);
@@ -164,26 +165,82 @@ public:
Beschreibung: User Data Klasse fuer Bereichsinformationen
----------------------------------------------------------------------------*/
-SectRepr::SectRepr( USHORT nPos, SwSection& rSect ) :
- aSection( CONTENT_SECTION, aEmptyStr ),
- aBrush( RES_BACKGROUND ),
- aFrmDirItem( FRMDIR_ENVIRONMENT, RES_FRAMEDIR ),
- aLRSpaceItem( RES_LR_SPACE ),
- bSelected(FALSE)
+class SectRepr
+{
+private:
+ SwSectionData m_SectionData;
+ SwFmtCol m_Col;
+ SvxBrushItem m_Brush;
+ SwFmtFtnAtTxtEnd m_FtnNtAtEnd;
+ SwFmtEndAtTxtEnd m_EndNtAtEnd;
+ SwFmtNoBalancedColumns m_Balance;
+ SvxFrameDirectionItem m_FrmDirItem;
+ SvxLRSpaceItem m_LRSpaceItem;
+ USHORT m_nArrPos;
+ // zeigt an, ob evtl. Textinhalt im Bereich ist
+ bool m_bContent : 1;
+ // fuer Multiselektion erst markieren, dann mit der TreeListBox arbeiten!
+ bool m_bSelected : 1;
+ uno::Sequence<sal_Int8> m_TempPasswd;
+
+public:
+ SectRepr(USHORT nPos, SwSection& rSect);
+ bool operator==(SectRepr& rSectRef) const
+ { return m_nArrPos == rSectRef.GetArrPos(); }
+
+ bool operator< (SectRepr& rSectRef) const
+ { return m_nArrPos < rSectRef.GetArrPos(); }
+
+ SwSectionData & GetSectionData() { return m_SectionData; }
+ SwSectionData const&GetSectionData() const { return m_SectionData; }
+ SwFmtCol& GetCol() { return m_Col; }
+ SvxBrushItem& GetBackground() { return m_Brush; }
+ SwFmtFtnAtTxtEnd& GetFtnNtAtEnd() { return m_FtnNtAtEnd; }
+ SwFmtEndAtTxtEnd& GetEndNtAtEnd() { return m_EndNtAtEnd; }
+ SwFmtNoBalancedColumns& GetBalance() { return m_Balance; }
+ SvxFrameDirectionItem& GetFrmDir() { return m_FrmDirItem; }
+ SvxLRSpaceItem& GetLRSpace() { return m_LRSpaceItem; }
+
+ USHORT GetArrPos() const { return m_nArrPos; }
+ String GetFile() const;
+ String GetSubRegion() const;
+ void SetFile(String const& rFile);
+ void SetFilter(String const& rFilter);
+ void SetSubRegion(String const& rSubRegion);
+
+ bool IsContent() { return m_bContent; }
+ void SetContent(bool const bValue) { m_bContent = bValue; }
+
+ void SetSelected() { m_bSelected = true; }
+ bool IsSelected() const { return m_bSelected; }
+
+ uno::Sequence<sal_Int8> & GetTempPasswd() { return m_TempPasswd; }
+ void SetTempPasswd(const uno::Sequence<sal_Int8> & rPasswd)
+ { m_TempPasswd = rPasswd; }
+};
+
+
+SV_IMPL_OP_PTRARR_SORT( SectReprArr, SectReprPtr )
+
+SectRepr::SectRepr( USHORT nPos, SwSection& rSect )
+ : m_SectionData( rSect )
+ , m_Brush( RES_BACKGROUND )
+ , m_FrmDirItem( FRMDIR_ENVIRONMENT, RES_FRAMEDIR )
+ , m_LRSpaceItem( RES_LR_SPACE )
+ , m_nArrPos(nPos)
+ , m_bContent(m_SectionData.GetLinkFileName().Len() == 0)
+ , m_bSelected(false)
{
- aSection = rSect;
- bContent = aSection.GetLinkFileName().Len() == 0;
- nArrPos=nPos;
SwSectionFmt *pFmt = rSect.GetFmt();
if( pFmt )
{
- aCol = pFmt->GetCol();
- aBrush = pFmt->GetBackground();
- aFtnNtAtEnd = pFmt->GetFtnAtTxtEnd();
- aEndNtAtEnd = pFmt->GetEndAtTxtEnd();
- aBalance.SetValue(pFmt->GetBalancedColumns().GetValue());
- aFrmDirItem = pFmt->GetFrmDir();
- aLRSpaceItem = pFmt->GetLRSpace();
+ m_Col = pFmt->GetCol();
+ m_Brush = pFmt->GetBackground();
+ m_FtnNtAtEnd = pFmt->GetFtnAtTxtEnd();
+ m_EndNtAtEnd = pFmt->GetEndAtTxtEnd();
+ m_Balance.SetValue(pFmt->GetBalancedColumns().GetValue());
+ m_FrmDirItem = pFmt->GetFrmDir();
+ m_LRSpaceItem = pFmt->GetLRSpace();
}
}
@@ -192,7 +249,7 @@ void SectRepr::SetFile( const String& rFile )
String sNewFile( INetURLObject::decode( rFile, INET_HEX_ESCAPE,
INetURLObject::DECODE_UNAMBIGUOUS,
RTL_TEXTENCODING_UTF8 ));
- String sOldFileName( aSection.GetLinkFileName() );
+ String sOldFileName( m_SectionData.GetLinkFileName() );
String sSub( sOldFileName.GetToken( 2, sfx2::cTokenSeperator ) );
if( rFile.Len() || sSub.Len() )
@@ -205,19 +262,23 @@ void SectRepr::SetFile( const String& rFile )
sNewFile += sSub;
}
- aSection.SetLinkFileName( sNewFile );
+ m_SectionData.SetLinkFileName( sNewFile );
if( rFile.Len() || sSub.Len() )
- aSection.SetType( FILE_LINK_SECTION );
+ {
+ m_SectionData.SetType( FILE_LINK_SECTION );
+ }
else
- aSection.SetType( CONTENT_SECTION );
+ {
+ m_SectionData.SetType( CONTENT_SECTION );
+ }
}
void SectRepr::SetFilter( const String& rFilter )
{
String sNewFile;
- String sOldFileName( aSection.GetLinkFileName() );
+ String sOldFileName( m_SectionData.GetLinkFileName() );
String sFile( sOldFileName.GetToken( 0, sfx2::cTokenSeperator ) );
String sSub( sOldFileName.GetToken( 2, sfx2::cTokenSeperator ) );
@@ -227,16 +288,18 @@ void SectRepr::SetFilter( const String& rFilter )
else if( sSub.Len() )
(( sNewFile = sfx2::cTokenSeperator ) += sfx2::cTokenSeperator ) += sSub;
- aSection.SetLinkFileName( sNewFile );
+ m_SectionData.SetLinkFileName( sNewFile );
if( sNewFile.Len() )
- aSection.SetType( FILE_LINK_SECTION );
+ {
+ m_SectionData.SetType( FILE_LINK_SECTION );
+ }
}
void SectRepr::SetSubRegion(const String& rSubRegion)
{
String sNewFile;
- String sOldFileName( aSection.GetLinkFileName() );
+ String sOldFileName( m_SectionData.GetLinkFileName() );
String sFilter( sOldFileName.GetToken( 1, sfx2::cTokenSeperator ) );
sOldFileName = sOldFileName.GetToken( 0, sfx2::cTokenSeperator );
@@ -244,21 +307,25 @@ void SectRepr::SetSubRegion(const String& rSubRegion)
(((( sNewFile = sOldFileName ) += sfx2::cTokenSeperator ) += sFilter )
+= sfx2::cTokenSeperator ) += rSubRegion;
- aSection.SetLinkFileName( sNewFile );
+ m_SectionData.SetLinkFileName( sNewFile );
if( rSubRegion.Len() || sOldFileName.Len() )
- aSection.SetType( FILE_LINK_SECTION );
+ {
+ m_SectionData.SetType( FILE_LINK_SECTION );
+ }
else
- aSection.SetType( CONTENT_SECTION );
+ {
+ m_SectionData.SetType( CONTENT_SECTION );
+ }
}
String SectRepr::GetFile() const
{
- String sLinkFile( aSection.GetLinkFileName() );
+ String sLinkFile( m_SectionData.GetLinkFileName() );
if( sLinkFile.Len() )
{
- if( DDE_LINK_SECTION == aSection.GetType() )
+ if (DDE_LINK_SECTION == m_SectionData.GetType())
{
USHORT n = sLinkFile.SearchAndReplace( sfx2::cTokenSeperator, ' ' );
sLinkFile.SearchAndReplace( sfx2::cTokenSeperator, ' ', n );
@@ -276,7 +343,7 @@ String SectRepr::GetFile() const
String SectRepr::GetSubRegion() const
{
- String sLinkFile( aSection.GetLinkFileName() );
+ String sLinkFile( m_SectionData.GetLinkFileName() );
if( sLinkFile.Len() )
sLinkFile = sLinkFile.GetToken( 2, sfx2::cTokenSeperator );
return sLinkFile;
@@ -284,7 +351,6 @@ String SectRepr::GetSubRegion() const
-
/*----------------------------------------------------------------------------
Beschreibung: Dialog Bearbeiten Bereiche
----------------------------------------------------------------------------*/
@@ -404,7 +470,8 @@ BOOL SwEditRegionDlg::CheckPasswd(CheckBox* pBox)
while( pEntry )
{
SectReprPtr pRepr = (SectReprPtr)pEntry->GetUserData();
- if(!pRepr->GetTempPasswd().getLength() && pRepr->GetPasswd().getLength())
+ if (!pRepr->GetTempPasswd().getLength()
+ && pRepr->GetSectionData().GetPassword().getLength())
{
SwTestPasswdDlg aPasswdDlg(this);
bRet = FALSE;
@@ -413,7 +480,8 @@ BOOL SwEditRegionDlg::CheckPasswd(CheckBox* pBox)
String sNewPasswd( aPasswdDlg.GetPassword() );
UNO_NMSPC::Sequence <sal_Int8 > aNewPasswd;
SvPasswordHelper::GetHashPassword( aNewPasswd, sNewPasswd );
- if(SvPasswordHelper::CompareHashPassword(pRepr->GetPasswd(), sNewPasswd))
+ if (SvPasswordHelper::CompareHashPassword(
+ pRepr->GetSectionData().GetPassword(), sNewPasswd))
{
pRepr->SetTempPasswd(aNewPasswd);
bRet = TRUE;
@@ -460,7 +528,7 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry
SectRepr* pSectRepr = new SectRepr( n,
*(pSect=pFmt->GetSection()) );
Image aImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden(), FALSE);
- pEntry = aTree.InsertEntry( pSect->GetName(), aImg, aImg );
+ pEntry = aTree.InsertEntry(pSect->GetSectionName(), aImg, aImg);
Image aHCImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden(), TRUE);
aTree.SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
aTree.SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
@@ -493,7 +561,8 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry
FindArrPos( pSect->GetFmt() ), *pSect );
Image aImage = BuildBitmap( pSect->IsProtect(),
pSect->IsHidden(), FALSE);
- pNEntry=aTree.InsertEntry( pSect->GetName(), aImage, aImage, pEntry);
+ pNEntry = aTree.InsertEntry(
+ pSect->GetSectionName(), aImage, aImage, pEntry);
Image aHCImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden(), TRUE);
aTree.SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
aTree.SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
@@ -552,7 +621,7 @@ void SwEditRegionDlg::SelectSection(const String& rSectionName)
while(pEntry)
{
SectReprPtr pRepr = (SectReprPtr)pEntry->GetUserData();
- if(pRepr->GetSection().GetName() == rSectionName)
+ if (pRepr->GetSectionData().GetSectionName() == rSectionName)
break;
pEntry = aTree.Next(pEntry);
}
@@ -589,15 +658,15 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
// <--
aFileCB.EnableTriState( TRUE );
- BOOL bHiddenValid = TRUE;
- BOOL bProtectValid = TRUE;
- BOOL bConditionValid = TRUE;
+ bool bHiddenValid = true;
+ bool bProtectValid = true;
+ bool bConditionValid = true;
// --> FME 2004-06-22 #114856# edit in readonly sections
- BOOL bEditInReadonlyValid = TRUE;
- BOOL bEditInReadonly = TRUE;
+ bool bEditInReadonlyValid = true;
+ bool bEditInReadonly = true;
// <--
- BOOL bHidden = TRUE;
- BOOL bProtect = TRUE;
+ bool bHidden = true;
+ bool bProtect = true;
String sCondition;
BOOL bFirst = TRUE;
BOOL bFileValid = TRUE;
@@ -607,29 +676,32 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
while( pEntry )
{
SectRepr* pRepr=(SectRepr*) pEntry->GetUserData();
+ SwSectionData const& rData( pRepr->GetSectionData() );
if(bFirst)
{
- sCondition = pRepr->GetCondition();
- bHidden = pRepr->IsHidden();
- bProtect = pRepr->IsProtect();
+ sCondition = rData.GetCondition();
+ bHidden = rData.IsHidden();
+ bProtect = rData.IsProtectFlag();
// --> FME 2004-06-22 #114856# edit in readonly sections
- bEditInReadonly = pRepr->IsEditInReadonly();
+ bEditInReadonly = rData.IsEditInReadonlyFlag();
// <--
- bFile = pRepr->GetSectionType() != CONTENT_SECTION;
- aCurPasswd = pRepr->GetPasswd();
+ bFile = (rData.GetType() != CONTENT_SECTION);
+ aCurPasswd = rData.GetPassword();
}
else
{
- String sTemp(pRepr->GetCondition());
+ String sTemp(rData.GetCondition());
if(sCondition != sTemp)
bConditionValid = FALSE;
- bHiddenValid = bHidden == pRepr->IsHidden();
- bProtectValid = bProtect == pRepr->IsProtect();
+ bHiddenValid = (bHidden == rData.IsHidden());
+ bProtectValid = (bProtect == rData.IsProtectFlag());
// --> FME 2004-06-22 #114856# edit in readonly sections
- bEditInReadonlyValid = bEditInReadonly == pRepr->IsEditInReadonly();
+ bEditInReadonlyValid =
+ (bEditInReadonly == rData.IsEditInReadonlyFlag());
// <--
- bFileValid = (pRepr->GetSectionType() != CONTENT_SECTION) == bFile;
- bPasswdValid = aCurPasswd == pRepr->GetPasswd();
+ bFileValid = (bFile ==
+ (rData.GetType() != CONTENT_SECTION));
+ bPasswdValid = (aCurPasswd == rData.GetPassword());
}
pEntry = pBox->NextSelected(pEntry);
bFirst = FALSE;
@@ -685,13 +757,14 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
aCurName .Enable(TRUE);
aOptionsPB .Enable(TRUE);
SectRepr* pRepr=(SectRepr*) pEntry->GetUserData();
- aConditionED.SetText(pRepr->GetCondition());
+ SwSectionData const& rData( pRepr->GetSectionData() );
+ aConditionED.SetText(rData.GetCondition());
aHideCB.Enable();
- aHideCB.SetState(pRepr->IsHidden() ? STATE_CHECK : STATE_NOCHECK);
+ aHideCB.SetState((rData.IsHidden()) ? STATE_CHECK : STATE_NOCHECK);
BOOL bHide = STATE_CHECK == aHideCB.GetState();
aConditionED.Enable(bHide);
aConditionFT.Enable(bHide);
- aPasswdCB.Check(pRepr->GetPasswd().getLength() > 0);
+ aPasswdCB.Check(rData.GetPassword().getLength() > 0);
aOK.Enable();
aPasswdCB.Enable();
@@ -707,7 +780,7 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
aFileCB.Check(TRUE);
aFileNameED.SetText(aFile);
aSubRegionED.SetText(sSub);
- aDDECB.Check(pRepr->GetSectionType() == DDE_LINK_SECTION );
+ aDDECB.Check(rData.GetType() == DDE_LINK_SECTION);
}
else
{
@@ -718,11 +791,13 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
}
UseFileHdl(&aFileCB);
DDEHdl( &aDDECB );
- aProtectCB.SetState(pRepr->IsProtect() ? STATE_CHECK : STATE_NOCHECK);
+ aProtectCB.SetState((rData.IsProtectFlag())
+ ? STATE_CHECK : STATE_NOCHECK);
aProtectCB.Enable();
// --> FME 2004-06-22 #114856# edit in readonly sections
- aEditInReadonlyCB.SetState( pRepr->IsEditInReadonly() ? STATE_CHECK : STATE_NOCHECK);
+ aEditInReadonlyCB.SetState((rData.IsEditInReadonlyFlag())
+ ? STATE_CHECK : STATE_NOCHECK);
aEditInReadonlyCB.Enable();
// <--
@@ -794,8 +869,10 @@ IMPL_LINK( SwEditRegionDlg, OkHdl, CheckBox *, EMPTYARG )
{
SectReprPtr pRepr = (SectReprPtr) pEntry->GetUserData();
SwSectionFmt* pFmt = aOrigArray[ pRepr->GetArrPos() ];
- if( !pRepr->GetSection().IsProtectFlag())
- pRepr->GetSection().SetPasswd(UNO_NMSPC::Sequence <sal_Int8 >());
+ if (!pRepr->GetSectionData().IsProtectFlag())
+ {
+ pRepr->GetSectionData().SetPassword(uno::Sequence<sal_Int8 >());
+ }
USHORT nNewPos = rDocFmts.GetPos( pFmt );
if( USHRT_MAX != nNewPos )
{
@@ -821,7 +898,7 @@ IMPL_LINK( SwEditRegionDlg, OkHdl, CheckBox *, EMPTYARG )
if( pFmt->GetLRSpace() != pRepr->GetLRSpace())
pSet->Put( pRepr->GetLRSpace());
- rSh.ChgSection( nNewPos, pRepr->GetSection(),
+ rSh.UpdateSection( nNewPos, pRepr->GetSectionData(),
pSet->Count() ? pSet : 0 );
delete pSet;
}
@@ -863,7 +940,7 @@ IMPL_LINK( SwEditRegionDlg, ChangeProtectHdl, TriStateBox *, pBox )
while( pEntry )
{
SectReprPtr pRepr = (SectReprPtr) pEntry->GetUserData();
- pRepr->SetProtect(bCheck);
+ pRepr->GetSectionData().SetProtectFlag(bCheck);
Image aImage = BuildBitmap( bCheck,
STATE_CHECK == aHideCB.GetState(), FALSE);
aTree.SetExpandedEntryBmp(pEntry, aImage, BMP_COLOR_NORMAL);
@@ -891,7 +968,7 @@ IMPL_LINK( SwEditRegionDlg, ChangeHideHdl, TriStateBox *, pBox )
while( pEntry )
{
SectReprPtr pRepr = (SectReprPtr) pEntry->GetUserData();
- pRepr->SetHidden(STATE_CHECK == pBox->GetState());
+ pRepr->GetSectionData().SetHidden(STATE_CHECK == pBox->GetState());
Image aImage = BuildBitmap(STATE_CHECK == aProtectCB.GetState(),
STATE_CHECK == pBox->GetState(), FALSE);
aTree.SetExpandedEntryBmp(pEntry, aImage, BMP_COLOR_NORMAL);
@@ -924,7 +1001,8 @@ IMPL_LINK( SwEditRegionDlg, ChangeEditInReadonlyHdl, TriStateBox *, pBox )
while( pEntry )
{
SectReprPtr pRepr = (SectReprPtr) pEntry->GetUserData();
- pRepr->SetEditInReadonly(STATE_CHECK == pBox->GetState());
+ pRepr->GetSectionData().SetEditInReadonlyFlag(
+ STATE_CHECK == pBox->GetState());
pEntry = aTree.NextSelected(pEntry);
}
@@ -1028,7 +1106,7 @@ IMPL_LINK( SwEditRegionDlg, UseFileHdl, CheckBox *, pBox )
{
pSectRepr->SetFile(aEmptyStr);
pSectRepr->SetSubRegion(aEmptyStr);
- pSectRepr->SetFilePasswd(aEmptyStr);
+ pSectRepr->GetSectionData().SetLinkFilePassword(aEmptyStr);
}
pEntry = aTree.NextSelected(pEntry);
@@ -1221,8 +1299,8 @@ IMPL_LINK( SwEditRegionDlg, FileNameHdl, Edit *, pEdit )
nPos = sLink.SearchAndReplace( ' ', sfx2::cTokenSeperator );
sLink.SearchAndReplace( ' ', sfx2::cTokenSeperator, nPos );
- pSectRepr->GetSection().SetLinkFileName( sLink );
- pSectRepr->GetSection().SetType( DDE_LINK_SECTION );
+ pSectRepr->GetSectionData().SetLinkFileName( sLink );
+ pSectRepr->GetSectionData().SetType( DDE_LINK_SECTION );
}
else
{
@@ -1237,7 +1315,7 @@ IMPL_LINK( SwEditRegionDlg, FileNameHdl, Edit *, pEdit )
aAbs, sTmp, URIHelper::GetMaybeFileHdl() );
}
pSectRepr->SetFile( sTmp );
- pSectRepr->SetFilePasswd( aEmptyStr );
+ pSectRepr->GetSectionData().SetLinkFilePassword( aEmptyStr );
}
}
else
@@ -1259,6 +1337,7 @@ IMPL_LINK( SwEditRegionDlg, DDEHdl, CheckBox*, pBox )
{
BOOL bFile = aFileCB.IsChecked();
SectReprPtr pSectRepr = (SectRepr*)pEntry->GetUserData();
+ SwSectionData & rData( pSectRepr->GetSectionData() );
BOOL bDDE = pBox->IsChecked();
if(bDDE)
{
@@ -1267,13 +1346,13 @@ IMPL_LINK( SwEditRegionDlg, DDEHdl, CheckBox*, pBox )
aDDECommandFT.Show();
aSubRegionFT.Hide();
aSubRegionED.Hide();
- if(FILE_LINK_SECTION == pSectRepr->GetSectionType() )
+ if (FILE_LINK_SECTION == rData.GetType())
{
pSectRepr->SetFile(aEmptyStr);
aFileNameED.SetText(aEmptyStr);
- pSectRepr->SetFilePasswd( aEmptyStr );
+ rData.SetLinkFilePassword( aEmptyStr );
}
- pSectRepr->SetSectionType( DDE_LINK_SECTION );
+ rData.SetType(DDE_LINK_SECTION);
}
else
{
@@ -1285,11 +1364,11 @@ IMPL_LINK( SwEditRegionDlg, DDEHdl, CheckBox*, pBox )
aSubRegionED.Enable(bFile);
aSubRegionFT.Enable(bFile);
aSubRegionED.Enable(bFile);
- if(DDE_LINK_SECTION == pSectRepr->GetSectionType() )
+ if (DDE_LINK_SECTION == rData.GetType())
{
- pSectRepr->SetSectionType( FILE_LINK_SECTION );
+ rData.SetType(FILE_LINK_SECTION);
pSectRepr->SetFile(aEmptyStr);
- pSectRepr->SetFilePasswd( aEmptyStr );
+ rData.SetLinkFilePassword( aEmptyStr );
aFileNameED.SetText(aEmptyStr);
}
}
@@ -1343,10 +1422,12 @@ IMPL_LINK( SwEditRegionDlg, ChangePasswdHdl, Button *, pBox )
break;
}
}
- pRepr->GetSection().SetPasswd(pRepr->GetTempPasswd());
+ pRepr->GetSectionData().SetPassword(pRepr->GetTempPasswd());
}
else
- pRepr->GetSection().SetPasswd(UNO_NMSPC::Sequence <sal_Int8 >());
+ {
+ pRepr->GetSectionData().SetPassword(uno::Sequence<sal_Int8 >());
+ }
pEntry = aTree.NextSelected(pEntry);
}
return 0;
@@ -1368,7 +1449,7 @@ IMPL_LINK( SwEditRegionDlg, NameEditHdl, Edit *, EMPTYARG )
String aName = aCurName.GetText();
aTree.SetEntryText(pEntry,aName);
SectReprPtr pRepr = (SectReprPtr) pEntry->GetUserData();
- pRepr->GetSection().SetName(aName);
+ pRepr->GetSectionData().SetSectionName(aName);
aOK.Enable(aName.Len() != 0);
}
@@ -1389,7 +1470,7 @@ IMPL_LINK( SwEditRegionDlg, ConditionEditHdl, Edit *, pEdit )
while( pEntry )
{
SectReprPtr pRepr = (SectReprPtr)pEntry->GetUserData();
- pRepr->SetCondition (pEdit->GetText());
+ pRepr->GetSectionData().SetCondition(pEdit->GetText());
pEntry = aTree.NextSelected(pEntry);
}
return 0;
@@ -1420,7 +1501,7 @@ IMPL_LINK( SwEditRegionDlg, DlgClosedHdl, sfx2::FileDialogHelper *, _pFileDlg )
SectReprPtr pSectRepr = (SectRepr*)pEntry->GetUserData();
pSectRepr->SetFile( sFileName );
pSectRepr->SetFilter( sFilterName );
- pSectRepr->SetFilePasswd( sPassword );
+ pSectRepr->GetSectionData().SetLinkFilePassword(sPassword);
aFileNameED.SetText( pSectRepr->GetFile() );
}
@@ -1495,8 +1576,8 @@ static void lcl_ReadSections( SfxMedium& rMedium, ComboBox& rBox )
SwInsertSectionTabDialog::SwInsertSectionTabDialog(
Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh) :
SfxTabDialog( pParent, SW_RES(DLG_INSERT_SECTION), &rSet ),
- rWrtSh(rSh),
- pToInsertSection(0)
+ rWrtSh(rSh)
+ , m_pSectionData(0)
{
String sInsert(SW_RES(ST_INSERT));
GetOKButton().SetText(sInsert);
@@ -1527,7 +1608,6 @@ SwInsertSectionTabDialog::SwInsertSectionTabDialog(
* --------------------------------------------------*/
SwInsertSectionTabDialog::~SwInsertSectionTabDialog()
{
- delete pToInsertSection;
}
/* -----------------21.05.99 10:23-------------------
*
@@ -1556,10 +1636,9 @@ void SwInsertSectionTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage )
*
* --------------------------------------------------*/
-void SwInsertSectionTabDialog::SetSection(const SwSection& rSect)
+void SwInsertSectionTabDialog::SetSectionData(SwSectionData const& rSect)
{
- pToInsertSection = new SwSection(CONTENT_SECTION, aEmptyStr);
- *pToInsertSection = rSect;
+ m_pSectionData.reset( new SwSectionData(rSect) );
}
/* -----------------21.05.99 13:10-------------------
*
@@ -1567,9 +1646,10 @@ void SwInsertSectionTabDialog::SetSection(const SwSection& rSect)
short SwInsertSectionTabDialog::Ok()
{
short nRet = SfxTabDialog::Ok();
- DBG_ASSERT(pToInsertSection, "keiner Section?");
+ DBG_ASSERT(m_pSectionData.get(),
+ "SwInsertSectionTabDialog: no SectionData?");
const SfxItemSet* pOutputItemSet = GetOutputItemSet();
- rWrtSh.InsertSection(*pToInsertSection, pOutputItemSet);
+ rWrtSh.InsertSection(*m_pSectionData, pOutputItemSet);
SfxViewFrame* pViewFrm = rWrtSh.GetView().GetViewFrame();
uno::Reference< frame::XDispatchRecorder > xRecorder =
pViewFrm->GetBindings().GetRecorder();
@@ -1582,15 +1662,20 @@ short SwInsertSectionTabDialog::Ok()
aRequest.AppendItem(SfxUInt16Item(SID_ATTR_COLUMNS,
((const SwFmtCol*)pCol)->GetColumns().Count()));
}
- aRequest.AppendItem(SfxStringItem( FN_PARAM_REGION_NAME, pToInsertSection->GetName()));
- aRequest.AppendItem(SfxStringItem( FN_PARAM_REGION_CONDITION, pToInsertSection->GetCondition()));
- aRequest.AppendItem(SfxBoolItem( FN_PARAM_REGION_HIDDEN, pToInsertSection->IsHidden()));
- aRequest.AppendItem(SfxBoolItem(FN_PARAM_REGION_PROTECT, pToInsertSection->IsProtect()));
+ aRequest.AppendItem(SfxStringItem( FN_PARAM_REGION_NAME,
+ m_pSectionData->GetSectionName()));
+ aRequest.AppendItem(SfxStringItem( FN_PARAM_REGION_CONDITION,
+ m_pSectionData->GetCondition()));
+ aRequest.AppendItem(SfxBoolItem( FN_PARAM_REGION_HIDDEN,
+ m_pSectionData->IsHidden()));
+ aRequest.AppendItem(SfxBoolItem( FN_PARAM_REGION_PROTECT,
+ m_pSectionData->IsProtectFlag()));
// --> FME 2004-06-22 #114856# edit in readonly sections
- aRequest.AppendItem(SfxBoolItem(FN_PARAM_REGION_EDIT_IN_READONLY, pToInsertSection->IsEditInReadonly()));
+ aRequest.AppendItem(SfxBoolItem( FN_PARAM_REGION_EDIT_IN_READONLY,
+ m_pSectionData->IsEditInReadonlyFlag()));
// <--
- String sLinkFileName( pToInsertSection->GetLinkFileName() );
+ String sLinkFileName( m_pSectionData->GetLinkFileName() );
aRequest.AppendItem(SfxStringItem( FN_PARAM_1, sLinkFileName.GetToken( 0, sfx2::cTokenSeperator )));
aRequest.AppendItem(SfxStringItem( FN_PARAM_2, sLinkFileName.GetToken( 1, sfx2::cTokenSeperator )));
aRequest.AppendItem(SfxStringItem( FN_PARAM_3, sLinkFileName.GetToken( 2, sfx2::cTokenSeperator )));
@@ -1675,13 +1760,16 @@ void SwInsertSectionTabPage::SetWrtShell(SwWrtShell& rSh)
lcl_FillSubRegionList( *m_pWrtSh, aSubRegionED, &aCurName );
- SwSection* pSect = ((SwInsertSectionTabDialog*)GetTabDialog())->GetSection();
- if( pSect ) // etwas vorgegeben ?
+ SwSectionData *const pSectionData =
+ static_cast<SwInsertSectionTabDialog*>(GetTabDialog())
+ ->GetSectionData();
+ if (pSectionData) // something set?
{
- aCurName.SetText( rSh.GetUniqueSectionName( &pSect->GetName() ));
- aProtectCB.Check( 0 != pSect->IsProtect() );
- m_sFileName = pSect->GetLinkFileName();
- m_sFilePasswd = pSect->GetLinkFilePassWd();
+ aCurName.SetText(
+ rSh.GetUniqueSectionName(& pSectionData->GetSectionName()));
+ aProtectCB.Check( 0 != pSectionData->IsProtectFlag() );
+ m_sFileName = pSectionData->GetLinkFileName();
+ m_sFilePasswd = pSectionData->GetLinkFilePassword();
aFileCB.Check( 0 != m_sFileName.Len() );
aFileNameED.SetText( m_sFileName );
UseFileHdl( &aFileCB );
@@ -1696,16 +1784,18 @@ void SwInsertSectionTabPage::SetWrtShell(SwWrtShell& rSh)
* --------------------------------------------------*/
BOOL SwInsertSectionTabPage::FillItemSet( SfxItemSet& )
{
- SwSection aSection(CONTENT_SECTION, aCurName.GetText());
+ SwSectionData aSection(CONTENT_SECTION, aCurName.GetText());
aSection.SetCondition(aConditionED.GetText());
BOOL bProtected = aProtectCB.IsChecked();
- aSection.SetProtect(bProtected);
+ aSection.SetProtectFlag(bProtected);
aSection.SetHidden(aHideCB.IsChecked());
// --> FME 2004-06-22 #114856# edit in readonly sections
- aSection.SetEditInReadonly(aEditInReadonlyCB.IsChecked());
+ aSection.SetEditInReadonlyFlag(aEditInReadonlyCB.IsChecked());
// <--
if(bProtected)
- aSection.SetPasswd(m_aNewPasswd);
+ {
+ aSection.SetPassword(m_aNewPasswd);
+ }
String sFileName = aFileNameED.GetText();
String sSubRegion = aSubRegionED.GetText();
BOOL bDDe = aDDECB.IsChecked();
@@ -1733,7 +1823,7 @@ BOOL SwInsertSectionTabPage::FillItemSet( SfxItemSet& )
aAbs = pMedium->GetURLObject();
aLinkFile = URIHelper::SmartRel2Abs(
aAbs, sFileName, URIHelper::GetMaybeFileHdl() );
- aSection.SetLinkFilePassWd( m_sFilePasswd );
+ aSection.SetLinkFilePassword( m_sFilePasswd );
}
aLinkFile += sfx2::cTokenSeperator;
@@ -1750,7 +1840,7 @@ BOOL SwInsertSectionTabPage::FillItemSet( SfxItemSet& )
FILE_LINK_SECTION);
}
}
- ((SwInsertSectionTabDialog*)GetTabDialog())->SetSection(aSection);
+ ((SwInsertSectionTabDialog*)GetTabDialog())->SetSectionData(aSection);
return TRUE;
}
/* -----------------21.05.99 10:32-------------------
diff --git a/sw/source/ui/dochdl/dochdl.src b/sw/source/ui/dochdl/dochdl.src
index fb4db99410..2afd19c92b 100644..100755
--- a/sw/source/ui/dochdl/dochdl.src
+++ b/sw/source/ui/dochdl/dochdl.src
@@ -73,13 +73,4 @@ String STR_DDEFORMAT
{
Text [ en-US ] = "DDE link" ;
};
-Bitmap BMP_SW_TEAM_MUGSHOT
-{
- File ="writerteam.bmp";
-};
-
-String STR_SW_TEAM_NAMES
-{
- Text = "Back row: Aidan Butler, Hans-Peter Burow, Caolan McNamara, Michael Brauer, Martin Maher, Gunnar Timm\nFront row: Thomas Lange, Oliver-Rainer Duesterhoeft, Henning Brinkmann, Andreas Martens, Oliver Specht, Frank Meies, Daniel Vogelheim";
-};
diff --git a/sw/source/ui/dochdl/gloshdl.cxx b/sw/source/ui/dochdl/gloshdl.cxx
index f51cfde701..c19fb0bd9d 100644..100755
--- a/sw/source/ui/dochdl/gloshdl.cxx
+++ b/sw/source/ui/dochdl/gloshdl.cxx
@@ -607,48 +607,9 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName,
aShortName.Erase(nMaxLen);
aShortName.AppendAscii(" ...");
}
- if ( aShortName.EqualsAscii ( "StarWriterTeam", 0, 14 ) )
- {
- String sGraphicName ( RTL_CONSTASCII_USTRINGPARAM ( "StarWriter team photo" ) );
- String sTeamCredits ( RTL_CONSTASCII_USTRINGPARAM ( "StarWriter team credits" ) );
- pWrtShell->StartUndo ( UNDO_INSGLOSSARY );
- pWrtShell->StartAllAction();
- if(pWrtShell->HasSelection())
- pWrtShell->DelLeft();
- Bitmap aBitmap ( SW_RES ( BMP_SW_TEAM_MUGSHOT ) );
- pWrtShell->Insert ( aEmptyStr, aEmptyStr, aBitmap);
- pWrtShell->SetFlyName ( sGraphicName );
- SwTxtFmtColl* pColl = pWrtShell->GetTxtCollFromPool ( RES_POOLCOLL_LABEL_ABB );
- const IDocumentFieldsAccess* pIDFA = pWrtShell->getIDocumentFieldsAccess();
- SwFieldType* pType = pIDFA->GetFldType( RES_SETEXPFLD, pColl->GetName(), false );
- sal_uInt16 nId = pIDFA->GetFldTypes()->GetPos( pType );
- pWrtShell->InsertLabel( LTYPE_OBJECT, aEmptyStr, aEmptyStr, aEmptyStr, FALSE, nId, aEmptyStr );
- pWrtShell->SwFEShell::SetFlyName( sTeamCredits );
- pWrtShell->SwFEShell::SelectObj ( Point ( ULONG_MAX, ULONG_MAX ) );
- pWrtShell->EnterStdMode();
- pWrtShell->EndPara ( TRUE );
- String aTmp ( SW_RES ( STR_SW_TEAM_NAMES ) );
- pWrtShell->Insert ( aTmp );
- SvxAdjustItem aAdjustItem( SVX_ADJUST_CENTER, RES_PARATR_ADJUST );
- pWrtShell->SetAttr( aAdjustItem );
- pWrtShell->SttPara ();
- pWrtShell->SplitNode();
- pWrtShell->Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
- SvxWeightItem aWeightItem ( WEIGHT_BOLD, RES_CHRATR_WEIGHT );
- pWrtShell->Insert ( String ( RTL_CONSTASCII_USTRINGPARAM ( "The StarWriter team!" ) ) );
- pWrtShell->SttPara ( TRUE );
- pWrtShell->SetAttr( aWeightItem);
- pWrtShell->GotoFly ( sTeamCredits);
- pWrtShell->EndAllAction();
- pWrtShell->EndUndo( UNDO_INSGLOSSARY );
- }
- else
- {
- String aTmp( SW_RES(STR_NOGLOS));
- aTmp.SearchAndReplaceAscii("%1", aShortName);
- InfoBox( pWrtShell->GetView().GetWindow(), aTmp ).Execute();
-
- }
+ String aTmp( SW_RES(STR_NOGLOS));
+ aTmp.SearchAndReplaceAscii("%1", aShortName);
+ InfoBox( pWrtShell->GetView().GetWindow(), aTmp ).Execute();
}
return FALSE;
diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx
index 04819c586e..c19189a563 100644
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
@@ -322,6 +322,19 @@ SwTransferable::~SwTransferable()
// -----------------------------------------------------------------------
+static SwDoc * lcl_GetDoc(SwDocFac & rDocFac)
+{
+ SwDoc *const pDoc = rDocFac.GetDoc();
+ ASSERT( pDoc, "Document not found" );
+ if (pDoc)
+ {
+ pDoc->SetClipBoard( true );
+ }
+ return pDoc;
+}
+
+// -----------------------------------------------------------------------
+
void SwTransferable::ObjectReleased()
{
SwModule *pMod = SW_MOD();
@@ -443,7 +456,7 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor )
}
pClpDocFac = new SwDocFac;
- SwDoc* pTmpDoc = pClpDocFac->GetDoc();
+ SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac);
pTmpDoc->SetRefForDocShell( boost::addressof(aDocShellRef) );
pTmpDoc->LockExpFlds(); // nie die Felder updaten - Text so belassen
@@ -530,8 +543,7 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor )
case SOT_FORMATSTR_ID_DRAWING:
{
- SwDoc *pDoc = pClpDocFac->GetDoc();
- ASSERT( pDoc, "Document not found" );
+ SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
bOK = SetObject( pDoc->GetDrawModel(),
SWTRANSFER_OBJECTTYPE_DRAWMODEL, rFlavor );
}
@@ -539,21 +551,22 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor )
case SOT_FORMAT_STRING:
{
- SwDoc* pDoc = pClpDocFac->GetDoc();
- ASSERT( pDoc, "Document not found" );
- pDoc->SetClipBoard( true );
- bOK = SetObject( pDoc,
- SWTRANSFER_OBJECTTYPE_STRING, rFlavor );
+ SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
+ bOK = SetObject( pDoc, SWTRANSFER_OBJECTTYPE_STRING, rFlavor );
}
break;
case SOT_FORMAT_RTF:
- bOK = SetObject( pClpDocFac->GetDoc(),
- SWTRANSFER_OBJECTTYPE_RTF, rFlavor );
+ {
+ SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
+ bOK = SetObject( pDoc, SWTRANSFER_OBJECTTYPE_RTF, rFlavor );
+ }
break;
case SOT_FORMATSTR_ID_HTML:
- bOK = SetObject( pClpDocFac->GetDoc(),
- SWTRANSFER_OBJECTTYPE_HTML, rFlavor );
+ {
+ SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
+ bOK = SetObject( pDoc, SWTRANSFER_OBJECTTYPE_HTML, rFlavor );
+ }
break;
case SOT_FORMATSTR_ID_SVXB:
@@ -597,7 +610,7 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor )
// default:
if( !aDocShellRef.Is() )
{
- SwDoc *pDoc = pClpDocFac->GetDoc();
+ SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
SwDocShell* pNewDocSh = new SwDocShell( pDoc,
SFX_CREATE_MODE_EMBEDDED );
aDocShellRef = pNewDocSh;
@@ -805,7 +818,8 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut )
pOrigGrf = pClpBitmap;
pClpDocFac = new SwDocFac;
- pWrtShell->Copy( pClpDocFac->GetDoc() );
+ SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
+ pWrtShell->Copy( pDoc );
if (pOrigGrf && !pOrigGrf->GetBitmap().IsEmpty())
AddFormat( SOT_FORMATSTR_ID_SVXB );
@@ -827,7 +841,7 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut )
else if ( nSelection == nsSelectionType::SEL_OLE )
{
pClpDocFac = new SwDocFac;
- SwDoc *pDoc = pClpDocFac->GetDoc();
+ SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
aDocShellRef = new SwDocShell( pDoc, SFX_CREATE_MODE_EMBEDDED);
aDocShellRef->DoInitNew( NULL );
pWrtShell->Copy( pDoc );
@@ -857,8 +871,7 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut )
if( pWrtShell->IsAddMode() && pWrtShell->SwCrsrShell::HasSelection() )
pWrtShell->CreateCrsr();
- SwDoc* pTmpDoc = pClpDocFac->GetDoc();
- pTmpDoc->SetClipBoard( true );
+ SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac);
pTmpDoc->SetRefForDocShell( boost::addressof(aDocShellRef) );
pTmpDoc->LockExpFlds(); // nie die Felder updaten - Text so belassen
@@ -1017,7 +1030,8 @@ int SwTransferable::CalculateAndCopy()
String aStr( pWrtShell->Calculate() );
pClpDocFac = new SwDocFac;
- pWrtShell->Copy( pClpDocFac->GetDoc(), &aStr);
+ SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
+ pWrtShell->Copy(pDoc, & aStr);
eBufferType = TRNSFR_DOCUMENT;
AddFormat( FORMAT_STRING );
@@ -1037,7 +1051,7 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary,
SwWait aWait( *pWrtShell->GetView().GetDocShell(), TRUE );
pClpDocFac = new SwDocFac;
- SwDoc* pCDoc = pClpDocFac->GetDoc();
+ SwDoc *const pCDoc = lcl_GetDoc(*pClpDocFac);
SwNodes& rNds = pCDoc->GetNodes();
SwNodeIndex aNodeIdx( *rNds.GetEndOfContent().StartOfSectionNode() );
@@ -2211,9 +2225,9 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
if( rWrtShell.HasSelection() )
rWrtShell.DelRight();
- SwSection aSect( DDE_LINK_SECTION, aName );
+ SwSectionData aSect( DDE_LINK_SECTION, aName );
aSect.SetLinkFileName( aCmd );
- aSect.SetProtect();
+ aSect.SetProtectFlag(true);
rWrtShell.InsertSection( aSect );
pDDETyp = 0; // FeldTypen wieder entfernen
@@ -2554,10 +2568,11 @@ int SwTransferable::_PasteFileName( TransferableDataHelper& rData,
)
{
// und dann per PostUser Event den Bereich-Einfuegen-Dialog hochreissen
- SwSection* pSect = new SwSection( FILE_LINK_SECTION,
+ SwSectionData * pSect = new SwSectionData(
+ FILE_LINK_SECTION,
rSh.GetDoc()->GetUniqueSectionName() );
pSect->SetLinkFileName( sFileURL );
- pSect->SetProtect( TRUE );
+ pSect->SetProtectFlag( true );
Application::PostUserEvent( STATIC_LINK( &rSh, SwWrtShell,
InsertRegionDialog ), pSect );
diff --git a/sw/source/ui/docvw/AnchorOverlayObject.cxx b/sw/source/ui/docvw/AnchorOverlayObject.cxx
new file mode 100644
index 0000000000..53afaf6257
--- /dev/null
+++ b/sw/source/ui/docvw/AnchorOverlayObject.cxx
@@ -0,0 +1,467 @@
+/************************************************************************* *
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: postit.cxx,v $
+ * $Revision: 1.8.42.11 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#include "precompiled_sw.hxx"
+
+#include <AnchorOverlayObject.hxx>
+#include <SidebarWindowsConsts.hxx>
+
+#include <swrect.hxx>
+#include <view.hxx>
+#include <svx/sdrpaintwindow.hxx>
+#include <svx/svdview.hxx>
+#include <svx/sdr/overlay/overlaymanager.hxx>
+
+#include <sw_primitivetypes2d.hxx>
+#include <drawinglayer/primitive2d/primitivetools2d.hxx>
+#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
+#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
+#include <drawinglayer/primitive2d/shadowprimitive2d.hxx>
+
+namespace sw { namespace sidebarwindows {
+
+//////////////////////////////////////////////////////////////////////////////
+// helper class: Primitive for discrete visualisation
+
+class AnchorPrimitive : public drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D
+{
+private:
+ basegfx::B2DPolygon maTriangle;
+ basegfx::B2DPolygon maLine;
+ basegfx::B2DPolygon maLineTop;
+ const AnchorState maAnchorState;
+ basegfx::BColor maColor;
+
+ // discrete line width
+ double mfLogicLineWidth;
+
+ // bitfield
+ bool mbShadow : 1;
+ bool mbLineSolid : 1;
+
+protected:
+ virtual drawinglayer::primitive2d::Primitive2DSequence create2DDecomposition(
+ const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
+
+public:
+ AnchorPrimitive( const basegfx::B2DPolygon& rTriangle,
+ const basegfx::B2DPolygon& rLine,
+ const basegfx::B2DPolygon& rLineTop,
+ AnchorState aAnchorState,
+ const basegfx::BColor& rColor,
+ double fLogicLineWidth,
+ bool bShadow,
+ bool bLineSolid )
+ : drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D(),
+ maTriangle(rTriangle),
+ maLine(rLine),
+ maLineTop(rLineTop),
+ maAnchorState(aAnchorState),
+ maColor(rColor),
+ mfLogicLineWidth(fLogicLineWidth),
+ mbShadow(bShadow),
+ mbLineSolid(bLineSolid)
+ {}
+
+ // data access
+ const basegfx::B2DPolygon& getTriangle() const { return maTriangle; }
+ const basegfx::B2DPolygon& getLine() const { return maLine; }
+ const basegfx::B2DPolygon& getLineTop() const { return maLineTop; }
+ const AnchorState getAnchorState() const { return maAnchorState; }
+ const basegfx::BColor& getColor() const { return maColor; }
+ double getLogicLineWidth() const { return mfLogicLineWidth; }
+ bool getShadow() const { return mbShadow; }
+ bool getLineSolid() const { return mbLineSolid; }
+
+ virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const;
+
+ DeclPrimitrive2DIDBlock()
+};
+
+drawinglayer::primitive2d::Primitive2DSequence AnchorPrimitive::create2DDecomposition(
+ const drawinglayer::geometry::ViewInformation2D& /*rViewInformation*/) const
+{
+ drawinglayer::primitive2d::Primitive2DSequence aRetval;
+
+ if ( AS_TRI == maAnchorState ||
+ AS_ALL == maAnchorState ||
+ AS_START == maAnchorState )
+ {
+ // create triangle
+ const drawinglayer::primitive2d::Primitive2DReference aTriangle(
+ new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(
+ basegfx::B2DPolyPolygon(getTriangle()),
+ getColor()));
+
+ drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aTriangle);
+ }
+
+ if ( AS_ALL == maAnchorState ||
+ AS_START == maAnchorState )
+ {
+ // create line start
+ const drawinglayer::attribute::LineAttribute aLineAttribute(
+ getColor(),
+ getLogicLineWidth() / (basegfx::fTools::equalZero(getDiscreteUnit()) ? 1.0 : getDiscreteUnit()));
+
+ if(getLineSolid())
+ {
+ const drawinglayer::primitive2d::Primitive2DReference aSolidLine(
+ new drawinglayer::primitive2d::PolygonStrokePrimitive2D(
+ getLine(),
+ aLineAttribute));
+
+ drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aSolidLine);
+ }
+ else
+ {
+ ::std::vector< double > aDotDashArray;
+ const double fDistance(3.0 * 15.0);
+ const double fDashLen(5.0 * 15.0);
+
+ aDotDashArray.push_back(fDashLen);
+ aDotDashArray.push_back(fDistance);
+
+ const drawinglayer::attribute::StrokeAttribute aStrokeAttribute(
+ aDotDashArray,
+ fDistance + fDashLen);
+
+ const drawinglayer::primitive2d::Primitive2DReference aStrokedLine(
+ new drawinglayer::primitive2d::PolygonStrokePrimitive2D(
+ getLine(),
+ aLineAttribute,
+ aStrokeAttribute));
+
+ drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aStrokedLine);
+ }
+ }
+
+ if(aRetval.hasElements() && getShadow())
+ {
+ // shadow is only for triangle and line start, and in upper left
+ // and lower right direction, in different colors
+ const double fColorChange(20.0 / 255.0);
+ const basegfx::B3DTuple aColorChange(fColorChange, fColorChange, fColorChange);
+ basegfx::BColor aLighterColor(getColor() + aColorChange);
+ basegfx::BColor aDarkerColor(getColor() - aColorChange);
+
+ aLighterColor.clamp();
+ aDarkerColor.clamp();
+
+ // create shadow sequence
+ drawinglayer::primitive2d::Primitive2DSequence aShadows(2);
+ basegfx::B2DHomMatrix aTransform;
+
+ aTransform.set(0, 2, -getDiscreteUnit());
+ aTransform.set(1, 2, -getDiscreteUnit());
+
+ aShadows[0] = drawinglayer::primitive2d::Primitive2DReference(
+ new drawinglayer::primitive2d::ShadowPrimitive2D(
+ aTransform,
+ aLighterColor,
+ aRetval));
+
+ aTransform.set(0, 2, getDiscreteUnit());
+ aTransform.set(1, 2, getDiscreteUnit());
+
+ aShadows[1] = drawinglayer::primitive2d::Primitive2DReference(
+ new drawinglayer::primitive2d::ShadowPrimitive2D(
+ aTransform,
+ aDarkerColor,
+ aRetval));
+
+ // add shadow before geometry to make it be proccessed first
+ const drawinglayer::primitive2d::Primitive2DSequence aTemporary(aRetval);
+
+ aRetval = aShadows;
+ drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(aRetval, aTemporary);
+ }
+
+ if ( AS_ALL == maAnchorState ||
+ AS_END == maAnchorState )
+ {
+ // LineTop has to be created, too, but uses no shadow, so add after
+ // the other parts are created
+ const drawinglayer::attribute::LineAttribute aLineAttribute(
+ getColor(),
+ getLogicLineWidth() / (basegfx::fTools::equalZero(getDiscreteUnit()) ? 1.0 : getDiscreteUnit()));
+
+ const drawinglayer::primitive2d::Primitive2DReference aLineTop(
+ new drawinglayer::primitive2d::PolygonStrokePrimitive2D(
+ getLineTop(),
+ aLineAttribute));
+
+ drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aLineTop);
+ }
+
+ return aRetval;
+}
+
+bool AnchorPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const
+{
+ if(drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D::operator==(rPrimitive))
+ {
+ const AnchorPrimitive& rCompare = static_cast< const AnchorPrimitive& >(rPrimitive);
+
+ return (getTriangle() == rCompare.getTriangle()
+ && getLine() == rCompare.getLine()
+ && getLineTop() == rCompare.getLineTop()
+ && getAnchorState() == rCompare.getAnchorState()
+ && getColor() == rCompare.getColor()
+ && getLogicLineWidth() == rCompare.getLogicLineWidth()
+ && getShadow() == rCompare.getShadow()
+ && getLineSolid() == rCompare.getLineSolid());
+ }
+
+ return false;
+}
+
+ImplPrimitrive2DIDBlock(AnchorPrimitive, PRIMITIVE2D_ID_SWSIDEBARANCHORPRIMITIVE)
+
+/****** AnchorOverlayObject ***********************************************************/
+/*static*/ AnchorOverlayObject* AnchorOverlayObject::CreateAnchorOverlayObject(
+ SwView& rDocView,
+ const SwRect& aAnchorRect,
+ const long& aPageBorder,
+ const Point& aLineStart,
+ const Point& aLineEnd,
+ const Color& aColorAnchor )
+{
+ AnchorOverlayObject* pAnchorOverlayObject( 0 );
+ if ( rDocView.GetDrawView() )
+ {
+ SdrPaintWindow* pPaintWindow = rDocView.GetDrawView()->GetPaintWindow(0);
+ if( pPaintWindow )
+ {
+ sdr::overlay::OverlayManager* pOverlayManager = pPaintWindow->GetOverlayManager();
+
+ if ( pOverlayManager )
+ {
+ pAnchorOverlayObject = new AnchorOverlayObject(
+ basegfx::B2DPoint( aAnchorRect.Left() , aAnchorRect.Bottom()-5*15),
+ basegfx::B2DPoint( aAnchorRect.Left()-5*15 , aAnchorRect.Bottom()+5*15),
+ basegfx::B2DPoint( aAnchorRect.Left()+5*15 , aAnchorRect.Bottom()+5*15),
+ basegfx::B2DPoint( aAnchorRect.Left(), aAnchorRect.Bottom()+2*15),
+ basegfx::B2DPoint( aPageBorder ,aAnchorRect.Bottom()+2*15),
+ basegfx::B2DPoint( aLineStart.X(),aLineStart.Y()),
+ basegfx::B2DPoint( aLineEnd.X(),aLineEnd.Y()) ,
+ aColorAnchor,
+ false,
+ false);
+ pOverlayManager->add(*pAnchorOverlayObject);
+ }
+ }
+ }
+
+ return pAnchorOverlayObject;
+}
+
+/*static*/ void AnchorOverlayObject::DestroyAnchorOverlayObject( AnchorOverlayObject* pAnchor )
+{
+ if ( pAnchor )
+ {
+ if ( pAnchor->getOverlayManager() )
+ {
+ // remove this object from the chain
+ pAnchor->getOverlayManager()->remove(*pAnchor);
+ }
+ delete pAnchor;
+ }
+}
+
+AnchorOverlayObject::AnchorOverlayObject( const basegfx::B2DPoint& rBasePos,
+ const basegfx::B2DPoint& rSecondPos,
+ const basegfx::B2DPoint& rThirdPos,
+ const basegfx::B2DPoint& rFourthPos,
+ const basegfx::B2DPoint& rFifthPos,
+ const basegfx::B2DPoint& rSixthPos,
+ const basegfx::B2DPoint& rSeventhPos,
+ const Color aBaseColor,
+ const bool bShadowedEffect,
+ const bool bLineSolid)
+ : OverlayObjectWithBasePosition( rBasePos, aBaseColor )
+ , maSecondPosition(rSecondPos)
+ , maThirdPosition(rThirdPos)
+ , maFourthPosition(rFourthPos)
+ , maFifthPosition(rFifthPos)
+ , maSixthPosition(rSixthPos)
+ , maSeventhPosition(rSeventhPos)
+ , maTriangle()
+ , maLine()
+ , maLineTop()
+ , mHeight(0)
+ , mAnchorState(AS_ALL)
+ , mbShadowedEffect(bShadowedEffect)
+ , mbLineSolid(bLineSolid)
+{
+}
+
+AnchorOverlayObject::~AnchorOverlayObject()
+{
+}
+
+void AnchorOverlayObject::implEnsureGeometry()
+{
+ if(!maTriangle.count())
+ {
+ maTriangle.append(getBasePosition());
+ maTriangle.append(GetSecondPosition());
+ maTriangle.append(GetThirdPosition());
+ maTriangle.setClosed(true);
+ }
+
+ if(!maLine.count())
+ {
+ maLine.append(GetFourthPosition());
+ maLine.append(GetFifthPosition());
+ maLine.append(GetSixthPosition());
+ }
+
+ if(!maLineTop.count())
+ {
+ maLineTop.append(GetSixthPosition());
+ maLineTop.append(GetSeventhPosition());
+ }
+}
+
+void AnchorOverlayObject::implResetGeometry()
+{
+ maTriangle.clear();
+ maLine.clear();
+ maLineTop.clear();
+}
+
+drawinglayer::primitive2d::Primitive2DSequence AnchorOverlayObject::createOverlayObjectPrimitive2DSequence()
+{
+ implEnsureGeometry();
+
+ const drawinglayer::primitive2d::Primitive2DReference aReference(
+ new AnchorPrimitive( maTriangle,
+ maLine,
+ maLineTop,
+ GetAnchorState(),
+ getBaseColor().getBColor(),
+ ANCHORLINE_WIDTH * 15.0,
+ getShadowedEffect(),
+ getLineSolid()) );
+
+ return drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1);
+}
+
+void AnchorOverlayObject::SetAllPosition( const basegfx::B2DPoint& rPoint1,
+ const basegfx::B2DPoint& rPoint2,
+ const basegfx::B2DPoint& rPoint3,
+ const basegfx::B2DPoint& rPoint4,
+ const basegfx::B2DPoint& rPoint5,
+ const basegfx::B2DPoint& rPoint6,
+ const basegfx::B2DPoint& rPoint7)
+{
+ if ( rPoint1 != getBasePosition() ||
+ rPoint2 != GetSecondPosition() ||
+ rPoint3 != GetThirdPosition() ||
+ rPoint4 != GetFourthPosition() ||
+ rPoint5 != GetFifthPosition() ||
+ rPoint6 != GetSixthPosition() ||
+ rPoint7 != GetSeventhPosition() )
+ {
+ maBasePosition = rPoint1;
+ maSecondPosition = rPoint2;
+ maThirdPosition = rPoint3;
+ maFourthPosition = rPoint4;
+ maFifthPosition = rPoint5;
+ maSixthPosition = rPoint6;
+ maSeventhPosition = rPoint7;
+
+ implResetGeometry();
+ objectChange();
+ }
+}
+
+void AnchorOverlayObject::SetSixthPosition(const basegfx::B2DPoint& rNew)
+{
+ if(rNew != maSixthPosition)
+ {
+ maSixthPosition = rNew;
+ implResetGeometry();
+ objectChange();
+ }
+}
+
+void AnchorOverlayObject::SetSeventhPosition(const basegfx::B2DPoint& rNew)
+{
+ if(rNew != maSeventhPosition)
+ {
+ maSeventhPosition = rNew;
+ implResetGeometry();
+ objectChange();
+ }
+}
+
+void AnchorOverlayObject::SetTriPosition(const basegfx::B2DPoint& rPoint1,const basegfx::B2DPoint& rPoint2,const basegfx::B2DPoint& rPoint3,
+ const basegfx::B2DPoint& rPoint4,const basegfx::B2DPoint& rPoint5)
+{
+ if(rPoint1 != getBasePosition()
+ || rPoint2 != GetSecondPosition()
+ || rPoint3 != GetThirdPosition()
+ || rPoint4 != GetFourthPosition()
+ || rPoint5 != GetFifthPosition())
+ {
+ maBasePosition = rPoint1;
+ maSecondPosition = rPoint2;
+ maThirdPosition = rPoint3;
+ maFourthPosition = rPoint4;
+ maFifthPosition = rPoint5;
+
+ implResetGeometry();
+ objectChange();
+ }
+}
+
+void AnchorOverlayObject::setLineSolid( const bool bNew )
+{
+ if ( bNew != getLineSolid() )
+ {
+ mbLineSolid = bNew;
+ objectChange();
+ }
+}
+
+void AnchorOverlayObject::SetAnchorState( const AnchorState aState)
+{
+ if ( mAnchorState != aState)
+ {
+ mAnchorState = aState;
+ objectChange();
+ }
+}
+
+} } // end of namespace sw::annotation
+
diff --git a/sw/source/ui/docvw/AnchorOverlayObject.hxx b/sw/source/ui/docvw/AnchorOverlayObject.hxx
new file mode 100644
index 0000000000..cea567f229
--- /dev/null
+++ b/sw/source/ui/docvw/AnchorOverlayObject.hxx
@@ -0,0 +1,143 @@
+/*************************************************************************
+ *
+ * DO NOT 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 _ANCHOROVERLAYOBJECT_HXX
+#define _ANCHOROVERLAYOBJECT_HXX
+
+#include <svx/sdr/overlay/overlayobject.hxx>
+
+#include <basegfx/polygon/b2dpolygon.hxx>
+
+class SwView;
+class SwRect;
+class Point;
+
+namespace sw { namespace sidebarwindows {
+
+enum AnchorState
+{
+ AS_ALL,
+ AS_START,
+ AS_END,
+ AS_TRI
+};
+
+class AnchorOverlayObject: public sdr::overlay::OverlayObjectWithBasePosition
+{
+ public:
+ static AnchorOverlayObject* CreateAnchorOverlayObject( SwView& rDocView,
+ const SwRect& aAnchorRect,
+ const long& aPageBorder,
+ const Point& aLineStart,
+ const Point& aLineEnd,
+ const Color& aColorAnchor );
+ static void DestroyAnchorOverlayObject( AnchorOverlayObject* pAnchor );
+
+ inline const basegfx::B2DPoint& GetSecondPosition() const { return maSecondPosition; }
+ const basegfx::B2DPoint& GetThirdPosition() const { return maThirdPosition; }
+ const basegfx::B2DPoint& GetFourthPosition() const { return maFourthPosition; }
+ const basegfx::B2DPoint& GetFifthPosition() const { return maFifthPosition; }
+ const basegfx::B2DPoint& GetSixthPosition() const { return maSixthPosition; }
+ const basegfx::B2DPoint& GetSeventhPosition() const { return maSeventhPosition; }
+
+ void SetAllPosition( const basegfx::B2DPoint& rPoint1,
+ const basegfx::B2DPoint& rPoint2,
+ const basegfx::B2DPoint& rPoint3,
+ const basegfx::B2DPoint& rPoint4,
+ const basegfx::B2DPoint& rPoint5,
+ const basegfx::B2DPoint& rPoint6,
+ const basegfx::B2DPoint& rPoint7 );
+ void SetTriPosition( const basegfx::B2DPoint& rPoint1,
+ const basegfx::B2DPoint& rPoint2,
+ const basegfx::B2DPoint& rPoint3,
+ const basegfx::B2DPoint& rPoint4,
+ const basegfx::B2DPoint& rPoint5 );
+ void SetSixthPosition( const basegfx::B2DPoint& rNew );
+ void SetSeventhPosition( const basegfx::B2DPoint& rNew );
+
+ void setLineSolid( const bool bNew );
+ inline bool getLineSolid() const { return mbLineSolid; }
+
+ inline void SetHeight( const unsigned long aHeight ) { mHeight = aHeight; };
+
+ bool getShadowedEffect() const { return mbShadowedEffect; }
+
+ void SetAnchorState( const AnchorState aState );
+ inline AnchorState GetAnchorState() const { return mAnchorState; }
+
+ protected:
+ /* 6------------7
+ 1 /
+ /4\ ---------------5
+ 2 - 3
+ */
+
+ basegfx::B2DPoint maSecondPosition;
+ basegfx::B2DPoint maThirdPosition;
+ basegfx::B2DPoint maFourthPosition;
+ basegfx::B2DPoint maFifthPosition;
+ basegfx::B2DPoint maSixthPosition;
+ basegfx::B2DPoint maSeventhPosition;
+
+ // helpers to fill and reset geometry
+ void implEnsureGeometry();
+ void implResetGeometry();
+
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
+
+ private:
+ // object's geometry
+ basegfx::B2DPolygon maTriangle;
+ basegfx::B2DPolygon maLine;
+ basegfx::B2DPolygon maLineTop;
+ unsigned long mHeight;
+ AnchorState mAnchorState;
+
+ bool mbShadowedEffect : 1;
+ bool mbLineSolid : 1;
+
+ AnchorOverlayObject( const basegfx::B2DPoint& rBasePos,
+ const basegfx::B2DPoint& rSecondPos,
+ const basegfx::B2DPoint& rThirdPos,
+ const basegfx::B2DPoint& rFourthPos,
+ const basegfx::B2DPoint& rFifthPos,
+ const basegfx::B2DPoint& rSixthPos,
+ const basegfx::B2DPoint& rSeventhPos,
+ const Color aBaseColor,
+ const bool bShadowedEffect,
+ const bool bLineSolid );
+ virtual ~AnchorOverlayObject();
+};
+
+} } // end of namespace sw::annotation
+
+#endif
diff --git a/sw/source/ui/docvw/AnnotationMenuButton.cxx b/sw/source/ui/docvw/AnnotationMenuButton.cxx
new file mode 100644
index 0000000000..6022a4646a
--- /dev/null
+++ b/sw/source/ui/docvw/AnnotationMenuButton.cxx
@@ -0,0 +1,222 @@
+/************************************************************************* *
+ *
+ * DO NOT 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 <AnnotationMenuButton.hxx>
+
+#include <annotation.hrc>
+#include <app.hrc>
+#include <access.hrc>
+
+#include <unotools/useroptions.hxx>
+
+#include <vcl/svapp.hxx>
+#include <vcl/menu.hxx>
+#include <vcl/decoview.hxx>
+#include <vcl/gradient.hxx>
+
+#include <cmdid.h>
+#include <SidebarWin.hxx>
+
+namespace sw { namespace annotation {
+
+Color ColorFromAlphaColor( const UINT8 aTransparency,
+ const Color &aFront,
+ const Color &aBack )
+{
+ return Color((UINT8)(aFront.GetRed() * aTransparency/(double)255 + aBack.GetRed() * (1-aTransparency/(double)255)),
+ (UINT8)(aFront.GetGreen() * aTransparency/(double)255 + aBack.GetGreen() * (1-aTransparency/(double)255)),
+ (UINT8)(aFront.GetBlue() * aTransparency/(double)255 + aBack.GetBlue() * (1-aTransparency/(double)255)));
+}
+
+AnnotationMenuButton::AnnotationMenuButton( sw::sidebarwindows::SwSidebarWin& rSidebarWin )
+ : MenuButton( &rSidebarWin )
+ , mrSidebarWin( rSidebarWin )
+{
+ AddEventListener( LINK( &mrSidebarWin, sw::sidebarwindows::SwSidebarWin, WindowEventListener ) );
+
+ SetAccessibleName( SW_RES( STR_ACCESS_ANNOTATION_BUTTON_NAME ) );
+ SetAccessibleDescription( SW_RES( STR_ACCESS_ANNOTATION_BUTTON_DESC ) );
+ SetQuickHelpText( GetAccessibleDescription() );
+}
+
+AnnotationMenuButton::~AnnotationMenuButton()
+{
+ RemoveEventListener( LINK( &mrSidebarWin, sw::sidebarwindows::SwSidebarWin, WindowEventListener ) );
+}
+
+void AnnotationMenuButton::Select()
+{
+ mrSidebarWin.ExecuteCommand( GetCurItemId() );
+}
+
+void AnnotationMenuButton::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ PopupMenu* pButtonPopup( GetPopupMenu() );
+ if ( mrSidebarWin.IsReadOnly() )
+ {
+ pButtonPopup->EnableItem( FN_REPLY, false );
+ pButtonPopup->EnableItem( FN_DELETE_NOTE, false );
+ pButtonPopup->EnableItem( FN_DELETE_NOTE_AUTHOR, false );
+ pButtonPopup->EnableItem( FN_DELETE_ALL_NOTES, false );
+ }
+ else
+ {
+ if ( mrSidebarWin.IsProtected() )
+ {
+ pButtonPopup->EnableItem( FN_DELETE_NOTE, false );
+ }
+ else
+ {
+ pButtonPopup->EnableItem( FN_DELETE_NOTE, true );
+ }
+ pButtonPopup->EnableItem( FN_DELETE_NOTE_AUTHOR, true );
+ pButtonPopup->EnableItem( FN_DELETE_ALL_NOTES, true );
+ }
+
+ if ( mrSidebarWin.IsProtected() )
+ {
+ pButtonPopup->EnableItem( FN_REPLY, false );
+ }
+ else
+ {
+ SvtUserOptions aUserOpt;
+ String sAuthor;
+ if ( !(sAuthor = aUserOpt.GetFullName()).Len() )
+ {
+ if ( !(sAuthor = aUserOpt.GetID()).Len() )
+ {
+ sAuthor = String( SW_RES( STR_REDLINE_UNKNOWN_AUTHOR ));
+ }
+ }
+ // do not allow to reply to ourself and no answer possible if this note is in a protected section
+ if ( sAuthor == mrSidebarWin.GetAuthor() )
+ {
+ pButtonPopup->EnableItem( FN_REPLY, false );
+ }
+ else
+ {
+ pButtonPopup->EnableItem( FN_REPLY, true );
+ }
+ }
+
+ MenuButton::MouseButtonDown( rMEvt );
+}
+
+void AnnotationMenuButton::Paint( const Rectangle& /*rRect*/ )
+{
+ if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
+ SetFillColor(COL_BLACK);
+ else
+ SetFillColor( mrSidebarWin.ColorDark() );
+ SetLineColor();
+ const Rectangle aRect( Rectangle( Point( 0, 0 ), PixelToLogic( GetSizePixel() ) ) );
+ DrawRect( aRect );
+
+ if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode())
+ {
+ //draw rect around button
+ SetFillColor(COL_BLACK);
+ SetLineColor(COL_WHITE);
+ }
+ else
+ {
+ //draw button
+ Gradient aGradient;
+ if ( IsMouseOver() )
+ aGradient = Gradient( GRADIENT_LINEAR,
+ ColorFromAlphaColor( 80, mrSidebarWin.ColorAnchor(), mrSidebarWin.ColorDark() ),
+ ColorFromAlphaColor( 15, mrSidebarWin.ColorAnchor(), mrSidebarWin.ColorDark() ));
+ else
+ aGradient = Gradient( GRADIENT_LINEAR,
+ ColorFromAlphaColor( 15, mrSidebarWin.ColorAnchor(), mrSidebarWin.ColorDark() ),
+ ColorFromAlphaColor( 80, mrSidebarWin.ColorAnchor(), mrSidebarWin.ColorDark() ));
+ DrawGradient( aRect, aGradient );
+
+ //draw rect around button
+ SetFillColor();
+ SetLineColor( ColorFromAlphaColor( 90, mrSidebarWin.ColorAnchor(), mrSidebarWin.ColorDark() ));
+ }
+ DrawRect( aRect );
+
+ if ( mrSidebarWin.IsPreview() )
+ {
+ Font aOldFont( mrSidebarWin.GetFont() );
+ Font aFont(aOldFont);
+ Color aCol( COL_BLACK);
+ aFont.SetColor( aCol );
+ aFont.SetHeight(200);
+ aFont.SetWeight(WEIGHT_MEDIUM);
+ SetFont( aFont );
+ DrawText( aRect ,
+ rtl::OUString::createFromAscii("Edit Note"),
+ TEXT_DRAW_CENTER );
+ SetFont( aOldFont );
+ }
+ else
+ {
+ Rectangle aSymbolRect( aRect );
+ // 25% distance to the left and right button border
+ const long nBorderDistanceLeftAndRight = ((aSymbolRect.GetWidth()*250)+500)/1000;
+ aSymbolRect.Left()+=nBorderDistanceLeftAndRight;
+ aSymbolRect.Right()-=nBorderDistanceLeftAndRight;
+ // 40% distance to the top button border
+ const long nBorderDistanceTop = ((aSymbolRect.GetHeight()*400)+500)/1000;
+ aSymbolRect.Top()+=nBorderDistanceTop;
+ // 15% distance to the bottom button border
+ const long nBorderDistanceBottom = ((aSymbolRect.GetHeight()*150)+500)/1000;
+ aSymbolRect.Bottom()-=nBorderDistanceBottom;
+ DecorationView aDecoView( this );
+ aDecoView.DrawSymbol( aSymbolRect, SYMBOL_SPIN_DOWN,
+ ( Application::GetSettings().GetStyleSettings().GetHighContrastMode()
+ ? Color( COL_WHITE )
+ : Color( COL_BLACK ) ) );
+ }
+}
+
+void AnnotationMenuButton::KeyInput( const KeyEvent& rKeyEvt )
+{
+ const KeyCode& rKeyCode = rKeyEvt.GetKeyCode();
+ const USHORT nKey = rKeyCode.GetCode();
+ if ( nKey == KEY_TAB )
+ {
+ mrSidebarWin.ActivatePostIt();
+ mrSidebarWin.GrabFocus();
+ }
+ else
+ {
+ MenuButton::KeyInput( rKeyEvt );
+ }
+}
+
+} } // end of namespace sw::annotation
+
diff --git a/sw/source/ui/docvw/AnnotationMenuButton.hxx b/sw/source/ui/docvw/AnnotationMenuButton.hxx
new file mode 100644
index 0000000000..c74719f1ca
--- /dev/null
+++ b/sw/source/ui/docvw/AnnotationMenuButton.hxx
@@ -0,0 +1,63 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ *
+ * $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 _ANNOTATIONMENUBUTTON_HXX
+#define _ANNOTATIONMENUBUTTON_HXX
+
+#include <vcl/menubtn.hxx>
+
+namespace sw { namespace sidebarwindows {
+ class SwSidebarWin;
+} }
+
+namespace sw { namespace annotation {
+
+class AnnotationMenuButton : public MenuButton
+{
+ public:
+ AnnotationMenuButton( sw::sidebarwindows::SwSidebarWin& rSidebarWin );
+ ~AnnotationMenuButton();
+
+ // overloaded <MenuButton> methods
+ virtual void Select();
+
+ // overloaded <Window> methods
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void Paint( const Rectangle& rRect );
+ virtual void KeyInput( const KeyEvent& rKeyEvt );
+
+ private:
+ sw::sidebarwindows::SwSidebarWin& mrSidebarWin;
+};
+
+} } // end of namespace sw::annotation
+
+#endif
diff --git a/sw/source/ui/docvw/AnnotationWin.cxx b/sw/source/ui/docvw/AnnotationWin.cxx
new file mode 100644
index 0000000000..91ea1e13b0
--- /dev/null
+++ b/sw/source/ui/docvw/AnnotationWin.cxx
@@ -0,0 +1,292 @@
+/************************************************************************* *
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ * $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 <AnnotationWin.hxx>
+
+#include <AnnotationMenuButton.hxx>
+#include <PostItMgr.hxx>
+
+#include <annotation.hrc>
+#include <popup.hrc>
+#include <cmdid.h>
+
+#include <vcl/menu.hxx>
+
+#include <svl/undo.hxx>
+#include <unotools/syslocale.hxx>
+#include <svl/languageoptions.hxx>
+
+#include <editeng/postitem.hxx>
+#include <editeng/fhgtitem.hxx>
+#include <editeng/langitem.hxx>
+
+#include <editeng/editview.hxx>
+#include <editeng/outliner.hxx>
+#include <editeng/editeng.hxx>
+#include <editeng/editobj.hxx>
+
+#include <docufld.hxx> // SwPostItField
+#include <txtfld.hxx>
+#include <ndtxt.hxx>
+#include <view.hxx>
+#include <wrtsh.hxx>
+#include <docsh.hxx>
+#include <doc.hxx>
+#include <SwUndoField.hxx>
+
+namespace sw { namespace annotation {
+
+SwAnnotationWin::SwAnnotationWin( SwEditWin& rEditWin,
+ WinBits nBits,
+ SwPostItMgr& aMgr,
+ SwPostItBits aBits,
+ SwSidebarItem& rSidebarItem,
+ SwFmtFld* aField )
+ : SwSidebarWin( rEditWin, nBits, aMgr, aBits, rSidebarItem )
+ , mpFmtFld(aField)
+ , mpFld( static_cast<SwPostItField*>(aField->GetFld()))
+ , mpButtonPopup(0)
+{
+}
+
+SwAnnotationWin::~SwAnnotationWin()
+{
+ delete mpButtonPopup;
+}
+
+void SwAnnotationWin::SetPostItText()
+{
+ // get text from SwPostItField and insert into our textview
+ Engine()->SetModifyHdl( Link() );
+ Engine()->EnableUndo( FALSE );
+ mpFld = static_cast<SwPostItField*>(mpFmtFld->GetFld());
+ if( mpFld->GetTextObject() )
+ Engine()->SetText( *mpFld->GetTextObject() );
+ else
+ {
+ Engine()->Clear();
+ GetOutlinerView()->SetAttribs(DefaultItem());
+ GetOutlinerView()->InsertText(mpFld->GetPar2(),false);
+ }
+
+ Engine()->ClearModifyFlag();
+ Engine()->GetUndoManager().Clear();
+ Engine()->EnableUndo( TRUE );
+ Engine()->SetModifyHdl( LINK( this, SwAnnotationWin, ModifyHdl ) );
+ Invalidate();
+}
+
+void SwAnnotationWin::UpdateData()
+{
+ if ( Engine()->IsModified() )
+ {
+ SwTxtFld* pTxtFld = mpFmtFld->GetTxtFld();
+ SwPosition aPosition( pTxtFld->GetTxtNode() );
+ aPosition.nContent = *pTxtFld->GetStart();
+ SwField* pOldField = mpFld->Copy();
+ mpFld->SetPar2(Engine()->GetEditEngine().GetText());
+ mpFld->SetTextObject(Engine()->CreateParaObject());
+ DocView().GetDocShell()->GetDoc()->AppendUndo(new SwUndoFieldFromDoc(aPosition, *pOldField, *mpFld, 0, true));
+ delete pOldField;
+ // so we get a new layout of notes (anchor position is still the same and we would otherwise not get one)
+ Mgr().SetLayout();
+ // #i98686# if we have several views, all notes should update their text
+ mpFmtFld->Broadcast(SwFmtFldHint( 0, SWFMTFLD_CHANGED));
+ DocView().GetDocShell()->SetModified();
+ }
+ Engine()->ClearModifyFlag();
+ Engine()->GetUndoManager().Clear();
+}
+
+void SwAnnotationWin::Delete()
+{
+ SwSidebarWin::Delete();
+ // we delete the field directly, the Mgr cleans up the PostIt by listening
+ DocView().GetWrtShellPtr()->GotoField(*mpFmtFld);
+ GrabFocusToDocument();
+ DocView().GetWrtShellPtr()->DelRight();
+}
+
+void SwAnnotationWin::GotoPos()
+{
+ DocView().GetDocShell()->GetWrtShell()->GotoField(*mpFmtFld);
+}
+
+sal_uInt32 SwAnnotationWin::MoveCaret()
+{
+ // if this is an answer, do not skip over all following ones, but insert directly behind the current one
+ // but when just leaving a note, skip all following ones as well to continue typing
+ return Mgr().IsAnswer()
+ ? 1
+ : 1 + CountFollowing();
+}
+
+//returns true, if there is another note right before this note
+bool SwAnnotationWin::CalcFollow()
+{
+ SwTxtFld* pTxtFld = mpFmtFld->GetTxtFld();
+ SwPosition aPosition( pTxtFld->GetTxtNode() );
+ aPosition.nContent = *pTxtFld->GetStart();
+ SwTxtAttr * const pTxtAttr = pTxtFld->GetTxtNode().GetTxtAttrForCharAt(
+ aPosition.nContent.GetIndex() - 1, RES_TXTATR_FIELD );
+ const SwField* pFld = pTxtAttr ? pTxtAttr->GetFld().GetFld() : 0;
+ return pFld && (pFld->Which()== RES_POSTITFLD);
+}
+
+// counts how many SwPostItField we have right after the current one
+sal_uInt32 SwAnnotationWin::CountFollowing()
+{
+ sal_uInt32 aCount = 1; // we start with 1, so we have to subtract one at the end again
+ SwTxtFld* pTxtFld = mpFmtFld->GetTxtFld();
+ SwPosition aPosition( pTxtFld->GetTxtNode() );
+ aPosition.nContent = *pTxtFld->GetStart();
+
+ SwTxtAttr * pTxtAttr = pTxtFld->GetTxtNode().GetTxtAttrForCharAt(
+ aPosition.nContent.GetIndex() + 1,
+ RES_TXTATR_FIELD );
+ SwField* pFld = pTxtAttr
+ ? const_cast<SwField*>(pTxtAttr->GetFld().GetFld())
+ : 0;
+ while ( pFld && ( pFld->Which()== RES_POSTITFLD ) )
+ {
+ aCount++;
+ pTxtAttr = pTxtFld->GetTxtNode().GetTxtAttrForCharAt(
+ aPosition.nContent.GetIndex() + aCount,
+ RES_TXTATR_FIELD );
+ pFld = pTxtAttr
+ ? const_cast<SwField*>(pTxtAttr->GetFld().GetFld())
+ : 0;
+ }
+ return aCount - 1;
+}
+
+MenuButton* SwAnnotationWin::CreateMenuButton()
+{
+ mpButtonPopup = new PopupMenu(SW_RES(MN_ANNOTATION_BUTTON));
+ XubString aText = mpButtonPopup->GetItemText( FN_DELETE_NOTE_AUTHOR );
+ SwRewriter aRewriter;
+ aRewriter.AddRule(UNDO_ARG1,GetAuthor());
+ aText = aRewriter.Apply(aText);
+ mpButtonPopup->SetItemText(FN_DELETE_NOTE_AUTHOR,aText);
+ MenuButton* pMenuButton = new AnnotationMenuButton( *this );
+ pMenuButton->SetPopupMenu( mpButtonPopup );
+ pMenuButton->Show();
+ return pMenuButton;
+}
+
+void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText)
+{
+ //collect our old meta data
+ SwSidebarWin* pWin = Mgr().GetNextPostIt(KEY_PAGEUP, this);
+ const LocaleDataWrapper& rLocalData = SvtSysLocale().GetLocaleData();
+ String aText = String(SW_RES(STR_REPLY));
+ SwRewriter aRewriter;
+ aRewriter.AddRule(UNDO_ARG1, pWin->GetAuthor());
+ aText = aRewriter.Apply(aText);
+ aText.Append(String(rtl::OUString::createFromAscii(" (") +
+ String(rLocalData.getDate( pWin->GetDate())) + rtl::OUString::createFromAscii(", ") +
+ String(rLocalData.getTime( pWin->GetTime(),false)) + rtl::OUString::createFromAscii("): \"")));
+ GetOutlinerView()->InsertText(aText,false);
+
+ // insert old, selected text or "..."
+ // TOOD: iterate over all paragraphs, not only first one to find out if it is empty
+ if (pText->GetTextObject().GetText(0) != String(rtl::OUString::createFromAscii("")))
+ GetOutlinerView()->GetEditView().InsertText(pText->GetTextObject());
+ else
+ GetOutlinerView()->InsertText(rtl::OUString::createFromAscii("..."),false);
+ GetOutlinerView()->InsertText(rtl::OUString::createFromAscii("\"\n"),false);
+
+ GetOutlinerView()->SetSelection(ESelection(0x0,0x0,0xFFFF,0xFFFF));
+ SfxItemSet aAnswerSet( DocView().GetDocShell()->GetPool() );
+ aAnswerSet.Put(SvxFontHeightItem(200,80,EE_CHAR_FONTHEIGHT));
+ aAnswerSet.Put(SvxPostureItem(ITALIC_NORMAL,EE_CHAR_ITALIC));
+ GetOutlinerView()->SetAttribs(aAnswerSet);
+ GetOutlinerView()->SetSelection(ESelection(0xFFFF,0xFFFF,0xFFFF,0xFFFF));
+
+ //remove all attributes and reset our standard ones
+ GetOutlinerView()->GetEditView().RemoveAttribsKeepLanguages(true);
+ GetOutlinerView()->SetAttribs(DefaultItem());
+ // lets insert an undo step so the initial text can be easily deleted
+ // but do not use UpdateData() directly, would set modified state again and reentrance into Mgr
+ Engine()->SetModifyHdl( Link() );
+ SwTxtFld* pTxtFld = mpFmtFld->GetTxtFld();
+ SwPosition aPosition( pTxtFld->GetTxtNode() );
+ aPosition.nContent = *pTxtFld->GetStart();
+ SwField* pOldField = mpFld->Copy();
+ mpFld->SetPar2(Engine()->GetEditEngine().GetText());
+ mpFld->SetTextObject(Engine()->CreateParaObject());
+ DocView().GetDocShell()->GetDoc()->AppendUndo(new SwUndoFieldFromDoc(aPosition, *pOldField, *mpFld, 0, true));
+ delete pOldField;
+ Engine()->SetModifyHdl( LINK( this, SwAnnotationWin, ModifyHdl ) );
+ Engine()->ClearModifyFlag();
+ Engine()->GetUndoManager().Clear();
+}
+
+SvxLanguageItem SwAnnotationWin::GetLanguage(void)
+{
+ // set initial language for outliner
+ USHORT nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( mpFld->GetLanguage() );
+ USHORT nLangWhichId = 0;
+ switch (nScriptType)
+ {
+ case SCRIPTTYPE_LATIN : nLangWhichId = EE_CHAR_LANGUAGE ; break;
+ case SCRIPTTYPE_ASIAN : nLangWhichId = EE_CHAR_LANGUAGE_CJK; break;
+ case SCRIPTTYPE_COMPLEX : nLangWhichId = EE_CHAR_LANGUAGE_CTL; break;
+ default: DBG_ERROR("GetLanguage: wrong script tye");
+ }
+ return SvxLanguageItem(mpFld->GetLanguage(),nLangWhichId);
+}
+
+bool SwAnnotationWin::IsProtected()
+{
+ return SwSidebarWin::IsProtected() ||
+ GetLayoutStatus() == SwPostItHelper::DELETED ||
+ ( mpFmtFld ? mpFmtFld->IsProtect() : false );
+}
+
+String SwAnnotationWin::GetAuthor()
+{
+ return mpFld->GetPar1();
+}
+
+Date SwAnnotationWin::GetDate()
+{
+ return mpFld->GetDate();
+}
+
+Time SwAnnotationWin::GetTime()
+{
+ return mpFld->GetTime();
+}
+
+} } // end of namespace sw::annotation
diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx
index 126d6fb81d..2744935009 100644
--- a/sw/source/ui/docvw/PostItMgr.cxx
+++ b/sw/source/ui/docvw/PostItMgr.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,9 +31,18 @@
#include "PostItMgr.hxx"
#include <postithelper.hxx>
+#include <SidebarWin.hxx>
+#include <AnnotationWin.hxx>
+#include <frmsidebarwincontainer.hxx>
+#include <accmap.hxx>
+
+#include <SidebarWindowsConsts.hxx>
+#include <AnchorOverlayObject.hxx>
+#include <ShadowOverlayObject.hxx>
+
#include <vcl/svapp.hxx>
#include <vcl/scrbar.hxx>
-#include <vcl/outdev.hxx>
+#include <vcl/outdev.hxx>
#include <viewopt.hxx>
@@ -45,7 +54,6 @@
#include <fmtfld.hxx>
#include <docufld.hxx>
#include <edtwin.hxx>
-#include <postit.hxx>
#include <txtfld.hxx>
#include <ndtxt.hxx>
#include <redline.hxx>
@@ -55,7 +63,7 @@
#include <tools/color.hxx>
#include <swmodule.hxx>
-#include <docvw.hrc>
+#include <annotation.hrc>
#include "cmdid.h"
#include <SwRewriter.hxx>
@@ -80,8 +88,8 @@
#include "swevent.hxx"
-// distance between ankor Y and initial note position
-#define POSTIT_INITIAL_ANKOR_DISTANCE 20
+// distance between Anchor Y and initial note position
+#define POSTIT_INITIAL_ANCHOR_DISTANCE 20
//distance between two postits
#define POSTIT_SPACE_BETWEEN 8
#define POSTIT_MINIMUMSIZE_WITH_META 60
@@ -90,6 +98,8 @@
// if we layout more often we stop, this should never happen
#define MAX_LOOP_COUNT 50
+using namespace sw::sidebarwindows;
+
/*
bool comp_author( const SwPostItItem* a, const SwPostItItem* b)
{
@@ -102,16 +112,22 @@ bool comp_date( const SwPostItItem* a, const SwPostItItem* b)
}
*/
-// if position is on the same line, sort by x (Left) position, otherwise by y(Bottom) position
-// if two notes are at the same position, sort by logical node position
-bool comp_pos(const SwMarginItem *a, const SwMarginItem *b)
+//
+bool comp_pos(const SwSidebarItem* a, const SwSidebarItem* b)
{
- return (a->mPos.Bottom() == b->mPos.Bottom()) ?
- ( ((a->mPos.Left() == b->mPos.Left()) && (a->GetBroadCaster()->ISA(SwFmtFld) && b->GetBroadCaster()->ISA(SwFmtFld)) ) ?
- *(static_cast<SwFmtFld*>(a->GetBroadCaster())->GetTxtFld()->GetStart()) <
- *(static_cast<SwFmtFld*>(b->GetBroadCaster())->GetTxtFld()->GetStart())
- : a->mPos.Left() < b->mPos.Left() )
- : a->mPos.Bottom() < b->mPos.Bottom();
+ // --> OD 2010-01-19 #i88070#
+ // sort by anchor position
+//// if position is on the same line, sort by x (Left) position, otherwise by y(Bottom) position
+//// if two notes are at the same position, sort by logical node position
+// return (a->maLayoutInfo.mPosition.Bottom() == b->maLayoutInfo.mPosition.Bottom())
+// ? ( ( (a->maLayoutInfo.mPosition.Left() == b->maLayoutInfo.mPosition.Left()) &&
+// (a->GetBroadCaster()->ISA(SwFmtFld) && b->GetBroadCaster()->ISA(SwFmtFld)) )
+// ? *(static_cast<SwFmtFld*>(a->GetBroadCaster())->GetTxtFld()->GetStart()) <
+// *(static_cast<SwFmtFld*>(b->GetBroadCaster())->GetTxtFld()->GetStart())
+// : a->maLayoutInfo.mPosition.Left() < b->maLayoutInfo.mPosition.Left() )
+// : a->maLayoutInfo.mPosition.Bottom() < b->maLayoutInfo.mPosition.Bottom();
+ return a->GetAnchorPosition() < b->GetAnchorPosition();
+ // <--
}
SwPostItMgr::SwPostItMgr(SwView* pView)
@@ -127,20 +143,22 @@ SwPostItMgr::SwPostItMgr(SwView* pView)
, mbReadOnly(mpView->GetDocShell()->IsReadOnly())
, mbDeleteNote(true)
, mpAnswer(0)
+ , mbIsShowAnchor( false )
+ , mpFrmSidebarWinContainer( 0 )
{
if(!mpView->GetDrawView() )
mpView->GetWrtShell().MakeDrawView();
-
+
SwNoteProps aProps;
- mpIsShowAnkor = aProps.IsShowAnkor();
+ mbIsShowAnchor = aProps.IsShowAnchor();
//make sure we get the colour yellow always, even if not the first one of comments or redlining
SW_MOD()->GetRedlineAuthor();
-
+
// collect all PostIts and redline comments that exist after loading the document
// don't check for existance for any of them, don't focus them
AddPostIts(false,false);
- /* this code can be used once we want redline comments in the margin
+ /* this code can be used once we want redline comments in the Sidebar
AddRedlineComments(false,false);
*/
// we want to receive stuff like SFX_HINT_DOCCHANGED
@@ -152,31 +170,34 @@ SwPostItMgr::SwPostItMgr(SwView* pView)
}
}
-SwPostItMgr::~SwPostItMgr()
+SwPostItMgr::~SwPostItMgr()
{
if ( mnEventId )
Application::RemoveUserEvent( mnEventId );
- // forget about all our margin windows
- RemoveMarginWin();
+ // forget about all our Sidebar windows
+ RemoveSidebarWin();
EndListening( *mpView->GetDocShell() );
for(std::vector<SwPostItPageItem*>::iterator i = mPages.begin(); i!= mPages.end() ; i++)
delete (*i);
mPages.clear();
+
+ delete mpFrmSidebarWinContainer;
+ mpFrmSidebarWinContainer = 0;
}
void SwPostItMgr::CheckForRemovedPostIts()
{
bool bRemoved = false;
- for(std::list<SwMarginItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end(); )
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end(); )
{
- std::list<SwMarginItem*>::iterator it = i++;
+ std::list<SwSidebarItem*>::iterator it = i++;
if ( !(*it)->UseElement() )
{
- SwMarginItem* p = (*it);
+ SwSidebarItem* p = (*it);
mvPostItFlds.remove(*it);
- if (GetActivePostIt() == p->pPostIt)
- SetActivePostIt(0);
+ if (GetActiveSidebarWin() == p->pPostIt)
+ SetActiveSidebarWin(0);
if (p->pPostIt)
delete p->pPostIt;
delete p;
@@ -204,7 +225,7 @@ void SwPostItMgr::InsertItem(SfxBroadcaster* pItem, bool bCheckExistance, bool b
{
if (bCheckExistance)
{
- for(std::list<SwMarginItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
{
if ( (*i)->GetBroadCaster() == pItem )
return;
@@ -212,7 +233,7 @@ void SwPostItMgr::InsertItem(SfxBroadcaster* pItem, bool bCheckExistance, bool b
}
mbLayout = bFocus;
if (pItem->ISA(SwFmtFld))
- mvPostItFlds.push_back(new SwPostItItem(static_cast<SwFmtFld*>(pItem), true, bFocus) );
+ mvPostItFlds.push_back(new SwAnnotationItem(static_cast<SwFmtFld*>(pItem), true, bFocus) );
/*
else
if (pItem->ISA(SwRedline))
@@ -224,14 +245,14 @@ void SwPostItMgr::InsertItem(SfxBroadcaster* pItem, bool bCheckExistance, bool b
void SwPostItMgr::RemoveItem( SfxBroadcaster* pBroadcast )
{
- EndListening(*pBroadcast);
- for(std::list<SwMarginItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ EndListening(*pBroadcast);
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
{
if ( (*i)->GetBroadCaster() == pBroadcast )
{
- SwMarginItem* p = (*i);
- if (GetActivePostIt() == p->pPostIt)
- SetActivePostIt(0);
+ SwSidebarItem* p = (*i);
+ if (GetActiveSidebarWin() == p->pPostIt)
+ SetActiveSidebarWin(0);
mvPostItFlds.remove(*i);
delete p->pPostIt;
delete p;
@@ -297,7 +318,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
DBG_ERROR("Notification for removed SwFmtFld was not sent!");
RemoveItem(&rBC);
}
- break;
+ break;
}
}
}
@@ -322,7 +343,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
break;
}
case SWREDLINE_FOCUS:
- {
+ {
if (rRedlineHint.GetView()== mpView)
Focus(rBC);
break;
@@ -333,7 +354,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
else if ( rHint.IsA(TYPE(SwFmtFldHint) ) )
{
const SwFmtFldHint& rFmtHint = static_cast<const SwFmtFldHint&>(rHint);
- SwFmtFld* pFld = const_cast <SwFmtFld*>( rFmtHint.GetField() );
+ SwFmtFld* pFld = const_cast <SwFmtFld*>( rFmtHint.GetField() );
switch ( rFmtHint.Which() )
{
case SWFMTFLD_INSERTED :
@@ -351,7 +372,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if (bEmpty && !mvPostItFlds.empty())
PrepareView(true);
}
- else
+ else
{
DBG_ERROR( "Inserted field not in document!" );
}
@@ -371,7 +392,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
break;
}
case SWFMTFLD_FOCUS:
- {
+ {
if (rFmtHint.GetView()== mpView)
Focus(rBC);
break;
@@ -379,7 +400,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
case SWFMTFLD_CHANGED:
{
SwFmtFld* pFmtFld = dynamic_cast<SwFmtFld*>(&rBC);
- for(std::list<SwMarginItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
{
if ( pFmtFld == (*i)->GetBroadCaster() )
{
@@ -396,7 +417,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
case SWFMTFLD_LANGUAGE:
{
SwFmtFld* pFmtFld = dynamic_cast<SwFmtFld*>(&rBC);
- for(std::list<SwMarginItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
{
if ( pFmtFld == (*i)->GetBroadCaster() )
{
@@ -410,7 +431,8 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
case SCRIPTTYPE_ASIAN : nLangWhichId = EE_CHAR_LANGUAGE_CJK; break;
case SCRIPTTYPE_COMPLEX : nLangWhichId = EE_CHAR_LANGUAGE_CTL; break;
}
- (*i)->pPostIt->SetLanguage(SvxLanguageItem((*i)->GetFmtFld()->GetFld()->GetLanguage(),nLangWhichId));
+ (*i)->pPostIt->SetLanguage( SvxLanguageItem((*i)->GetFmtFld()->GetFld()->GetLanguage(),
+ nLangWhichId) );
}
break;
}
@@ -428,8 +450,8 @@ void SwPostItMgr::Focus(SfxBroadcaster& rBC)
SfxRequest aRequest(mpView->GetViewFrame(),FN_VIEW_NOTES);
mpView->ExecViewOptions(aRequest);
}
-
- for(std::list<SwMarginItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
{
// field to get the focus is the broadcaster
if ( &rBC == (*i)->GetBroadCaster() )
@@ -444,7 +466,7 @@ void SwPostItMgr::Focus(SfxBroadcaster& rBC)
// when the layout algorithm starts, this postit is created and receives focus
(*i)->bFocus = true;
}
- }
+ }
}
}
@@ -463,9 +485,9 @@ bool SwPostItMgr::CalcRects()
PreparePageContainer();
if ( !mvPostItFlds.empty() )
{
- for(std::list<SwMarginItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
{
- SwMarginItem* pItem = (*i);
+ SwSidebarItem* pItem = (*i);
if ( !pItem->UseElement() )
{
DBG_ERROR("PostIt is not in doc or other wrong use");
@@ -474,32 +496,30 @@ bool SwPostItMgr::CalcRects()
}
//save old rect and visible state
- SwRect aOldRect(pItem->mPos);
+ SwRect aOldRect(pItem->maLayoutInfo.mPosition);
SwPostItHelper::SwLayoutStatus eOldStatus = pItem->mLayoutStatus;
std::vector< SwLayoutInfo > aInfo;
- SwPosition aPosition = pItem->GetPosition();
- pItem->mLayoutStatus = SwPostItHelper::getLayoutInfos( aInfo, aPosition );
+ {
+ SwPosition aPosition = pItem->GetAnchorPosition();
+ pItem->mLayoutStatus = SwPostItHelper::getLayoutInfos( aInfo, aPosition );
+ }
if( aInfo.size() )
{
- SwLayoutInfo& rInfo = aInfo[0];
- pItem->mPos = rInfo.mPosition;
- pItem->mPagePos = rInfo.mPageFrame;
- pItem->mFramePos = rInfo.mPagePrtArea;
- pItem->bMarginSide = rInfo.mbMarginSide;
- pItem->mnPageNumber = rInfo.mnPageNumber;
- pItem->mRedlineAuthor = rInfo.mRedlineAuthor;
+ pItem->maLayoutInfo = aInfo[0];
}
- bChange = bChange || (pItem->mPos != aOldRect) || (eOldStatus != pItem->mLayoutStatus);
+ bChange = bChange ||
+ ( pItem->maLayoutInfo.mPosition != aOldRect ) ||
+ ( eOldStatus != pItem->mLayoutStatus );
}
// show notes in right order in navigator
- //prevent ankors during layout to overlap, e.g. when moving a frame
+ //prevent Anchors during layout to overlap, e.g. when moving a frame
Sort(SORT_POS);
// sort the items into the right page vector, so layout can be done by page
- for(std::list<SwMarginItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
{
- SwMarginItem* pItem = (*i);
+ SwSidebarItem* pItem = (*i);
if( SwPostItHelper::INVISIBLE == pItem->mLayoutStatus )
{
if (pItem->pPostIt)
@@ -517,7 +537,7 @@ bool SwPostItMgr::CalcRects()
}
}
- const unsigned long aPageNum = pItem->mnPageNumber;
+ const unsigned long aPageNum = pItem->maLayoutInfo.mnPageNumber;
if (aPageNum > mPages.size())
{
const unsigned long nNumberOfPages = mPages.size();
@@ -525,8 +545,8 @@ bool SwPostItMgr::CalcRects()
mPages.push_back( new SwPostItPageItem());
}
mPages[aPageNum-1]->mList->push_back(pItem);
- mPages[aPageNum-1]->mPageRect = pItem->mPagePos;
- mPages[aPageNum-1]->bMarginSide = pItem->bMarginSide;
+ mPages[aPageNum-1]->mPageRect = pItem->maLayoutInfo.mPageFrame;
+ mPages[aPageNum-1]->eSidebarPosition = pItem->maLayoutInfo.meSidebarPosition;
}
if (!bChange && mpWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE))
@@ -555,9 +575,9 @@ bool SwPostItMgr::CalcRects()
bool SwPostItMgr::HasScrollbars() const
{
- for(std::list<SwMarginItem*>::const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(std::list<SwSidebarItem*>::const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
{
- if ((*i)->bShow && (*i)->pPostIt && (*i)->pPostIt->Scrollbar())
+ if ((*i)->bShow && (*i)->pPostIt && (*i)->pPostIt->HasScrollbar())
return true;
}
return false;
@@ -598,7 +618,7 @@ void SwPostItMgr::LayoutPostIts()
if ( !mvPostItFlds.empty() && !mbWaitingForCalcRects )
{
mbLayouting = true;
-
+
//loop over all pages and do the layout
// - create SwPostIt if neccessary
// - place SwPostIts on their initial position
@@ -609,63 +629,80 @@ void SwPostItMgr::LayoutPostIts()
// only layout if there are notes on this page
if (mPages[n]->mList->size()>0)
{
- std::list<SwMarginWin*> aVisiblePostItList;
+ std::list<SwSidebarWin*> aVisiblePostItList;
unsigned long lNeededHeight = 0;
long mlPageBorder = 0;
long mlPageEnd = 0;
- for(SwMarginItem_iterator i = mPages[n]->mList->begin(); i!= mPages[n]->mList->end(); i++)
+ for(SwSidebarItem_iterator i = mPages[n]->mList->begin(); i!= mPages[n]->mList->end(); i++)
{
- SwMarginItem* pItem = (*i);
- SwMarginWin* pPostIt = pItem->pPostIt;
+ SwSidebarItem* pItem = (*i);
+ SwSidebarWin* pPostIt = pItem->pPostIt;
- if (mPages[n]->bMarginSide)
+ if (mPages[n]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT )
{
// x value for notes positioning
mlPageBorder = mpEditWin->LogicToPixel( Point( mPages[n]->mPageRect.Left(), 0)).X() - GetSidebarWidth(true);// - GetSidebarBorderWidth(true);
//bending point
- mlPageEnd = mpWrtShell->getIDocumentSettingAccess()->get( IDocumentSettingAccess::BROWSE_MODE) ? pItem->mFramePos.Left() : mPages[n]->mPageRect.Left() + 350;
+ mlPageEnd =
+ mpWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE)
+ ? pItem->maLayoutInfo.mPagePrtArea.Left()
+ : mPages[n]->mPageRect.Left() + 350;
}
- else
+ else if (mPages[n]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_RIGHT )
{
// x value for notes positioning
mlPageBorder = mpEditWin->LogicToPixel( Point(mPages[n]->mPageRect.Right(), 0)).X() + GetSidebarBorderWidth(true);
//bending point
- mlPageEnd = mpWrtShell->getIDocumentSettingAccess()->get( IDocumentSettingAccess::BROWSE_MODE) ? pItem->mFramePos.Right() : mPages[n]->mPageRect.Right() - 350;
+ mlPageEnd =
+ mpWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE)
+ ? pItem->maLayoutInfo.mPagePrtArea.Right() :
+ mPages[n]->mPageRect.Right() - 350;
}
if (pItem->bShow)
{
- long Y = mpEditWin->LogicToPixel( Point(0,pItem->mPos.Bottom())).Y();
+ long Y = mpEditWin->LogicToPixel( Point(0,pItem->maLayoutInfo.mPosition.Bottom())).Y();
long aPostItHeight = 0;
if (!pPostIt)
{
- pPostIt = (*i)->GetMarginWindow(static_cast<Window*>(&mpView->GetEditWin()),WINDOW_CONTROL|WB_NODIALOGCONTROL,this,0);
+ pPostIt = (*i)->GetSidebarWindow( mpView->GetEditWin(),
+ WB_DIALOGCONTROL,
+ *this,
+ 0 );
pPostIt->InitControls();
pPostIt->SetReadonly(mbReadOnly);
pItem->pPostIt = pPostIt;
if (mpAnswer)
{
if (pPostIt->CalcFollow()) //do we really have another note in front of this one
- static_cast<SwPostIt*>(pPostIt)->InitAnswer(mpAnswer);
+ static_cast<sw::annotation::SwAnnotationWin*>(pPostIt)->InitAnswer(mpAnswer);
delete mpAnswer;
mpAnswer = 0;
}
}
- if (pItem->pPostIt->ISA(SwPostIt))
- {
- static_cast<SwPostIt*>(pPostIt)->SetChangeTracking(pItem->mLayoutStatus,GetColorAnkor(pItem->mRedlineAuthor));
- }
- pPostIt->SetMarginSide(mPages[n]->bMarginSide);
+ pPostIt->SetChangeTracking(
+ pItem->mLayoutStatus,
+ GetColorAnchor(pItem->maLayoutInfo.mRedlineAuthor));
+ pPostIt->SetSidebarPosition(mPages[n]->eSidebarPosition);
pPostIt->SetFollow(pPostIt->CalcFollow());
- aPostItHeight = ( pPostIt->GetPostItTextHeight() < pPostIt->GetMinimumSizeWithoutMeta() ? pPostIt->GetMinimumSizeWithoutMeta() : pPostIt->GetPostItTextHeight() ) + pPostIt->GetMetaHeight();
- pPostIt->SetPosSizePixelRect( mlPageBorder ,Y-GetInitialAnchorDistance(), GetNoteWidth() ,aPostItHeight,pItem->mPos, mlPageEnd);
+ aPostItHeight = ( pPostIt->GetPostItTextHeight() < pPostIt->GetMinimumSizeWithoutMeta()
+ ? pPostIt->GetMinimumSizeWithoutMeta()
+ : pPostIt->GetPostItTextHeight() )
+ + pPostIt->GetMetaHeight();
+ pPostIt->SetPosSizePixelRect( mlPageBorder ,
+ Y - GetInitialAnchorDistance(),
+ GetNoteWidth() ,
+ aPostItHeight,
+ pItem->maLayoutInfo.mPosition,
+ mlPageEnd );
+ pPostIt->ChangeSidebarItem( *pItem );
if (pItem->bFocus)
{
mbLayout = true;
- pPostIt->GrabFocus();
+ pPostIt->GrabFocus();
pItem->bFocus = false;
}
// only the visible postits are used for the final layout
@@ -705,7 +742,7 @@ void SwPostItMgr::LayoutPostIts()
- enlarge all notes till GetNextBorder(), as we resized to average value before
*/
//lets hide the ones which overlap the page
- for(SwMarginWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++)
+ for(SwSidebarWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++)
{
if (mPages[n]->lOffset != 0)
(*i)->TranslateTopPosition(mPages[n]->lOffset);
@@ -720,24 +757,28 @@ void SwPostItMgr::LayoutPostIts()
{
if (mpEditWin->PixelToLogic(Point(0,(*i)->VirtualPos().Y())).Y() < (mPages[n]->mPageRect.Top()+aSidebarheight))
{
- if (mPages[n]->bMarginSide)
- (*i)->ShowAnkorOnly(Point(mPages[n]->mPageRect.Left(),mPages[n]->mPageRect.Top()));
- else
- (*i)->ShowAnkorOnly(Point(mPages[n]->mPageRect.Right(),mPages[n]->mPageRect.Top()));
+ if ( mPages[n]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT )
+ (*i)->ShowAnchorOnly(Point( mPages[n]->mPageRect.Left(),
+ mPages[n]->mPageRect.Top()));
+ else if ( mPages[n]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_RIGHT )
+ (*i)->ShowAnchorOnly(Point( mPages[n]->mPageRect.Right(),
+ mPages[n]->mPageRect.Top()));
}
else
{
- if (mPages[n]->bMarginSide)
- (*i)->ShowAnkorOnly(Point(mPages[n]->mPageRect.Left(),mPages[n]->mPageRect.Bottom()));
- else
- (*i)->ShowAnkorOnly(Point(mPages[n]->mPageRect.Right(),mPages[n]->mPageRect.Bottom()));
+ if ( mPages[n]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT )
+ (*i)->ShowAnchorOnly(Point(mPages[n]->mPageRect.Left(),
+ mPages[n]->mPageRect.Bottom()));
+ else if ( mPages[n]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_RIGHT )
+ (*i)->ShowAnchorOnly(Point(mPages[n]->mPageRect.Right(),
+ mPages[n]->mPageRect.Bottom()));
}
DBG_ASSERT(mPages[n]->bScrollbar,"SwPostItMgr::LayoutByPage(): note overlaps, but bScrollbar is not true");
}
}
-
+
// do some magic so we really see the focused note
- for(SwMarginWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++)
+ for(SwSidebarWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++)
{
if ((*i)->HasChildPathFocus())
{
@@ -748,7 +789,7 @@ void SwPostItMgr::LayoutPostIts()
}
else
{
- for(SwMarginWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++)
+ for(SwSidebarWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++)
(*i)->SetPosAndSize();
bool bOldScrollbar = mPages[n]->bScrollbar;
@@ -763,35 +804,35 @@ void SwPostItMgr::LayoutPostIts()
mPages[n]->bScrollbar = false;
}
}
-
+
if (!ShowNotes())
{ // we do not want to see the notes anymore -> Options-Writer-View-Notes
bool bRepair = false;
- for(SwMarginItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(SwSidebarItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
{
- SwMarginItem* pItem = (*i);
+ SwSidebarItem* pItem = (*i);
if ( !pItem->UseElement() )
{
DBG_ERROR("PostIt is not in doc!");
bRepair = true;
continue;
}
-
+
if ((*i)->pPostIt)
{
(*i)->pPostIt->HideNote();
if ((*i)->pPostIt->HasChildPathFocus())
{
- SetActivePostIt(0);
+ SetActiveSidebarWin(0);
(*i)->pPostIt->GrabFocusToDocument();
}
}
}
-
+
if ( bRepair )
CheckForRemovedPostIts();
}
-
+
// notes scrollbar is otherwise not drawn correctly for some cases
// scrollbar area is enough
@@ -809,7 +850,7 @@ bool SwPostItMgr::BorderOverPageBorder(unsigned long aPage) const
return false;
}
- SwMarginItem_iterator aItem = mPages[aPage-1]->mList->end();
+ SwSidebarItem_iterator aItem = mPages[aPage-1]->mList->end();
--aItem;
DBG_ASSERT ((*aItem)->pPostIt,"BorderOverPageBorder: NULL postIt, should never happen");
if ((*aItem)->pPostIt)
@@ -832,9 +873,9 @@ void SwPostItMgr::Scroll(const long lScroll,const unsigned long aPage)
const bool bOldUp = ArrowEnabled(KEY_PAGEUP,aPage);
const bool bOldDown = ArrowEnabled(KEY_PAGEDOWN,aPage);
const long aSidebarheight = mpEditWin->PixelToLogic(Size(0,GetSidebarScrollerHeight())).Height();
- for(SwMarginItem_iterator i = mPages[aPage-1]->mList->begin(); i!= mPages[aPage-1]->mList->end(); i++)
+ for(SwSidebarItem_iterator i = mPages[aPage-1]->mList->begin(); i!= mPages[aPage-1]->mList->end(); i++)
{
- SwMarginWin* pPostIt = (*i)->pPostIt;
+ SwSidebarWin* pPostIt = (*i)->pPostIt;
// if this is an answer, we should take the normal position and not the real, slightly moved position
pPostIt->SetVirtualPosSize(pPostIt->GetPosPixel(),pPostIt->GetSizePixel());
pPostIt->TranslateTopPosition(lScroll);
@@ -851,17 +892,17 @@ void SwPostItMgr::Scroll(const long lScroll,const unsigned long aPage)
{
if ( mpEditWin->PixelToLogic(Point(0,pPostIt->VirtualPos().Y())).Y() < (mPages[aPage-1]->mPageRect.Top()+aSidebarheight))
{
- if (mPages[aPage-1]->bMarginSide)
- pPostIt->ShowAnkorOnly(Point(mPages[aPage-1]->mPageRect.Left(),mPages[aPage-1]->mPageRect.Top()));
- else
- pPostIt->ShowAnkorOnly(Point(mPages[aPage-1]->mPageRect.Right(),mPages[aPage-1]->mPageRect.Top()));
+ if (mPages[aPage-1]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT)
+ pPostIt->ShowAnchorOnly(Point(mPages[aPage-1]->mPageRect.Left(),mPages[aPage-1]->mPageRect.Top()));
+ else if (mPages[aPage-1]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_RIGHT)
+ pPostIt->ShowAnchorOnly(Point(mPages[aPage-1]->mPageRect.Right(),mPages[aPage-1]->mPageRect.Top()));
}
else
{
- if (mPages[aPage-1]->bMarginSide)
- pPostIt->ShowAnkorOnly(Point(mPages[aPage-1]->mPageRect.Left(),mPages[aPage-1]->mPageRect.Bottom()));
- else
- pPostIt->ShowAnkorOnly(Point(mPages[aPage-1]->mPageRect.Right(),mPages[aPage-1]->mPageRect.Bottom()));
+ if (mPages[aPage-1]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT)
+ pPostIt->ShowAnchorOnly(Point(mPages[aPage-1]->mPageRect.Left(),mPages[aPage-1]->mPageRect.Bottom()));
+ else if (mPages[aPage-1]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_RIGHT)
+ pPostIt->ShowAnchorOnly(Point(mPages[aPage-1]->mPageRect.Right(),mPages[aPage-1]->mPageRect.Bottom()));
}
}
}
@@ -874,7 +915,7 @@ void SwPostItMgr::Scroll(const long lScroll,const unsigned long aPage)
}
}
-void SwPostItMgr::AutoScroll(const SwMarginWin* pPostIt,const unsigned long aPage )
+void SwPostItMgr::AutoScroll(const SwSidebarWin* pPostIt,const unsigned long aPage )
{
// otherwise all notes are visible
if (mPages[aPage-1]->bScrollbar)
@@ -894,7 +935,7 @@ void SwPostItMgr::AutoScroll(const SwMarginWin* pPostIt,const unsigned long aPag
}
}
-void SwPostItMgr::MakeVisible(const SwMarginWin* pPostIt,long aPage )
+void SwPostItMgr::MakeVisible(const SwSidebarWin* pPostIt,long aPage )
{
if (aPage == -1)
{
@@ -903,7 +944,7 @@ void SwPostItMgr::MakeVisible(const SwMarginWin* pPostIt,long aPage )
{
if (mPages[n]->mList->size()>0)
{
- for(SwMarginItem_iterator i = mPages[n]->mList->begin(); i!= mPages[n]->mList->end(); i++)
+ for(SwSidebarItem_iterator i = mPages[n]->mList->begin(); i!= mPages[n]->mList->end(); i++)
{
if ((*i)->pPostIt==pPostIt)
{
@@ -952,7 +993,7 @@ Color SwPostItMgr::GetArrowColor(USHORT aDirection,unsigned long aPage) const
}
}
-bool SwPostItMgr::LayoutByPage(std::list<SwMarginWin*> &aVisiblePostItList,const Rectangle aBorder, long lNeededHeight)
+bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList,const Rectangle aBorder, long lNeededHeight)
{
/*** General layout idea:***/
// - if we have space left, we always move the current one up,
@@ -982,12 +1023,12 @@ bool SwPostItMgr::LayoutByPage(std::list<SwMarginWin*> &aVisiblePostItList,const
bScrollbars = true;
lTopBorder += GetSidebarScrollerHeight() + 10;
lBottomBorder -= (GetSidebarScrollerHeight() + 10);
- for(SwMarginWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++)
+ for(SwSidebarWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++)
(*i)->SetSize(Size((*i)->VirtualSize().getWidth(),(*i)->GetMinimumSizeWithMeta()));
}
else
{
- for(SwMarginWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++)
+ for(SwSidebarWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++)
{
if ( (*i)->VirtualSize().getHeight() > lAverageHeight)
(*i)->SetSize(Size((*i)->VirtualSize().getWidth(),lAverageHeight));
@@ -1004,9 +1045,9 @@ bool SwPostItMgr::LayoutByPage(std::list<SwMarginWin*> &aVisiblePostItList,const
loop++;
bDone = true;
lSpaceUsed = lTopBorder + GetSpaceBetween();
- for(SwMarginWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++)
+ for(SwSidebarWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++)
{
- SwMarginWin_iterator aNextPostIt = i;
+ SwSidebarWin_iterator aNextPostIt = i;
++aNextPostIt;
if (aNextPostIt !=aVisiblePostItList.end())
@@ -1025,7 +1066,7 @@ bool SwPostItMgr::LayoutByPage(std::list<SwMarginWin*> &aVisiblePostItList,const
if ( ((*i)->VirtualPos().Y()- lTranslatePos - GetSpaceBetween()) > lTopBorder)
{
if ((*aNextPostIt)->IsFollow())
- (*i)->TranslateTopPosition(-1*(lTranslatePos+ANKORLINE_WIDTH));
+ (*i)->TranslateTopPosition(-1*(lTranslatePos+ANCHORLINE_WIDTH));
else
(*i)->TranslateTopPosition(-1*(lTranslatePos+GetSpaceBetween()));
}
@@ -1034,7 +1075,7 @@ bool SwPostItMgr::LayoutByPage(std::list<SwMarginWin*> &aVisiblePostItList,const
long lMoveUp = (*i)->VirtualPos().Y() - lTopBorder;
(*i)->TranslateTopPosition(-1* lMoveUp);
if ((*aNextPostIt)->IsFollow())
- (*aNextPostIt)->TranslateTopPosition( (lTranslatePos+ANKORLINE_WIDTH) - lMoveUp);
+ (*aNextPostIt)->TranslateTopPosition( (lTranslatePos+ANCHORLINE_WIDTH) - lMoveUp);
else
(*aNextPostIt)->TranslateTopPosition( (lTranslatePos+GetSpaceBetween()) - lMoveUp);
}
@@ -1043,7 +1084,7 @@ bool SwPostItMgr::LayoutByPage(std::list<SwMarginWin*> &aVisiblePostItList,const
{
// no space left, left move the next one down
if ((*aNextPostIt)->IsFollow())
- (*aNextPostIt)->TranslateTopPosition(lTranslatePos+ANKORLINE_WIDTH);
+ (*aNextPostIt)->TranslateTopPosition(lTranslatePos+ANCHORLINE_WIDTH);
else
(*aNextPostIt)->TranslateTopPosition(lTranslatePos+GetSpaceBetween());
}
@@ -1062,14 +1103,14 @@ bool SwPostItMgr::LayoutByPage(std::list<SwMarginWin*> &aVisiblePostItList,const
}
}
if (aNextPostIt !=aVisiblePostItList.end() && (*aNextPostIt)->IsFollow())
- lSpaceUsed += (*i)->VirtualSize().Height() + ANKORLINE_WIDTH;
+ lSpaceUsed += (*i)->VirtualSize().Height() + ANCHORLINE_WIDTH;
else
lSpaceUsed += (*i)->VirtualSize().Height() + GetSpaceBetween();
}
else
{
//(*i) is the last visible item
- SwMarginWin_iterator aPrevPostIt = i;
+ SwSidebarWin_iterator aPrevPostIt = i;
--aPrevPostIt;
//lTranslatePos = ( (*aPrevPostIt)->VirtualPos().Y() + (*aPrevPostIt)->VirtualSize().Height() + GetSpaceBetween() ) - (*i)->VirtualPos().Y();
lTranslatePos = ( (*aPrevPostIt)->VirtualPos().Y() + (*aPrevPostIt)->VirtualSize().Height() ) - (*i)->VirtualPos().Y();
@@ -1079,7 +1120,7 @@ bool SwPostItMgr::LayoutByPage(std::list<SwMarginWin*> &aVisiblePostItList,const
if ( ((*i)->VirtualPos().Y()+ (*i)->VirtualSize().Height()+lTranslatePos) < lBottomBorder)
{
if ( (*i)->IsFollow() )
- (*i)->TranslateTopPosition(lTranslatePos+ANKORLINE_WIDTH);
+ (*i)->TranslateTopPosition(lTranslatePos+ANCHORLINE_WIDTH);
else
(*i)->TranslateTopPosition(lTranslatePos+GetSpaceBetween());
}
@@ -1111,7 +1152,7 @@ bool SwPostItMgr::LayoutByPage(std::list<SwMarginWin*> &aVisiblePostItList,const
else
{
// only one left, make sure it is not hidden at the top or bottom
- SwMarginWin_iterator i = aVisiblePostItList.begin();
+ SwSidebarWin_iterator i = aVisiblePostItList.begin();
lTranslatePos = lTopBorder - (*i)->VirtualPos().Y();
if (lTranslatePos>0)
{
@@ -1164,11 +1205,11 @@ void SwPostItMgr::AddPostIts(bool bCheckExistance, bool bFocus)
PrepareView(true);
}
-void SwPostItMgr::RemoveMarginWin()
+void SwPostItMgr::RemoveSidebarWin()
{
if (!mvPostItFlds.empty())
{
- for(std::list<SwMarginItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
{
EndListening( *((*i)->GetBroadCaster()) );
if ((*i)->pPostIt)
@@ -1188,8 +1229,10 @@ void SwPostItMgr::RemoveMarginWin()
void SwPostItMgr::Delete(String aAuthor)
{
mpWrtShell->StartAllAction();
- if ( GetActivePostIt() && (GetActivePostIt()->GetAuthor()==aAuthor) )
- SetActivePostIt(0);
+ if ( HasActiveSidebarWin() && (GetActiveSidebarWin()->GetAuthor()==aAuthor) )
+ {
+ SetActiveSidebarWin(0);
+ }
SwRewriter aRewriter;
String aUndoString = SW_RES(STR_DELETE_AUTHOR_NOTES);
aUndoString += aAuthor;
@@ -1198,7 +1241,7 @@ void SwPostItMgr::Delete(String aAuthor)
std::vector<SwFmtFld*> aTmp;
aTmp.reserve( mvPostItFlds.size() );
- for(std::list<SwMarginItem*>::iterator pPostIt = mvPostItFlds.begin(); pPostIt!= mvPostItFlds.end() ; pPostIt++)
+ for(std::list<SwSidebarItem*>::iterator pPostIt = mvPostItFlds.begin(); pPostIt!= mvPostItFlds.end() ; pPostIt++)
{
if ((*pPostIt)->GetFmtFld() && ((*pPostIt)->pPostIt->GetAuthor() == aAuthor) )
aTmp.push_back( (*pPostIt)->GetFmtFld() );
@@ -1208,36 +1251,6 @@ void SwPostItMgr::Delete(String aAuthor)
mpWrtShell->GotoField( *(*i) );
mpWrtShell->DelRight();
}
- /*
- for(std::list<SwPostItItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end(); )
- {
- SwPostItItem* pItem = (*i);
- SwPostItField* pPostItField = static_cast<SwPostItField*>(pItem->pFmtFld->GetFld());
- if (pPostItField->GetPar1() == aAuthor)
- {
- // stop listening, we delete ourselves
- EndListening( *(pItem->pFmtFld) );
-
- // remove reference to yet-to-die postit
- if (pItem->pPostIt == GetActivePostIt())
- SetActivePostIt(0);
-
- // delete the actual SwPostItField
- mpWrtShell->GotoField(*pItem->pFmtFld);
- mpWrtShell->DelRight();
- i = mvPostItFlds.erase(i);
-
- // delete visual representation
- // lazy delete doesn't work because references to document (mpFmtFld, mpView etc. may be dead before deletion)
- delete pItem->pPostIt;
-
- // delete struct saving the pointers
- delete pItem;
- }
- else
- ++i;
- }
- */
mpWrtShell->EndUndo( UNDO_DELETE );
PrepareView();
mpWrtShell->EndAllAction();
@@ -1249,14 +1262,14 @@ void SwPostItMgr::Delete(String aAuthor)
void SwPostItMgr::Delete()
{
mpWrtShell->StartAllAction();
- SetActivePostIt(0);
+ SetActiveSidebarWin(0);
SwRewriter aRewriter;
aRewriter.AddRule(UNDO_ARG1, SW_RES(STR_DELETE_ALL_NOTES) );
mpWrtShell->StartUndo( UNDO_DELETE, &aRewriter );
-
+
std::vector<SwFmtFld*> aTmp;
aTmp.reserve( mvPostItFlds.size() );
- for(std::list<SwMarginItem*>::iterator pPostIt = mvPostItFlds.begin(); pPostIt!= mvPostItFlds.end() ; pPostIt++)
+ for(std::list<SwSidebarItem*>::iterator pPostIt = mvPostItFlds.begin(); pPostIt!= mvPostItFlds.end() ; pPostIt++)
{
if ((*pPostIt)->GetFmtFld())
aTmp.push_back( (*pPostIt)->GetFmtFld() );
@@ -1283,7 +1296,7 @@ void SwPostItMgr::Delete()
}
mvPostItFlds.clear();
*/
-
+
mpWrtShell->EndUndo( UNDO_DELETE );
PrepareView();
mpWrtShell->EndAllAction();
@@ -1291,10 +1304,10 @@ void SwPostItMgr::Delete()
CalcRects();
LayoutPostIts();
}
-
+#if 0
void SwPostItMgr::Hide(SwPostItField* pPostItField )
{
- for(std::list<SwMarginItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
{
if ((*i)->GetFmtFld())
{
@@ -1310,10 +1323,10 @@ void SwPostItMgr::Hide(SwPostItField* pPostItField )
LayoutPostIts();
}
-
+#endif
void SwPostItMgr::Hide( const String& rAuthor )
{
- for(SwMarginItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(SwSidebarItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
{
if ( (*i)->pPostIt && ((*i)->pPostIt->GetAuthor() == rAuthor) )
{
@@ -1327,7 +1340,7 @@ void SwPostItMgr::Hide( const String& rAuthor )
void SwPostItMgr::Hide()
{
- for(SwMarginItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(SwSidebarItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
{
(*i)->bShow = false;
(*i)->pPostIt->HideNote();
@@ -1337,7 +1350,7 @@ void SwPostItMgr::Hide()
void SwPostItMgr::Show()
{
- for(SwMarginItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(SwSidebarItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
{
(*i)->bShow = true;
}
@@ -1365,7 +1378,7 @@ void SwPostItMgr::Sort(const short aType)
}
}
-SwMarginWin* SwPostItMgr::GetPostIt(SfxBroadcaster* pBroadcaster) const
+SwSidebarWin* SwPostItMgr::GetSidebarWin( const SfxBroadcaster* pBroadcaster) const
{
for(const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
{
@@ -1375,73 +1388,30 @@ SwMarginWin* SwPostItMgr::GetPostIt(SfxBroadcaster* pBroadcaster) const
return NULL;
}
-SwPostIt* SwPostItMgr::GetPostIt(SwPostItField* pFld) const
-{
- for(const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
- {
- if ( (*i)->GetFmtFld() && ((*i)->GetFmtFld()->GetFld() == pFld) )
- return static_cast<SwPostIt*>((*i)->pPostIt);
- }
- return NULL;
-}
-
-SwMarginWin* SwPostItMgr::GetPostIt( const SfxBroadcaster* pBroadcaster) const
-{
- for(const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
- {
- if ( (*i)->GetBroadCaster() == pBroadcaster)
- return (*i)->pPostIt;
- }
- return NULL;
-}
-
-SwPostIt* SwPostItMgr::GetPostIt(const SwPostItField* pFld) const
+sw::annotation::SwAnnotationWin* SwPostItMgr::GetAnnotationWin(const SwPostItField* pFld) const
{
for(const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
{
if ( (*i)->GetFmtFld() && ((*i)->GetFmtFld()->GetFld() == pFld))
- return static_cast<SwPostIt*>((*i)->pPostIt);
+ return dynamic_cast<sw::annotation::SwAnnotationWin*>((*i)->pPostIt);
}
return NULL;
}
-bool SwPostItMgr::ShowPreview(const SwField* pFld, SwFmtFld*& pFmtFld) const
-{
- for (unsigned long n=0;n<mPages.size();n++)
- {
- if (mPages[n]->mList->size()>0)
- {
- for(const_iterator i = mPages[n]->mList->begin(); i!= mPages[n]->mList->end(); i++)
- {
- if ( (*i)->GetFmtFld() && ((*i)->GetFmtFld()->GetFld()==pFld) )
- {
- pFmtFld = (*i)->GetFmtFld();
- const long aSidebarheight = mPages[n]->bScrollbar ? mpEditWin->PixelToLogic(Size(0,GetSidebarScrollerHeight())).Height() : 0;
- bool bTopPage = mpEditWin->PixelToLogic(Point(0,(*i)->pPostIt->GetPosPixel().Y())).Y() >= (mPages[n]->mPageRect.Top()+aSidebarheight);
- bool bBottomPage = mpEditWin->PixelToLogic(Point(0,(*i)->pPostIt->GetPosPixel().Y()+(*i)->pPostIt->GetSizePixel().Height())).Y() <= (mPages[n]->mPageRect.Bottom()-aSidebarheight);
- const bool bTopVis = mpEditWin->PixelToLogic(Point(0,(*i)->pPostIt->GetPosPixel().Y())).Y() > mpView->GetVisArea().Top();
- const bool bBottomVis = mpEditWin->PixelToLogic(Point(0,(*i)->pPostIt->GetPosPixel().Y()/*+(*i)->pPostIt->GetSizePixel().Height()*/)).Y() <= mpView->GetVisArea().Bottom();
- return !(bBottomPage && bTopPage && bBottomVis && bTopVis);
- }
- }
- }
- }
- return false;
-}
-
-SwMarginWin* SwPostItMgr::GetNextPostIt(USHORT aDirection, SwMarginWin* aPostIt)
+SwSidebarWin* SwPostItMgr::GetNextPostIt( USHORT aDirection,
+ SwSidebarWin* aPostIt )
{
if (mvPostItFlds.size()>1)
{
- for(SwMarginItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(SwSidebarItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
{
if ( (*i)->pPostIt ==aPostIt)
{
- SwMarginItem_iterator iNextPostIt = i;
+ SwSidebarItem_iterator iNextPostIt = i;
if (aDirection==KEY_PAGEUP)
{
if ( iNextPostIt==mvPostItFlds.begin() )
- {
+ {
return NULL;
}
--iNextPostIt;
@@ -1470,11 +1440,11 @@ long SwPostItMgr::GetNextBorder()
{
for (unsigned long n=0;n<mPages.size();n++)
{
- for(SwMarginItem_iterator b = mPages[n]->mList->begin(); b!= mPages[n]->mList->end(); b++)
+ for(SwSidebarItem_iterator b = mPages[n]->mList->begin(); b!= mPages[n]->mList->end(); b++)
{
if ((*b)->pPostIt == mpActivePostIt)
{
- SwMarginItem_iterator aNext = b;
+ SwSidebarItem_iterator aNext = b;
aNext++;
bool bFollow = (aNext == mPages[n]->mList->end()) ? false : (*aNext)->pPostIt->IsFollow();
if ( mPages[n]->bScrollbar || bFollow )
@@ -1507,15 +1477,16 @@ void SwPostItMgr::SetShadowState(const SwPostItField* pFld,bool bCursor)
{
// reset old one if still alive
// TODO: does not work properly if mouse and cursor was set
- SwPostIt* pOldPostIt = GetPostIt(mShadowState.mpShadowFld);
+ sw::annotation::SwAnnotationWin* pOldPostIt =
+ GetAnnotationWin(mShadowState.mpShadowFld);
if (pOldPostIt && pOldPostIt->Shadow() && (pOldPostIt->Shadow()->GetShadowState() != SS_EDIT))
- pOldPostIt->SetViewState(SS_NORMAL);
+ pOldPostIt->SetViewState(VS_NORMAL);
}
//set new one, if it is not currently edited
- SwPostIt* pNewPostIt = GetPostIt(pFld);
+ sw::annotation::SwAnnotationWin* pNewPostIt = GetAnnotationWin(pFld);
if (pNewPostIt && pNewPostIt->Shadow() && (pNewPostIt->Shadow()->GetShadowState() != SS_EDIT))
{
- pNewPostIt->SetViewState(SS_VIEW);
+ pNewPostIt->SetViewState(VS_VIEW);
//remember our new field
mShadowState.mpShadowFld = pFld;
mShadowState.bCursor = false;
@@ -1538,10 +1509,10 @@ void SwPostItMgr::SetShadowState(const SwPostItField* pFld,bool bCursor)
if (!mShadowState.bCursor && !mShadowState.bMouse)
{
// reset old one if still alive
- SwPostIt* pOldPostIt = GetPostIt(mShadowState.mpShadowFld);
+ sw::annotation::SwAnnotationWin* pOldPostIt = GetAnnotationWin(mShadowState.mpShadowFld);
if (pOldPostIt && pOldPostIt->Shadow() && (pOldPostIt->Shadow()->GetShadowState() != SS_EDIT))
{
- pOldPostIt->SetViewState(SS_NORMAL);
+ pOldPostIt->SetViewState(VS_NORMAL);
mShadowState.mpShadowFld = 0;
}
}
@@ -1557,7 +1528,7 @@ void SwPostItMgr::PrepareView(bool bIgnoreCount)
//mpEditWin->Invalidate(); // really not needed anymore??
SwRootFrm* pLayout = mpWrtShell->GetLayout();
if ( pLayout )
- SwPostItHelper::setSidebarChanged( pLayout,
+ SwPostItHelper::setSidebarChanged( pLayout,
mpWrtShell->getIDocumentSettingAccess()->get( IDocumentSettingAccess::BROWSE_MODE ) );
mpWrtShell->EndAllAction();
}
@@ -1583,15 +1554,16 @@ bool SwPostItMgr::IsHit(const Point &aPointPixel)
{
Rectangle aRect;
DBG_ASSERT(mPages.size()>nPageNum-1,"SwPostitMgr:: page container size wrong");
- aRect = mPages[nPageNum-1]->bMarginSide ? Rectangle(Point(aPageFrm.Left()-GetSidebarWidth()-GetSidebarBorderWidth(),aPageFrm.Top()),Size(GetSidebarWidth(),aPageFrm.Height())) :
- Rectangle( Point(aPageFrm.Right()+GetSidebarBorderWidth(),aPageFrm.Top()) , Size(GetSidebarWidth(),aPageFrm.Height()));
+ aRect = mPages[nPageNum-1]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT
+ ? Rectangle(Point(aPageFrm.Left()-GetSidebarWidth()-GetSidebarBorderWidth(),aPageFrm.Top()),Size(GetSidebarWidth(),aPageFrm.Height()))
+ : Rectangle( Point(aPageFrm.Right()+GetSidebarBorderWidth(),aPageFrm.Top()) , Size(GetSidebarWidth(),aPageFrm.Height()));
if (aRect.IsInside(aPoint))
{
// we hit the note's sidebar
// lets now test for the arrow area
if (mPages[nPageNum-1]->bScrollbar)
return ScrollbarHit(nPageNum,aPoint);
- else
+ else
return false;
}
}
@@ -1601,8 +1573,9 @@ bool SwPostItMgr::IsHit(const Point &aPointPixel)
Rectangle SwPostItMgr::GetBottomScrollRect(const unsigned long aPage) const
{
SwRect aPageRect = mPages[aPage-1]->mPageRect;
- Point aPointBottom = mPages[aPage-1]->bMarginSide ? Point(aPageRect.Left() - GetSidebarWidth() - GetSidebarBorderWidth() + mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Bottom()- mpEditWin->PixelToLogic(Size(0,2+GetSidebarScrollerHeight())).Height()) :
- Point(aPageRect.Right() + GetSidebarBorderWidth() + mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Bottom()- mpEditWin->PixelToLogic(Size(0,2+GetSidebarScrollerHeight())).Height());
+ Point aPointBottom = mPages[aPage-1]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT
+ ? Point(aPageRect.Left() - GetSidebarWidth() - GetSidebarBorderWidth() + mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Bottom()- mpEditWin->PixelToLogic(Size(0,2+GetSidebarScrollerHeight())).Height())
+ : Point(aPageRect.Right() + GetSidebarBorderWidth() + mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Bottom()- mpEditWin->PixelToLogic(Size(0,2+GetSidebarScrollerHeight())).Height());
Size aSize(GetSidebarWidth() - mpEditWin->PixelToLogic(Size(4,0)).Width(), mpEditWin->PixelToLogic(Size(0,GetSidebarScrollerHeight())).Height()) ;
return Rectangle(aPointBottom,aSize);
@@ -1611,8 +1584,9 @@ Rectangle SwPostItMgr::GetBottomScrollRect(const unsigned long aPage) const
Rectangle SwPostItMgr::GetTopScrollRect(const unsigned long aPage) const
{
SwRect aPageRect = mPages[aPage-1]->mPageRect;
- Point aPointTop = mPages[aPage-1]->bMarginSide ? Point(aPageRect.Left() - GetSidebarWidth() -GetSidebarBorderWidth()+ mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + mpEditWin->PixelToLogic(Size(0,2)).Height()) :
- Point(aPageRect.Right() + GetSidebarBorderWidth() + mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + mpEditWin->PixelToLogic(Size(0,2)).Height());
+ Point aPointTop = mPages[aPage-1]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT
+ ? Point(aPageRect.Left() - GetSidebarWidth() -GetSidebarBorderWidth()+ mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + mpEditWin->PixelToLogic(Size(0,2)).Height())
+ : Point(aPageRect.Right() + GetSidebarBorderWidth() + mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + mpEditWin->PixelToLogic(Size(0,2)).Height());
Size aSize(GetSidebarWidth() - mpEditWin->PixelToLogic(Size(4,0)).Width(), mpEditWin->PixelToLogic(Size(0,GetSidebarScrollerHeight())).Height()) ;
return Rectangle(aPointTop,aSize);
}
@@ -1622,11 +1596,13 @@ Rectangle SwPostItMgr::GetTopScrollRect(const unsigned long aPage) const
bool SwPostItMgr::ScrollbarHit(const unsigned long aPage,const Point &aPoint)
{
SwRect aPageRect = mPages[aPage-1]->mPageRect;
- Point aPointBottom = mPages[aPage-1]->bMarginSide ? Point(aPageRect.Left() - GetSidebarWidth()-GetSidebarBorderWidth() + mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Bottom()- mpEditWin->PixelToLogic(Size(0,2+GetSidebarScrollerHeight())).Height()) :
- Point(aPageRect.Right() + GetSidebarBorderWidth()+ mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Bottom()- mpEditWin->PixelToLogic(Size(0,2+GetSidebarScrollerHeight())).Height());
+ Point aPointBottom = mPages[aPage-1]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT
+ ? Point(aPageRect.Left() - GetSidebarWidth()-GetSidebarBorderWidth() + mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Bottom()- mpEditWin->PixelToLogic(Size(0,2+GetSidebarScrollerHeight())).Height())
+ : Point(aPageRect.Right() + GetSidebarBorderWidth()+ mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Bottom()- mpEditWin->PixelToLogic(Size(0,2+GetSidebarScrollerHeight())).Height());
- Point aPointTop = mPages[aPage-1]->bMarginSide ? Point(aPageRect.Left() - GetSidebarWidth()-GetSidebarBorderWidth()+ mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + mpEditWin->PixelToLogic(Size(0,2)).Height()) :
- Point(aPageRect.Right()+GetSidebarBorderWidth()+ mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + mpEditWin->PixelToLogic(Size(0,2)).Height());
+ Point aPointTop = mPages[aPage-1]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT
+ ? Point(aPageRect.Left() - GetSidebarWidth()-GetSidebarBorderWidth()+ mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + mpEditWin->PixelToLogic(Size(0,2)).Height())
+ : Point(aPageRect.Right()+GetSidebarBorderWidth()+ mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + mpEditWin->PixelToLogic(Size(0,2)).Height());
Rectangle aRectBottom(GetBottomScrollRect(aPage));
Rectangle aRectTop(GetTopScrollRect(aPage));
@@ -1657,8 +1633,8 @@ void SwPostItMgr::CorrectPositions()
return;
// find first valid note
- SwMarginWin *pFirstPostIt = 0;
- for(SwMarginItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ SwSidebarWin *pFirstPostIt = 0;
+ for(SwSidebarItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
{
pFirstPostIt = (*i)->pPostIt;
if (pFirstPostIt)
@@ -1670,23 +1646,23 @@ void SwPostItMgr::CorrectPositions()
return;
// yeah, I know, if this is a left page it could be wrong, but finding the page and the note is probably not even faster than just doing it
- const long aAnkorX = mpEditWin->LogicToPixel( Point((long)(pFirstPostIt->Ankor()->GetSixthPosition().getX()),0)).X();
- const long aAnkorY = mpEditWin->LogicToPixel( Point(0,(long)(pFirstPostIt->Ankor()->GetSixthPosition().getY()))).Y() + 1;
- if (Point(aAnkorX,aAnkorY) != pFirstPostIt->GetPosPixel())
+ const long aAnchorX = mpEditWin->LogicToPixel( Point((long)(pFirstPostIt->Anchor()->GetSixthPosition().getX()),0)).X();
+ const long aAnchorY = mpEditWin->LogicToPixel( Point(0,(long)(pFirstPostIt->Anchor()->GetSixthPosition().getY()))).Y() + 1;
+ if (Point(aAnchorX,aAnchorY) != pFirstPostIt->GetPosPixel())
{
- long aAnkorPosX = 0;
- long aAnkorPosY = 0;
+ long aAnchorPosX = 0;
+ long aAnchorPosY = 0;
for (unsigned long n=0;n<mPages.size();n++)
{
- for(SwMarginItem_iterator i = mPages[n]->mList->begin(); i!= mPages[n]->mList->end(); i++)
+ for(SwSidebarItem_iterator i = mPages[n]->mList->begin(); i!= mPages[n]->mList->end(); i++)
{
if ((*i)->bShow && (*i)->pPostIt)
{
- aAnkorPosX = mPages[n]->bMarginSide ?
- mpEditWin->LogicToPixel( Point((long)((*i)->pPostIt->Ankor()->GetSeventhPosition().getX()),0)).X() :
- mpEditWin->LogicToPixel( Point((long)((*i)->pPostIt->Ankor()->GetSixthPosition().getX()),0)).X();
- aAnkorPosY = mpEditWin->LogicToPixel( Point(0,(long)((*i)->pPostIt->Ankor()->GetSixthPosition().getY()))).Y() + 1;
- (*i)->pPostIt->SetPosPixel(Point(aAnkorPosX,aAnkorPosY));
+ aAnchorPosX = mPages[n]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT
+ ? mpEditWin->LogicToPixel( Point((long)((*i)->pPostIt->Anchor()->GetSeventhPosition().getX()),0)).X()
+ : mpEditWin->LogicToPixel( Point((long)((*i)->pPostIt->Anchor()->GetSixthPosition().getX()),0)).X();
+ aAnchorPosY = mpEditWin->LogicToPixel( Point(0,(long)((*i)->pPostIt->Anchor()->GetSixthPosition().getY()))).Y() + 1;
+ (*i)->pPostIt->SetPosPixel(Point(aAnchorPosX,aAnchorPosY));
}
}
}
@@ -1757,29 +1733,29 @@ Color SwPostItMgr::GetColorLight(sal_uInt16 aAuthorIndex)
return Color(COL_WHITE);
}
-Color SwPostItMgr::GetColorAnkor(sal_uInt16 aAuthorIndex)
+Color SwPostItMgr::GetColorAnchor(sal_uInt16 aAuthorIndex)
{
if (!Application::GetSettings().GetStyleSettings().GetHighContrastMode())
{
- static const Color aArrayAnkor[] = {
+ static const Color aArrayAnchor[] = {
COL_AUTHOR1_DARK, COL_AUTHOR2_DARK, COL_AUTHOR3_DARK,
COL_AUTHOR4_DARK, COL_AUTHOR5_DARK, COL_AUTHOR6_DARK,
COL_AUTHOR7_DARK, COL_AUTHOR8_DARK, COL_AUTHOR9_DARK };
- return Color( aArrayAnkor[ aAuthorIndex % (sizeof( aArrayAnkor ) / sizeof( aArrayAnkor[0] ))]);
+ return Color( aArrayAnchor[ aAuthorIndex % (sizeof( aArrayAnchor ) / sizeof( aArrayAnchor[0] ))]);
}
else
return Color(COL_WHITE);
}
-void SwPostItMgr::SetActivePostIt( SwMarginWin* p)
+void SwPostItMgr::SetActiveSidebarWin( SwSidebarWin* p)
{
if ( p != mpActivePostIt )
{
// we need the temp variable so we can set mpActivePostIt before we call DeactivatePostIt
// therefore we get a new layout in DOCCHANGED when switching from postit to document,
// otherwise, GetActivePostIt() would still hold our old postit
- SwMarginWin* pActive = mpActivePostIt;
+ SwSidebarWin* pActive = mpActivePostIt;
mpActivePostIt = p;
if (pActive)
{
@@ -1816,7 +1792,7 @@ IMPL_LINK( SwPostItMgr, CalcHdl, void*, /* pVoid*/ )
void SwPostItMgr::Rescale()
{
- for(std::list<SwMarginItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
if ( (*i)->pPostIt )
(*i)->pPostIt->Rescale();
}
@@ -1824,7 +1800,7 @@ void SwPostItMgr::Rescale()
sal_Int32 SwPostItMgr::GetInitialAnchorDistance() const
{
const Fraction& f( mpEditWin->GetMapMode().GetScaleY() );
- return POSTIT_INITIAL_ANKOR_DISTANCE * f.GetNumerator() / f.GetDenominator();
+ return POSTIT_INITIAL_ANCHOR_DISTANCE * f.GetNumerator() / f.GetDenominator();
}
sal_Int32 SwPostItMgr::GetSpaceBetween() const
@@ -1853,21 +1829,21 @@ sal_Int32 SwPostItMgr::GetSidebarScrollerHeight() const
void SwPostItMgr::SetSpellChecking()
{
- for(std::list<SwMarginItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
if ( (*i)->pPostIt )
(*i)->pPostIt->SetSpellChecking();
}
void SwPostItMgr::SetReadOnlyState()
{
- for(std::list<SwMarginItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
if ( (*i)->pPostIt )
(*i)->pPostIt->SetReadonly( mbReadOnly );
}
void SwPostItMgr::CheckMetaText()
{
- for(std::list<SwMarginItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
+ for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
if ( (*i)->pPostIt )
(*i)->pPostIt->CheckMetaText();
@@ -1875,45 +1851,45 @@ void SwPostItMgr::CheckMetaText()
sal_uInt16 SwPostItMgr::Replace(SvxSearchItem* pItem)
{
- SwMarginWin* pWin = GetActivePostIt();
- sal_uInt16 aResult = pWin->View()->StartSearchAndReplace( *pItem );
+ SwSidebarWin* pWin = GetActiveSidebarWin();
+ sal_uInt16 aResult = pWin->GetOutlinerView()->StartSearchAndReplace( *pItem );
if (!aResult)
- SetActivePostIt(0);
+ SetActiveSidebarWin(0);
return aResult;
}
sal_uInt16 SwPostItMgr::FinishSearchReplace(const ::com::sun::star::util::SearchOptions& rSearchOptions, bool bSrchForward)
{
- SwMarginWin* pWin = GetActivePostIt();
+ SwSidebarWin* pWin = GetActiveSidebarWin();
SvxSearchItem aItem(SID_SEARCH_ITEM );
aItem.SetSearchOptions(rSearchOptions);
aItem.SetBackward(!bSrchForward);
- sal_uInt16 aResult = pWin->View()->StartSearchAndReplace( aItem );
+ sal_uInt16 aResult = pWin->GetOutlinerView()->StartSearchAndReplace( aItem );
if (!aResult)
- SetActivePostIt(0);
+ SetActiveSidebarWin(0);
return aResult;
}
sal_uInt16 SwPostItMgr::SearchReplace(const SwFmtFld &pFld, const ::com::sun::star::util::SearchOptions& rSearchOptions, bool bSrchForward)
{
sal_uInt16 aResult = 0;
- SwMarginWin* pWin = GetPostIt(&pFld);
+ SwSidebarWin* pWin = GetSidebarWin(&pFld);
if (pWin)
{
- ESelection aOldSelection = pWin->View()->GetSelection();
+ ESelection aOldSelection = pWin->GetOutlinerView()->GetSelection();
if (bSrchForward)
- pWin->View()->SetSelection(ESelection(0,0,0,0));
+ pWin->GetOutlinerView()->SetSelection(ESelection(0,0,0,0));
else
- pWin->View()->SetSelection(ESelection(0xFFFF,0xFFFF,0xFFFF,0xFFFF));
+ pWin->GetOutlinerView()->SetSelection(ESelection(0xFFFF,0xFFFF,0xFFFF,0xFFFF));
SvxSearchItem aItem(SID_SEARCH_ITEM );
aItem.SetSearchOptions(rSearchOptions);
aItem.SetBackward(!bSrchForward);
- aResult = pWin->View()->StartSearchAndReplace( aItem );
+ aResult = pWin->GetOutlinerView()->StartSearchAndReplace( aItem );
if (!aResult)
- pWin->View()->SetSelection(aOldSelection);
+ pWin->GetOutlinerView()->SetSelection(aOldSelection);
else
{
- SetActivePostIt(pWin);
+ SetActiveSidebarWin(pWin);
MakeVisible(pWin);
}
}
@@ -1939,12 +1915,127 @@ void SwPostItMgr::AssureStdModeAtShell()
mpWrtShell->LeaveSelFrmMode();
mpWrtShell->GetView().LeaveDrawCreate();
mpWrtShell->EnterStdMode();
-
+
mpWrtShell->DrawSelChanged();
mpView->StopShellTimer();
}
}
+bool SwPostItMgr::HasActiveSidebarWin() const
+{
+ return mpActivePostIt != 0;
+}
+
+bool SwPostItMgr::HasActiveAnnotationWin() const
+{
+ return HasActiveSidebarWin() &&
+ dynamic_cast<sw::annotation::SwAnnotationWin*>(mpActivePostIt) != 0;
+}
+
+void SwPostItMgr::GrabFocusOnActiveSidebarWin()
+{
+ if ( HasActiveSidebarWin() )
+ {
+ mpActivePostIt->GrabFocus();
+ }
+}
+
+void SwPostItMgr::UpdateDataOnActiveSidebarWin()
+{
+ if ( HasActiveSidebarWin() )
+ {
+ mpActivePostIt->UpdateData();
+ }
+}
+
+void SwPostItMgr::DeleteActiveSidebarWin()
+{
+ if ( HasActiveSidebarWin() )
+ {
+ mpActivePostIt->Delete();
+ }
+}
+
+void SwPostItMgr::HideActiveSidebarWin()
+{
+ if ( HasActiveSidebarWin() )
+ {
+ mpActivePostIt->Hide();
+ }
+}
+
+void SwPostItMgr::ToggleInsModeOnActiveSidebarWin()
+{
+ if ( HasActiveSidebarWin() )
+ {
+ mpActivePostIt->ToggleInsMode();
+ }
+}
+
+void SwPostItMgr::ConnectSidebarWinToFrm( const SwFrm& rFrm,
+ const SwFmtFld& rFmtFld,
+ SwSidebarWin& rSidebarWin )
+{
+ if ( mpFrmSidebarWinContainer == 0 )
+ {
+ mpFrmSidebarWinContainer = new SwFrmSidebarWinContainer();
+ }
+
+ const bool bInserted = mpFrmSidebarWinContainer->insert( rFrm, rFmtFld, rSidebarWin );
+ if ( bInserted &&
+ mpWrtShell->GetAccessibleMap() )
+ {
+ mpWrtShell->GetAccessibleMap()->InvalidatePosOrSize( 0, 0, &rSidebarWin, SwRect() );
+ }
+}
+
+void SwPostItMgr::DisconnectSidebarWinFromFrm( const SwFrm& rFrm,
+ SwSidebarWin& rSidebarWin )
+{
+ if ( mpFrmSidebarWinContainer != 0 )
+ {
+ const bool bRemoved = mpFrmSidebarWinContainer->remove( rFrm, rSidebarWin );
+ if ( bRemoved &&
+ mpWrtShell->GetAccessibleMap() )
+ {
+ mpWrtShell->GetAccessibleMap()->Dispose( 0, 0, &rSidebarWin );
+ }
+ }
+}
+
+bool SwPostItMgr::HasFrmConnectedSidebarWins( const SwFrm& rFrm )
+{
+ bool bRet( false );
+
+ if ( mpFrmSidebarWinContainer != 0 )
+ {
+ bRet = !mpFrmSidebarWinContainer->empty( rFrm );
+ }
+
+ return bRet;
+}
+
+Window* SwPostItMgr::GetSidebarWinForFrmByIndex( const SwFrm& rFrm,
+ const sal_Int32 nIndex )
+{
+ Window* pSidebarWin( 0 );
+
+ if ( mpFrmSidebarWinContainer != 0 )
+ {
+ pSidebarWin = mpFrmSidebarWinContainer->get( rFrm, nIndex );
+ }
+
+ return pSidebarWin;
+}
+
+void SwPostItMgr::GetAllSidebarWinForFrm( const SwFrm& rFrm,
+ std::vector< Window* >* pChildren )
+{
+ if ( mpFrmSidebarWinContainer != 0 )
+ {
+ mpFrmSidebarWinContainer->getAll( rFrm, pChildren );
+ }
+}
+
void SwNoteProps::Commit() {}
void SwNoteProps::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
-
diff --git a/sw/source/ui/docvw/ShadowOverlayObject.cxx b/sw/source/ui/docvw/ShadowOverlayObject.cxx
new file mode 100644
index 0000000000..b11fc914b5
--- /dev/null
+++ b/sw/source/ui/docvw/ShadowOverlayObject.cxx
@@ -0,0 +1,268 @@
+/************************************************************************* *
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: postit.cxx,v $
+ * $Revision: 1.8.42.11 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#include "precompiled_sw.hxx"
+
+#include <ShadowOverlayObject.hxx>
+
+#include <view.hxx>
+#include <svx/sdrpaintwindow.hxx>
+#include <svx/svdview.hxx>
+#include <svx/sdr/overlay/overlaymanager.hxx>
+
+#include <sw_primitivetypes2d.hxx>
+#include <drawinglayer/primitive2d/primitivetools2d.hxx>
+#include <drawinglayer/primitive2d/fillgradientprimitive2d.hxx>
+
+namespace sw { namespace sidebarwindows {
+
+//////////////////////////////////////////////////////////////////////////////
+// helper SwPostItShadowPrimitive
+//
+// Used to allow view-dependent primitive definition. For that purpose, the
+// initially created primitive (this one) always has to be view-independent,
+// but the decomposition is made view-dependent. Very simple primitive which
+// just remembers the discrete data and applies it at decomposition time.
+
+class ShadowPrimitive : public drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D
+{
+private:
+ basegfx::B2DPoint maBasePosition;
+ basegfx::B2DPoint maSecondPosition;
+ ShadowState maShadowState;
+
+protected:
+ virtual drawinglayer::primitive2d::Primitive2DSequence create2DDecomposition(
+ const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
+
+public:
+ ShadowPrimitive(
+ const basegfx::B2DPoint& rBasePosition,
+ const basegfx::B2DPoint& rSecondPosition,
+ ShadowState aShadowState)
+ : drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D(),
+ maBasePosition(rBasePosition),
+ maSecondPosition(rSecondPosition),
+ maShadowState(aShadowState)
+ {}
+
+ // data access
+ const basegfx::B2DPoint& getBasePosition() const { return maBasePosition; }
+ const basegfx::B2DPoint& getSecondPosition() const { return maSecondPosition; }
+ ShadowState getShadowState() const { return maShadowState; }
+
+ virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const;
+
+ DeclPrimitrive2DIDBlock()
+};
+
+drawinglayer::primitive2d::Primitive2DSequence ShadowPrimitive::create2DDecomposition(
+ const drawinglayer::geometry::ViewInformation2D& /*rViewInformation*/) const
+{
+ // get logic sizes in object coordinate system
+ drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ basegfx::B2DRange aRange(getBasePosition());
+
+ switch(maShadowState)
+ {
+ case SS_NORMAL:
+ {
+ aRange.expand(basegfx::B2DTuple(getSecondPosition().getX(), getSecondPosition().getY() + (2.0 * getDiscreteUnit())));
+ const ::drawinglayer::attribute::FillGradientAttribute aFillGradientAttribute(
+ drawinglayer::attribute::GRADIENTSTYLE_LINEAR,
+ 0.0,
+ 0.5,
+ 0.5,
+ 1800.0 * F_PI1800,
+ basegfx::BColor(230.0/255.0,230.0/255.0,230.0/255.0),
+ basegfx::BColor(180.0/255.0,180.0/255.0,180.0/255.0),
+ 2);
+
+ const drawinglayer::primitive2d::Primitive2DReference xReference(
+ new drawinglayer::primitive2d::FillGradientPrimitive2D(
+ aRange,
+ aFillGradientAttribute));
+
+ xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ break;
+ }
+ case SS_VIEW:
+ {
+ aRange.expand(basegfx::B2DTuple(getSecondPosition().getX(), getSecondPosition().getY() + (4.0 * getDiscreteUnit())));
+ const drawinglayer::attribute::FillGradientAttribute aFillGradientAttribute(
+ drawinglayer::attribute::GRADIENTSTYLE_LINEAR,
+ 0.0,
+ 0.5,
+ 0.5,
+ 1800.0 * F_PI1800,
+ basegfx::BColor(230.0/255.0,230.0/255.0,230.0/255.0),
+ basegfx::BColor(180.0/255.0,180.0/255.0,180.0/255.0),
+ 4);
+
+ const drawinglayer::primitive2d::Primitive2DReference xReference(
+ new drawinglayer::primitive2d::FillGradientPrimitive2D(
+ aRange,
+ aFillGradientAttribute));
+
+ xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ break;
+ }
+ case SS_EDIT:
+ {
+ aRange.expand(basegfx::B2DTuple(getSecondPosition().getX(), getSecondPosition().getY() + (4.0 * getDiscreteUnit())));
+ const drawinglayer::attribute::FillGradientAttribute aFillGradientAttribute(
+ drawinglayer::attribute::GRADIENTSTYLE_LINEAR,
+ 0.0,
+ 0.5,
+ 0.5,
+ 1800.0 * F_PI1800,
+ basegfx::BColor(230.0/255.0,230.0/255.0,230.0/255.0),
+ basegfx::BColor(83.0/255.0,83.0/255.0,83.0/255.0),
+ 4);
+
+ const drawinglayer::primitive2d::Primitive2DReference xReference(
+ new drawinglayer::primitive2d::FillGradientPrimitive2D(
+ aRange,
+ aFillGradientAttribute));
+
+ xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+
+ return xRetval;
+}
+
+bool ShadowPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const
+{
+ if(drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D::operator==(rPrimitive))
+ {
+ const ShadowPrimitive& rCompare = static_cast< const ShadowPrimitive& >(rPrimitive);
+
+ return (getBasePosition() == rCompare.getBasePosition()
+ && getSecondPosition() == rCompare.getSecondPosition()
+ && getShadowState() == rCompare.getShadowState());
+ }
+
+ return false;
+}
+
+ImplPrimitrive2DIDBlock(ShadowPrimitive, PRIMITIVE2D_ID_SWSIDEBARSHADOWPRIMITIVE)
+
+/****** ShadowOverlayObject **************************************************/
+/* static */ ShadowOverlayObject* ShadowOverlayObject::CreateShadowOverlayObject( SwView& rDocView )
+{
+ ShadowOverlayObject* pShadowOverlayObject( 0 );
+
+ if ( rDocView.GetDrawView() )
+ {
+ SdrPaintWindow* pPaintWindow = rDocView.GetDrawView()->GetPaintWindow(0);
+ if( pPaintWindow )
+ {
+ sdr::overlay::OverlayManager* pOverlayManager = pPaintWindow->GetOverlayManager();
+
+ if ( pOverlayManager )
+ {
+ pShadowOverlayObject = new ShadowOverlayObject( basegfx::B2DPoint(0,0),
+ basegfx::B2DPoint(0,0),
+ Color(0,0,0),
+ SS_NORMAL );
+ pOverlayManager->add(*pShadowOverlayObject);
+ }
+ }
+ }
+
+ return pShadowOverlayObject;
+}
+
+/* static */ void ShadowOverlayObject::DestroyShadowOverlayObject( ShadowOverlayObject* pShadow )
+{
+ if ( pShadow )
+ {
+ if ( pShadow->getOverlayManager() )
+ {
+ pShadow->getOverlayManager()->remove(*pShadow);
+ }
+ delete pShadow;
+ }
+}
+
+ShadowOverlayObject::ShadowOverlayObject( const basegfx::B2DPoint& rBasePos,
+ const basegfx::B2DPoint& rSecondPosition,
+ Color aBaseColor,
+ ShadowState aState )
+ : OverlayObjectWithBasePosition(rBasePos, aBaseColor)
+ , maSecondPosition(rSecondPosition)
+ , mShadowState(aState)
+{
+}
+
+ShadowOverlayObject::~ShadowOverlayObject()
+{
+}
+
+drawinglayer::primitive2d::Primitive2DSequence ShadowOverlayObject::createOverlayObjectPrimitive2DSequence()
+{
+ const drawinglayer::primitive2d::Primitive2DReference aReference(
+ new ShadowPrimitive( getBasePosition(),
+ GetSecondPosition(),
+ GetShadowState() ) );
+ return drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1);
+}
+
+void ShadowOverlayObject::SetShadowState(ShadowState aState)
+{
+ if (mShadowState != aState)
+ {
+ mShadowState = aState;
+
+ objectChange();
+ }
+}
+
+void ShadowOverlayObject::SetPosition( const basegfx::B2DPoint& rPoint1,
+ const basegfx::B2DPoint& rPoint2)
+{
+ if(!rPoint1.equal(getBasePosition()) || !rPoint2.equal(GetSecondPosition()))
+ {
+ maBasePosition = rPoint1;
+ maSecondPosition = rPoint2;
+
+ objectChange();
+ }
+}
+
+} } // end of namespace sw::sidebarwindows
+
diff --git a/sw/source/ui/docvw/ShadowOverlayObject.hxx b/sw/source/ui/docvw/ShadowOverlayObject.hxx
new file mode 100644
index 0000000000..a00aea380f
--- /dev/null
+++ b/sw/source/ui/docvw/ShadowOverlayObject.hxx
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ *
+ * $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 _SHADOWOVERLAYOBJECT_HXX
+#define _SHADOWOVERLAYOBJECT_HXX
+
+#include <svx/sdr/overlay/overlayobject.hxx>
+
+class SwView;
+
+namespace sw { namespace sidebarwindows {
+
+enum ShadowState
+{
+ SS_NORMAL,
+ SS_VIEW,
+ SS_EDIT
+};
+
+class ShadowOverlayObject: public sdr::overlay::OverlayObjectWithBasePosition
+{
+ protected:
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
+
+ private:
+ basegfx::B2DPoint maSecondPosition;
+ ShadowState mShadowState;
+
+ ShadowOverlayObject( const basegfx::B2DPoint& rBasePos,
+ const basegfx::B2DPoint& rSecondPosition,
+ Color aBaseColor,
+ ShadowState aState );
+ virtual ~ShadowOverlayObject();
+
+ public:
+ void SetShadowState(ShadowState aState);
+ inline ShadowState GetShadowState() {return mShadowState;}
+
+ inline const basegfx::B2DPoint& GetSecondPosition() const { return maSecondPosition; }
+ void SetSecondPosition( const basegfx::B2DPoint& rNew );
+
+ void SetPosition( const basegfx::B2DPoint& rPoint1,
+ const basegfx::B2DPoint& rPoint2 );
+
+ static ShadowOverlayObject* CreateShadowOverlayObject( SwView& rDocView );
+ static void DestroyShadowOverlayObject( ShadowOverlayObject* pShadow );
+};
+
+} } // end of namespace sw::sidebarwindows
+
+#endif
diff --git a/sw/source/ui/docvw/SidebarTxtControl.cxx b/sw/source/ui/docvw/SidebarTxtControl.cxx
new file mode 100644
index 0000000000..8353511e76
--- /dev/null
+++ b/sw/source/ui/docvw/SidebarTxtControl.cxx
@@ -0,0 +1,428 @@
+/************************************************************************* *
+ *
+ * DO NOT 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 <SidebarTxtControl.hxx>
+
+#include <SidebarTxtControlAcc.hxx>
+
+#include <SidebarWin.hxx>
+#include <PostItMgr.hxx>
+
+#include <cmdid.h>
+#include <docvw.hrc>
+
+#include <unotools/securityoptions.hxx>
+
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/bindings.hxx>
+#include <sfx2/dispatch.hxx>
+#include <sfx2/mnumgr.hxx>
+
+#include <vcl/svapp.hxx>
+#include <vcl/help.hxx>
+#include <vcl/msgbox.hxx>
+#include <vcl/gradient.hxx>
+#include <vcl/scrbar.hxx>
+
+#include <editeng/outliner.hxx>
+#include <editeng/editeng.hxx>
+#include <editeng/editview.hxx>
+#include <editeng/flditem.hxx>
+
+#include <uitool.hxx>
+#include <view.hxx>
+#include <wrtsh.hxx>
+#include <shellres.hxx>
+#include <SwRewriter.hxx>
+#include <undobj.hxx>
+
+namespace css = ::com::sun::star;
+
+namespace sw { namespace sidebarwindows {
+
+SidebarTxtControl::SidebarTxtControl( SwSidebarWin& rSidebarWin,
+ WinBits nBits,
+ SwView& rDocView,
+ SwPostItMgr& rPostItMgr )
+ : Control( &rSidebarWin, nBits )
+ , mrSidebarWin( rSidebarWin )
+ , mrDocView( rDocView )
+ , mrPostItMgr( rPostItMgr )
+ , mbMouseOver( false )
+{
+ AddEventListener( LINK( &mrSidebarWin, SwSidebarWin, WindowEventListener ) );
+}
+
+SidebarTxtControl::~SidebarTxtControl()
+{
+ RemoveEventListener( LINK( &mrSidebarWin, SwSidebarWin, WindowEventListener ) );
+}
+
+OutlinerView* SidebarTxtControl::GetTextView() const
+{
+ return mrSidebarWin.GetOutlinerView();
+}
+
+void SidebarTxtControl::GetFocus()
+{
+ Window::GetFocus();
+ if ( !mrSidebarWin.IsMouseOver() )
+ {
+ Invalidate();
+ }
+}
+
+void SidebarTxtControl::LoseFocus()
+{
+ // write the visible text back into the SwField
+ mrSidebarWin.UpdateData();
+
+ Window::LoseFocus();
+ if ( !mrSidebarWin.IsMouseOver() )
+ {
+ Invalidate();
+ }
+}
+
+void SidebarTxtControl::RequestHelp(const HelpEvent &rEvt)
+{
+ USHORT nResId = 0;
+ switch( mrSidebarWin.GetLayoutStatus() )
+ {
+ case SwPostItHelper::INSERTED: nResId = STR_REDLINE_INSERT; break;
+ case SwPostItHelper::DELETED: nResId = STR_REDLINE_DELETE; break;
+ default: nResId = 0;
+ }
+
+ SwContentAtPos aCntntAtPos( SwContentAtPos::SW_REDLINE );
+ if ( nResId &&
+ mrDocView.GetWrtShell().GetContentAtPos( mrSidebarWin.GetAnchorPos(), aCntntAtPos ) )
+ {
+ String sTxt;
+ sTxt = SW_RESSTR( nResId );
+ sTxt.AppendAscii( RTL_CONSTASCII_STRINGPARAM(": " ));
+ sTxt += aCntntAtPos.aFnd.pRedl->GetAuthorString();
+ sTxt.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " - " ));
+ sTxt += GetAppLangDateTimeString( aCntntAtPos.aFnd.pRedl->GetTimeStamp() );
+ Help::ShowQuickHelp( this,PixelToLogic(Rectangle(rEvt.GetMousePosPixel(),Size(50,10))),sTxt);
+ }
+}
+
+void SidebarTxtControl::Paint( const Rectangle& rRect)
+{
+ if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
+ {
+ if ( mrSidebarWin.IsMouseOverSidebarWin() ||
+ HasFocus() )
+ {
+ DrawGradient( Rectangle( Point(0,0), PixelToLogic(GetSizePixel()) ),
+ Gradient( GRADIENT_LINEAR,
+ mrSidebarWin.ColorDark(),
+ mrSidebarWin.ColorDark() ) );
+ }
+ else
+ {
+ DrawGradient( Rectangle( Point(0,0), PixelToLogic(GetSizePixel()) ),
+ Gradient( GRADIENT_LINEAR,
+ mrSidebarWin.ColorLight(),
+ mrSidebarWin.ColorDark()));
+ }
+ }
+
+ if ( GetTextView() )
+ {
+ GetTextView()->Paint( rRect );
+ }
+
+ if ( mrSidebarWin.GetLayoutStatus()==SwPostItHelper::DELETED )
+ {
+ SetLineColor(mrSidebarWin.GetChangeColor());
+ DrawLine( PixelToLogic( GetPosPixel() ),
+ PixelToLogic( GetPosPixel() +
+ Point( GetSizePixel().Width(),
+ GetSizePixel().Height() ) ) );
+ DrawLine( PixelToLogic( GetPosPixel() +
+ Point( GetSizePixel().Width(),0) ),
+ PixelToLogic( GetPosPixel() +
+ Point( 0, GetSizePixel().Height() ) ) );
+ }
+}
+
+void SidebarTxtControl::KeyInput( const KeyEvent& rKeyEvt )
+{
+ const KeyCode& rKeyCode = rKeyEvt.GetKeyCode();
+ USHORT nKey = rKeyCode.GetCode();
+ if ( ( rKeyCode.IsMod1() && rKeyCode.IsMod2() ) &&
+ ( (nKey == KEY_PAGEUP) || (nKey == KEY_PAGEDOWN) ) )
+ {
+ mrSidebarWin.SwitchToPostIt(nKey);
+ }
+ else if ( nKey == KEY_ESCAPE ||
+ ( rKeyCode.IsMod1() &&
+ ( nKey == KEY_PAGEUP ||
+ nKey == KEY_PAGEDOWN ) ) )
+ {
+ mrSidebarWin.SwitchToFieldPos();
+ }
+ else if ( nKey == KEY_INSERT )
+ {
+ if ( !rKeyCode.IsMod1() && !rKeyCode.IsMod2() )
+ {
+ mrSidebarWin.ToggleInsMode();
+ }
+ }
+ else
+ {
+ //let's make sure we see our note
+ mrPostItMgr.MakeVisible(&mrSidebarWin);
+
+ long aOldHeight = mrSidebarWin.GetPostItTextHeight();
+ bool bDone = false;
+
+ /// HACK: need to switch off processing of Undo/Redo in Outliner
+ if ( !( (nKey == KEY_Z || nKey == KEY_Y) && rKeyCode.IsMod1()) )
+ {
+ bool bIsProtected = mrSidebarWin.IsProtected();
+ if ( !bIsProtected ||
+ ( bIsProtected &&
+ !mrSidebarWin.GetOutlinerView()->GetOutliner()->GetEditEngine().DoesKeyChangeText(rKeyEvt)) )
+ {
+ bDone = GetTextView() && GetTextView()->PostKeyEvent( rKeyEvt );
+ }
+ else
+ {
+ InfoBox( this, SW_RES( MSG_READONLY_CONTENT )).Execute();
+ }
+ }
+ if (bDone)
+ mrSidebarWin.ResizeIfNeccessary( aOldHeight, mrSidebarWin.GetPostItTextHeight() );
+ else
+ {
+ // write back data first when showing navigator
+ if ( nKey==KEY_F5 )
+ mrSidebarWin.UpdateData();
+ if (!mrDocView.KeyInput(rKeyEvt))
+ Window::KeyInput(rKeyEvt);
+ }
+ }
+
+ mrDocView.GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+}
+
+void SidebarTxtControl::MouseMove( const MouseEvent& rMEvt )
+{
+ if ( GetTextView() )
+ {
+ OutlinerView* pOutlinerView( GetTextView() );
+ pOutlinerView->MouseMove( rMEvt );
+ // mba: why does OutlinerView not handle the modifier setting?!
+ // this forces the postit to handle *all* pointer types
+ SetPointer( pOutlinerView->GetPointer( rMEvt.GetPosPixel() ) );
+
+ const EditView& aEV = pOutlinerView->GetEditView();
+ const SvxFieldItem* pItem = aEV.GetFieldUnderMousePointer();
+ if ( pItem )
+ {
+ const SvxFieldData* pFld = pItem->GetField();
+ const SvxURLField* pURL = PTR_CAST( SvxURLField, pFld );
+ if ( pURL )
+ {
+ String sURL( pURL->GetURL() );
+ SvtSecurityOptions aSecOpts;
+ if ( aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK) )
+ {
+ sURL.InsertAscii( ": ", 0 );
+ sURL.Insert( ViewShell::GetShellRes()->aHyperlinkClick, 0 );
+ }
+ Help::ShowQuickHelp( this,PixelToLogic(Rectangle(GetPosPixel(),Size(50,10))),sURL);
+ }
+ }
+ }
+}
+
+void SidebarTxtControl::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ if ( GetTextView() )
+ {
+ SvtSecurityOptions aSecOpts;
+ bool bExecuteMod = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK);
+
+ if ( !bExecuteMod || (bExecuteMod && rMEvt.GetModifier() == KEY_MOD1))
+ {
+ const EditView& aEV = GetTextView()->GetEditView();
+ const SvxFieldItem* pItem = aEV.GetFieldUnderMousePointer();
+ if ( pItem )
+ {
+ const SvxFieldData* pFld = pItem->GetField();
+ const SvxURLField* pURL = PTR_CAST( SvxURLField, pFld );
+ if ( pURL )
+ {
+ GetTextView()->MouseButtonDown( rMEvt );
+ SwWrtShell &rSh = mrDocView.GetWrtShell();
+ String sURL( pURL->GetURL() );
+ String sTarget( pURL->GetTargetFrame() );
+ ::LoadURL( sURL, &rSh, URLLOAD_NOFILTER, &sTarget);
+ return;
+ }
+ }
+ }
+ }
+
+ GrabFocus();
+ if ( GetTextView() )
+ {
+ GetTextView()->MouseButtonDown( rMEvt );
+ }
+ mrDocView.GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+}
+
+void SidebarTxtControl::MouseButtonUp( const MouseEvent& rMEvt )
+{
+ if ( GetTextView() )
+ GetTextView()->MouseButtonUp( rMEvt );
+}
+
+IMPL_LINK( SidebarTxtControl, OnlineSpellCallback, SpellCallbackInfo*, pInfo )
+{
+ if ( pInfo->nCommand == SPELLCMD_STARTSPELLDLG )
+ {
+ mrDocView.GetViewFrame()->GetDispatcher()->Execute( FN_SPELL_GRAMMAR_DIALOG, SFX_CALLMODE_ASYNCHRON);
+ }
+ return 0;
+}
+
+IMPL_LINK( SidebarTxtControl, Select, Menu*, pSelMenu )
+{
+ mrSidebarWin.ExecuteCommand( pSelMenu->GetCurItemId() );
+ return 0;
+}
+
+void SidebarTxtControl::Command( const CommandEvent& rCEvt )
+{
+ if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
+ {
+ if ( !mrSidebarWin.IsProtected() &&
+ GetTextView() &&
+ GetTextView()->IsWrongSpelledWordAtPos( rCEvt.GetMousePosPixel(),TRUE ))
+ {
+ Link aLink = LINK(this, SidebarTxtControl, OnlineSpellCallback);
+ GetTextView()->ExecuteSpellPopup(rCEvt.GetMousePosPixel(),&aLink);
+ }
+ else
+ {
+ SfxPopupMenuManager* pMgr = mrDocView.GetViewFrame()->GetDispatcher()->Popup(0, this,&rCEvt.GetMousePosPixel());
+ ((PopupMenu*)pMgr->GetSVMenu())->SetSelectHdl( LINK(this, SidebarTxtControl, Select) );
+
+ {
+ XubString aText = ((PopupMenu*)pMgr->GetSVMenu())->GetItemText( FN_DELETE_NOTE_AUTHOR );
+ SwRewriter aRewriter;
+ aRewriter.AddRule(UNDO_ARG1, mrSidebarWin.GetAuthor());
+ aText = aRewriter.Apply(aText);
+ ((PopupMenu*)pMgr->GetSVMenu())->SetItemText(FN_DELETE_NOTE_AUTHOR,aText);
+ }
+
+ Point aPos;
+ if (rCEvt.IsMouseEvent())
+ aPos = rCEvt.GetMousePosPixel();
+ else
+ {
+ const Size aSize = GetSizePixel();
+ aPos = Point( aSize.getWidth()/2, aSize.getHeight()/2 );
+ }
+
+ //!! call different Execute function to get rid of the new thesaurus sub menu
+ //!! pointer created in the call to Popup.
+ //!! Otherwise we would have a memory leak (see also #i107205#)
+ //((PopupMenu*)pMgr->GetSVMenu())->Execute( this, aPos );
+ pMgr->Execute( aPos, this );
+ delete pMgr;
+ }
+ }
+ else
+ if (rCEvt.GetCommand() == COMMAND_WHEEL)
+ {
+ if (mrSidebarWin.IsScrollbarVisible())
+ {
+ const CommandWheelData* pData = rCEvt.GetWheelData();
+ if (pData->IsShift() || pData->IsMod1() || pData->IsMod2())
+ {
+ mrDocView.HandleWheelCommands(rCEvt);
+ }
+ else
+ {
+ HandleScrollCommand( rCEvt, 0 , mrSidebarWin.Scrollbar());
+ }
+ }
+ else
+ {
+ mrDocView.HandleWheelCommands(rCEvt);
+ }
+ }
+ else
+ {
+ if ( GetTextView() )
+ GetTextView()->Command( rCEvt );
+ else
+ Window::Command(rCEvt);
+ }
+}
+
+XubString SidebarTxtControl::GetSurroundingText() const
+{
+ if( GetTextView() )
+ return GetTextView()->GetSurroundingText();
+ else
+ return XubString::EmptyString();
+}
+
+Selection SidebarTxtControl::GetSurroundingTextSelection() const
+{
+ if( GetTextView() )
+ return GetTextView()->GetSurroundingTextSelection();
+ else
+ return Selection( 0, 0 );
+}
+
+css::uno::Reference< css::accessibility::XAccessible > SidebarTxtControl::CreateAccessible()
+{
+
+ SidebarTxtControlAccessible* pAcc( new SidebarTxtControlAccessible( *this ) );
+ css::uno::Reference< css::awt::XWindowPeer > xWinPeer( pAcc );
+ SetWindowPeer( xWinPeer, pAcc );
+
+ css::uno::Reference< css::accessibility::XAccessible > xAcc( xWinPeer, css::uno::UNO_QUERY );
+ return xAcc;
+}
+
+} } // end of namespace sw::sidebarwindows
+
diff --git a/sw/source/ui/docvw/SidebarTxtControl.hxx b/sw/source/ui/docvw/SidebarTxtControl.hxx
new file mode 100644
index 0000000000..ba517fff6b
--- /dev/null
+++ b/sw/source/ui/docvw/SidebarTxtControl.hxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ *
+ * $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 _SIDEBARTXTCONTROL_HXX
+#define _SIDEBARTXTCONTROL_HXX
+
+#include <vcl/ctrl.hxx>
+
+class OutlinerView;
+class SwView;
+class SwPostItMgr;
+class SpellCallbackInfo;
+
+namespace sw { namespace sidebarwindows {
+
+class SwSidebarWin;
+
+class SidebarTxtControl : public Control
+{
+ private:
+ SwSidebarWin& mrSidebarWin;
+ SwView& mrDocView;
+ SwPostItMgr& mrPostItMgr;
+
+ bool mbMouseOver;
+
+ protected:
+ virtual void Paint( const Rectangle& rRect);
+ virtual void KeyInput( const KeyEvent& rKeyEvt );
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+ virtual void Command( const CommandEvent& rCEvt );
+ virtual void LoseFocus();
+ virtual void RequestHelp(const HelpEvent &rEvt);
+ virtual XubString GetSurroundingText() const;
+ virtual Selection GetSurroundingTextSelection() const;
+
+ DECL_LINK( Select, Menu* );
+
+ public:
+ SidebarTxtControl( SwSidebarWin& rSidebarWin,
+ WinBits nBits,
+ SwView& rDocView,
+ SwPostItMgr& rPostItMgr );
+ ~SidebarTxtControl();
+
+ virtual void GetFocus();
+
+ OutlinerView* GetTextView() const;
+
+ DECL_LINK( OnlineSpellCallback, SpellCallbackInfo*);
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
+};
+
+} } // end of namespace sw::sidebarwindows
+
+#endif
diff --git a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx
new file mode 100644
index 0000000000..8b0f029336
--- /dev/null
+++ b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx
@@ -0,0 +1,317 @@
+/************************************************************************* *
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ * $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 <SidebarTxtControlAcc.hxx>
+
+#include <SidebarTxtControl.hxx>
+
+#include <svl/brdcst.hxx>
+#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+#include <editeng/unoedsrc.hxx>
+#include <editeng/unoforou.hxx>
+#include <editeng/unoviwou.hxx>
+#include <editeng/unoedhlp.hxx>
+#include <svx/AccessibleTextHelper.hxx>
+#include <editeng/outliner.hxx>
+
+
+namespace css = ::com::sun::star;
+
+namespace sw { namespace sidebarwindows {
+
+// =============================================================================
+// declaration and implementation of <SvxEditSource>
+// for <::accessibiliy::AccessibleTextHelper> instance
+// =============================================================================
+class SidebarTextEditSource : public SvxEditSource,
+ public SfxBroadcaster
+{
+ public:
+ SidebarTextEditSource( SidebarTxtControl& rSidebarTxtControl );
+ virtual ~SidebarTextEditSource();
+
+ virtual SvxEditSource* Clone() const;
+
+ virtual SvxTextForwarder* GetTextForwarder();
+ virtual SvxViewForwarder* GetViewForwarder();
+ virtual SvxEditViewForwarder* GetEditViewForwarder( sal_Bool bCreate = sal_False );
+
+ virtual void UpdateData();
+
+ virtual SfxBroadcaster& GetBroadcaster() const;
+ DECL_LINK( NotifyHdl, EENotify* );
+
+ private:
+ SidebarTxtControl& mrSidebarTxtControl;
+ SvxOutlinerForwarder mTextForwarder;
+ SvxDrawOutlinerViewForwarder mViewForwarder;
+};
+
+SidebarTextEditSource::SidebarTextEditSource( SidebarTxtControl& rSidebarTxtControl )
+ : SvxEditSource()
+ , mrSidebarTxtControl( rSidebarTxtControl )
+ , mTextForwarder( *(rSidebarTxtControl.GetTextView()->GetOutliner()), NULL )
+ , mViewForwarder( *(rSidebarTxtControl.GetTextView()) )
+{
+ if ( mrSidebarTxtControl.GetTextView() )
+ {
+ mrSidebarTxtControl.GetTextView()->GetOutliner()->SetNotifyHdl( LINK(this, SidebarTextEditSource, NotifyHdl) );
+ }
+}
+
+SidebarTextEditSource::~SidebarTextEditSource()
+{
+ if ( mrSidebarTxtControl.GetTextView() )
+ {
+ mrSidebarTxtControl.GetTextView()->GetOutliner()->SetNotifyHdl( Link() );
+ }
+}
+
+SvxEditSource* SidebarTextEditSource::Clone() const
+{
+ return new SidebarTextEditSource( mrSidebarTxtControl );
+}
+
+SvxTextForwarder* SidebarTextEditSource::GetTextForwarder()
+{
+ return &mTextForwarder;
+}
+
+SvxViewForwarder* SidebarTextEditSource::GetViewForwarder()
+{
+ return &mViewForwarder;
+}
+
+SvxEditViewForwarder* SidebarTextEditSource::GetEditViewForwarder( sal_Bool /*bCreate*/ )
+{
+ return &mViewForwarder;
+}
+
+void SidebarTextEditSource::UpdateData()
+{
+ // nothing to do
+}
+
+SfxBroadcaster& SidebarTextEditSource::GetBroadcaster() const
+{
+ return *( const_cast< SidebarTextEditSource* > (this) );
+}
+
+IMPL_LINK(SidebarTextEditSource, NotifyHdl, EENotify*, pNotify)
+{
+ if ( pNotify )
+ {
+ ::std::auto_ptr< SfxHint > aHint( SvxEditSourceHelper::EENotification2Hint( pNotify ) );
+
+ if( aHint.get() )
+ {
+ Broadcast( *aHint.get() );
+ }
+ }
+
+ return 0;
+}
+
+
+// =============================================================================
+// declaration and implementation of accessible context for <SidebarTxtControl> instance
+// =============================================================================
+class SidebarTxtControlAccessibleContext : public VCLXAccessibleComponent
+{
+ public:
+ explicit SidebarTxtControlAccessibleContext( SidebarTxtControl& rSidebarTxtControl );
+ virtual ~SidebarTxtControlAccessibleContext();
+
+ virtual sal_Int32 SAL_CALL
+ getAccessibleChildCount()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleChild( sal_Int32 i )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ using WeakAggComponentImplHelperBase::addEventListener;
+ using WeakAggComponentImplHelperBase::removeEventListener;
+
+ 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);
+
+ protected:
+ virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
+
+ private:
+ SidebarTxtControl& mrSidebarTxtControl;
+ ::accessibility::AccessibleTextHelper* mpAccessibleTextHelper;
+
+ ::vos::OMutex maMutex;
+
+ void defunc();
+};
+
+SidebarTxtControlAccessibleContext::SidebarTxtControlAccessibleContext( SidebarTxtControl& rSidebarTxtControl )
+ : VCLXAccessibleComponent( rSidebarTxtControl.GetWindowPeer() )
+ , mrSidebarTxtControl( rSidebarTxtControl )
+ , mpAccessibleTextHelper( 0 )
+ , maMutex()
+{
+ ::std::auto_ptr<SvxEditSource> pEditSource(
+ new SidebarTextEditSource( mrSidebarTxtControl ) );
+ mpAccessibleTextHelper = new ::accessibility::AccessibleTextHelper( pEditSource );
+ mpAccessibleTextHelper->SetEventSource( mrSidebarTxtControl.GetWindowPeer() );
+}
+
+SidebarTxtControlAccessibleContext::~SidebarTxtControlAccessibleContext()
+{
+ defunc();
+}
+
+void SidebarTxtControlAccessibleContext::defunc()
+{
+ delete mpAccessibleTextHelper;
+ mpAccessibleTextHelper = 0;
+}
+
+sal_Int32 SAL_CALL SidebarTxtControlAccessibleContext::getAccessibleChildCount()
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ vos::OGuard aGuard( maMutex );
+
+ sal_Int32 nChildCount( 0 );
+
+ if ( mpAccessibleTextHelper )
+ {
+ nChildCount = mpAccessibleTextHelper->GetChildCount();
+ }
+
+ return nChildCount;
+}
+
+css::uno::Reference< css::accessibility::XAccessible > SAL_CALL SidebarTxtControlAccessibleContext::getAccessibleChild( sal_Int32 i )
+ throw ( css::lang::IndexOutOfBoundsException, css::uno::RuntimeException )
+{
+ vos::OGuard aGuard( maMutex );
+
+ css::uno::Reference< css::accessibility::XAccessible > xChild;
+
+ if ( mpAccessibleTextHelper )
+ {
+ xChild = mpAccessibleTextHelper->GetChild( i );
+ }
+
+ return xChild;
+}
+
+void SAL_CALL SidebarTxtControlAccessibleContext::addEventListener (
+ const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener)
+ throw (css::uno::RuntimeException)
+{
+ vos::OGuard aGuard( maMutex );
+
+ if ( mpAccessibleTextHelper )
+ {
+ mpAccessibleTextHelper->AddEventListener(xListener);
+ }
+}
+
+void SAL_CALL SidebarTxtControlAccessibleContext::removeEventListener (
+ const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener)
+ throw (css::uno::RuntimeException)
+{
+ vos::OGuard aGuard( maMutex );
+
+ if ( mpAccessibleTextHelper )
+ {
+ mpAccessibleTextHelper->RemoveEventListener(xListener);
+ }
+}
+
+void SidebarTxtControlAccessibleContext::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
+{
+ if ( mpAccessibleTextHelper )
+ {
+ switch ( rVclWindowEvent.GetId() )
+ {
+ case VCLEVENT_OBJECT_DYING:
+ {
+ defunc();
+ }
+ break;
+ case VCLEVENT_WINDOW_GETFOCUS:
+ case VCLEVENT_CONTROL_GETFOCUS:
+ {
+ mpAccessibleTextHelper->SetFocus( sal_True );
+ }
+ break;
+ case VCLEVENT_WINDOW_LOSEFOCUS:
+ case VCLEVENT_CONTROL_LOSEFOCUS:
+ {
+ mpAccessibleTextHelper->SetFocus( sal_False );
+ }
+ break;
+ }
+ }
+
+ VCLXAccessibleComponent::ProcessWindowEvent( rVclWindowEvent );
+}
+
+// =============================================================================
+// implementaion of accessible for <SidebarTxtControl> instance
+// =============================================================================
+SidebarTxtControlAccessible::SidebarTxtControlAccessible( SidebarTxtControl& rSidebarTxtControl )
+ : VCLXWindow()
+ , mrSidebarTxtControl( rSidebarTxtControl )
+{
+ SetWindow( &mrSidebarTxtControl );
+}
+
+SidebarTxtControlAccessible::~SidebarTxtControlAccessible()
+{
+}
+
+css::uno::Reference< css::accessibility::XAccessibleContext > SidebarTxtControlAccessible::CreateAccessibleContext()
+{
+ SidebarTxtControlAccessibleContext* pAccContext(
+ new SidebarTxtControlAccessibleContext( mrSidebarTxtControl ) );
+ css::uno::Reference< css::accessibility::XAccessibleContext > xAcc( pAccContext );
+ return xAcc;
+}
+
+} } // end of namespace sw::sidebarwindows
+
diff --git a/sw/source/ui/docvw/SidebarTxtControlAcc.hxx b/sw/source/ui/docvw/SidebarTxtControlAcc.hxx
new file mode 100644
index 0000000000..57edc50512
--- /dev/null
+++ b/sw/source/ui/docvw/SidebarTxtControlAcc.hxx
@@ -0,0 +1,56 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ *
+ * $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 _SIDEBARTXTCONTROLACC_HXX
+#define _SIDEBARTXTCONTROLACC_HXX
+
+#include <toolkit/awt/vclxwindow.hxx>
+
+namespace sw { namespace sidebarwindows {
+
+class SidebarTxtControl;
+
+class SidebarTxtControlAccessible : public VCLXWindow
+{
+ public:
+ explicit SidebarTxtControlAccessible( SidebarTxtControl& rSidebarTxtControl );
+ virtual ~SidebarTxtControlAccessible();
+
+ virtual com::sun::star::uno::Reference< com::sun::star::accessibility::XAccessibleContext >
+ CreateAccessibleContext();
+
+ private:
+ SidebarTxtControl& mrSidebarTxtControl;
+};
+
+} } // end of namespace sw::sidebarwindows
+
+#endif
diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx
new file mode 100755
index 0000000000..cce6db3a89
--- /dev/null
+++ b/sw/source/ui/docvw/SidebarWin.cxx
@@ -0,0 +1,1373 @@
+/************************************************************************* *
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 <SidebarWin.hxx>
+#include <SidebarWinAcc.hxx>
+#include <PostItMgr.hxx>
+
+#include <SidebarTxtControl.hxx>
+#include <AnchorOverlayObject.hxx>
+#include <ShadowOverlayObject.hxx>
+
+#include <annotation.hrc>
+#include <popup.hrc>
+#include <docvw.hrc>
+#include <app.hrc>
+#include <access.hrc>
+
+#include <viewopt.hxx>
+#include <cmdid.h>
+
+#include <editeng/fontitem.hxx>
+#include <editeng/fhgtitem.hxx>
+#include <editeng/langitem.hxx>
+#include <editeng/editview.hxx>
+#include <editeng/outliner.hxx>
+#include <editeng/editeng.hxx>
+#include <editeng/eeitem.hxx>
+
+#include <svl/zforlist.hxx>
+#include <svl/undo.hxx>
+#include <svl/stritem.hxx>
+
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/bindings.hxx>
+#include <sfx2/dispatch.hxx>
+
+#include <vcl/scrbar.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/menubtn.hxx>
+
+#include <edtwin.hxx>
+#include <view.hxx>
+#include <docsh.hxx>
+#include <wrtsh.hxx>
+#include <doc.hxx>
+#include <swmodule.hxx>
+#include <langhelper.hxx>
+
+#include <sw_primitivetypes2d.hxx>
+#include <drawinglayer/primitive2d/primitivetools2d.hxx>
+#include <drawinglayer/primitive2d/fillgradientprimitive2d.hxx>
+#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
+#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
+#include <drawinglayer/primitive2d/shadowprimitive2d.hxx>
+
+namespace css = ::com::sun::star;
+
+namespace sw { namespace sidebarwindows {
+
+#define METABUTTON_WIDTH 16
+#define METABUTTON_HEIGHT 18
+#define METABUTTON_AREA_WIDTH 30
+#define POSTIT_META_HEIGHT (sal_Int32) 30
+#define POSTIT_MINIMUMSIZE_WITHOUT_META 50
+
+#define POSTIT_SHADOW_BRIGHT Color(180,180,180)
+#define POSTIT_SHADOW_DARK Color(83,83,83)
+
+#define EMPTYSTRING rtl::OUString::createFromAscii("")
+
+/************** SwSidebarWin************************************/
+SwSidebarWin::SwSidebarWin( SwEditWin& rEditWin,
+ WinBits nBits,
+ SwPostItMgr& aMgr,
+ SwPostItBits aBits,
+ SwSidebarItem& rSidebarItem )
+ : Window(&rEditWin, nBits)
+ , mrMgr(aMgr)
+ , mrView( rEditWin.GetView() )
+ , nFlags(aBits)
+ , mnEventId(0)
+ , mpOutlinerView(0)
+ , mpOutliner(0)
+ , mpSidebarTxtControl(0)
+ , mpVScrollbar(0)
+ , mpMetadataAuthor(0)
+ , mpMetadataDate(0)
+ , mpMenuButton(0)
+ , mpAnchor(0)
+ , mpShadow(0)
+ , mColorAnchor()
+ , mColorDark()
+ , mColorLight()
+ , mChangeColor()
+ , meSidebarPosition( sw::sidebarwindows::SIDEBAR_NONE )
+ , mPosSize()
+ , mAnchorRect()
+ , mPageBorder( 0 )
+ , mbMouseOver( false )
+ , mLayoutStatus( SwPostItHelper::INVISIBLE )
+ , mbReadonly( false )
+ , mbIsFollow( false )
+ , mrSidebarItem( rSidebarItem )
+ , mpAnchorFrm( rSidebarItem.maLayoutInfo.mpAnchorFrm )
+{
+ mpShadow = ShadowOverlayObject::CreateShadowOverlayObject( mrView );
+ if ( mpShadow )
+ {
+ mpShadow->setVisible(false);
+ }
+
+ mrMgr.ConnectSidebarWinToFrm( *(mrSidebarItem.maLayoutInfo.mpAnchorFrm),
+ *(mrSidebarItem.GetFmtFld()),
+ *this );
+}
+
+SwSidebarWin::~SwSidebarWin()
+{
+ mrMgr.DisconnectSidebarWinFromFrm( *(mrSidebarItem.maLayoutInfo.mpAnchorFrm),
+ *this );
+
+ Disable();
+
+ if ( mpSidebarTxtControl )
+ {
+ if ( mpOutlinerView )
+ {
+ mpOutlinerView->SetWindow( 0 );
+ }
+ delete mpSidebarTxtControl;
+ mpSidebarTxtControl = 0;
+ }
+
+ if ( mpOutlinerView )
+ {
+ delete mpOutlinerView;
+ mpOutlinerView = 0;
+ }
+
+ if (mpOutliner)
+ {
+ delete mpOutliner;
+ mpOutliner = 0;
+ }
+
+ if (mpMetadataAuthor)
+ {
+ mpMetadataAuthor->RemoveEventListener( LINK( this, SwSidebarWin, WindowEventListener ) );
+ delete mpMetadataAuthor;
+ mpMetadataAuthor = 0;
+ }
+
+ if (mpMetadataDate)
+ {
+ mpMetadataDate->RemoveEventListener( LINK( this, SwSidebarWin, WindowEventListener ) );
+ delete mpMetadataDate;
+ mpMetadataDate = 0;
+ }
+
+ if (mpVScrollbar)
+ {
+ mpVScrollbar->RemoveEventListener( LINK( this, SwSidebarWin, WindowEventListener ) );
+ delete mpVScrollbar;
+ mpVScrollbar = 0;
+ }
+
+ AnchorOverlayObject::DestroyAnchorOverlayObject( mpAnchor );
+ mpAnchor = 0;
+
+ ShadowOverlayObject::DestroyShadowOverlayObject( mpShadow );
+ mpShadow = 0;
+
+ delete mpMenuButton;
+ mpMenuButton = 0;
+
+ if (mnEventId)
+ Application::RemoveUserEvent( mnEventId );
+}
+
+void SwSidebarWin::Paint( const Rectangle& rRect)
+{
+ Window::Paint(rRect);
+
+ if (mpMetadataAuthor->IsVisible() )
+ {
+ //draw left over space
+ if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
+ {
+ SetFillColor(COL_BLACK);
+ }
+ else
+ {
+ SetFillColor(mColorDark);
+ }
+ SetLineColor();
+ DrawRect( PixelToLogic(
+ Rectangle( Point( mpMetadataAuthor->GetPosPixel().X() +
+ mpMetadataAuthor->GetSizePixel().Width(),
+ mpMetadataAuthor->GetPosPixel().Y() ),
+ Size( GetMetaButtonAreaWidth(),
+ mpMetadataAuthor->GetSizePixel().Height() +
+ mpMetadataDate->GetSizePixel().Height() ) ) ) );
+ }
+}
+
+void SwSidebarWin::SetPosSizePixelRect( long nX,
+ long nY,
+ long nWidth,
+ long nHeight,
+ const SwRect &aRect,
+ const long aPageBorder)
+{
+ mPosSize = Rectangle(Point(nX,nY),Size(nWidth,nHeight));
+ mAnchorRect = aRect;
+ mPageBorder = aPageBorder;
+}
+
+void SwSidebarWin::SetSize( const Size& rNewSize )
+{
+ mPosSize.SetSize(rNewSize);
+}
+
+void SwSidebarWin::SetVirtualPosSize( const Point& aPoint, const Size& aSize)
+{
+ mPosSize = Rectangle(aPoint,aSize);
+}
+
+void SwSidebarWin::TranslateTopPosition(const long aAmount)
+{
+ mPosSize.Move(0,aAmount);
+}
+
+void SwSidebarWin::ShowAnchorOnly(const Point &aPoint)
+{
+ HideNote();
+ SetPosAndSize();
+ if (mpAnchor)
+ {
+ mpAnchor->SetSixthPosition(basegfx::B2DPoint(aPoint.X(),aPoint.Y()));
+ mpAnchor->SetSeventhPosition(basegfx::B2DPoint(aPoint.X(),aPoint.Y()));
+ mpAnchor->SetAnchorState(AS_ALL);
+ mpAnchor->setVisible(true);
+ }
+ if (mpShadow)
+ mpShadow->setVisible(false);
+}
+
+SfxItemSet SwSidebarWin::DefaultItem()
+{
+ SfxItemSet aItem( mrView.GetDocShell()->GetPool() );
+ aItem.Put(SvxFontHeightItem(200,100,EE_CHAR_FONTHEIGHT));
+ aItem.Put(SvxFontItem(FAMILY_SWISS,GetSettings().GetStyleSettings().GetFieldFont().GetName(),
+ EMPTYSTRING,PITCH_DONTKNOW,RTL_TEXTENCODING_DONTKNOW,EE_CHAR_FONTINFO));
+ return aItem;
+}
+
+void SwSidebarWin::InitControls()
+{
+ AddEventListener( LINK( this, SwSidebarWin, WindowEventListener ) );
+
+ // actual window which holds the user text
+ mpSidebarTxtControl = new SidebarTxtControl( *this,
+ WB_NODIALOGCONTROL,
+ mrView, mrMgr );
+ mpSidebarTxtControl->SetPointer(Pointer(POINTER_TEXT));
+
+ // window controls for author and date
+ mpMetadataAuthor = new Edit( this, 0 );
+ mpMetadataAuthor->SetAccessibleName( SW_RES( STR_ACCESS_ANNOTATION_AUTHOR_NAME ) );
+ mpMetadataAuthor->SetReadOnly();
+ mpMetadataAuthor->AlwaysDisableInput(true);
+ mpMetadataAuthor->SetCallHandlersOnInputDisabled(true);
+ mpMetadataAuthor->AddEventListener( LINK( this, SwSidebarWin, WindowEventListener ) );
+ // we should leave this setting alone, but for this we need a better layout algo
+ // with variable meta size height
+ {
+ AllSettings aSettings = mpMetadataAuthor->GetSettings();
+ StyleSettings aStyleSettings = aSettings.GetStyleSettings();
+ Font aFont = aStyleSettings.GetFieldFont();
+ aFont.SetHeight(8);
+ aStyleSettings.SetFieldFont(aFont);
+ aSettings.SetStyleSettings(aStyleSettings);
+ mpMetadataAuthor->SetSettings(aSettings);
+ }
+
+ mpMetadataDate = new Edit( this, 0 );
+ mpMetadataDate->SetAccessibleName( SW_RES( STR_ACCESS_ANNOTATION_DATE_NAME ) );
+ mpMetadataDate->SetReadOnly();
+ mpMetadataDate->AlwaysDisableInput(true);
+ mpMetadataDate->SetCallHandlersOnInputDisabled(true);
+ mpMetadataDate->AddEventListener( LINK( this, SwSidebarWin, WindowEventListener ) );
+ // we should leave this setting alone, but for this we need a better layout algo
+ // with variable meta size height
+ {
+ AllSettings aSettings = mpMetadataDate->GetSettings();
+ StyleSettings aStyleSettings = aSettings.GetStyleSettings();
+ Font aFont = aStyleSettings.GetFieldFont();
+ aFont.SetHeight(8);
+ aStyleSettings.SetFieldFont(aFont);
+ aSettings.SetStyleSettings(aStyleSettings);
+ mpMetadataDate->SetSettings(aSettings);
+ }
+
+
+ SwDocShell* aShell = mrView.GetDocShell();
+ mpOutliner = new Outliner(&aShell->GetPool(),OUTLINERMODE_TEXTOBJECT);
+ aShell->GetDoc()->SetCalcFieldValueHdl( mpOutliner );
+ mpOutliner->SetUpdateMode( TRUE );
+ Rescale();
+
+ OutputDevice* pDev = aShell->GetDoc()->getReferenceDevice(TRUE);
+ if ( pDev )
+ {
+ mpOutliner->SetRefDevice( pDev );
+ }
+
+ mpOutlinerView = new OutlinerView ( mpOutliner, mpSidebarTxtControl );
+ mpOutlinerView->SetBackgroundColor(COL_TRANSPARENT);
+ mpOutliner->InsertView(mpOutlinerView );
+ mpOutlinerView->SetOutputArea( PixelToLogic( Rectangle(0,0,1,1) ) );
+
+ mpOutlinerView->SetAttribs(DefaultItem());
+
+ // TODO: ??
+ EEHorizontalTextDirection aDefHoriTextDir = Application::GetSettings().GetLayoutRTL() ? EE_HTEXTDIR_R2L : EE_HTEXTDIR_L2R;
+ mpOutliner->SetDefaultHorizontalTextDirection( aDefHoriTextDir );
+
+ //create Scrollbars
+ mpVScrollbar = new ScrollBar(this, WB_3DLOOK |WB_VSCROLL|WB_DRAG);
+ mpVScrollbar->EnableNativeWidget(false);
+ mpVScrollbar->EnableRTL( false );
+ mpVScrollbar->SetScrollHdl(LINK(this, SwSidebarWin, ScrollHdl));
+ mpVScrollbar->EnableDrag();
+ mpVScrollbar->AddEventListener( LINK( this, SwSidebarWin, WindowEventListener ) );
+
+ const SwViewOption* pVOpt = mrView.GetWrtShellPtr()->GetViewOptions();
+ ULONG nCntrl = mpOutliner->GetControlWord();
+ // TODO: crash when AUTOCOMPLETE enabled
+ nCntrl |= EE_CNTRL_MARKFIELDS | EE_CNTRL_PASTESPECIAL | EE_CNTRL_AUTOCORRECT | EV_CNTRL_AUTOSCROLL | EE_CNTRL_URLSFXEXECUTE; // | EE_CNTRL_AUTOCOMPLETE;
+ if (pVOpt->IsFieldShadings())
+ nCntrl |= EE_CNTRL_MARKFIELDS;
+ else
+ nCntrl &= ~EE_CNTRL_MARKFIELDS;
+ if (pVOpt->IsOnlineSpell())
+ nCntrl |= EE_CNTRL_ONLINESPELLING;
+ else
+ nCntrl &= ~EE_CNTRL_ONLINESPELLING;
+ mpOutliner->SetControlWord(nCntrl);
+
+ sal_uInt16 aIndex = SW_MOD()->InsertRedlineAuthor(GetAuthor());
+ SetColor( mrMgr.GetColorDark(aIndex),
+ mrMgr.GetColorLight(aIndex),
+ mrMgr.GetColorAnchor(aIndex));
+
+ CheckMetaText();
+
+ mpMenuButton = CreateMenuButton();
+
+ SetLanguage(GetLanguage());
+ GetOutlinerView()->StartSpeller();
+ SetPostItText();
+ Engine()->CompleteOnlineSpelling();
+
+ mpSidebarTxtControl->Show();
+ mpMetadataAuthor->Show();
+ mpMetadataDate->Show();
+ mpVScrollbar->Show();
+}
+
+void SwSidebarWin::CheckMetaText()
+{
+ const LocaleDataWrapper& rLocalData = SvtSysLocale().GetLocaleData();
+ String sMeta = GetAuthor();
+ if (sMeta.Len() == 0)
+ {
+ sMeta = String(SW_RES(STR_NOAUTHOR));
+ }
+ else if (sMeta.Len() > 22)
+ {
+ sMeta.Erase(20);
+ sMeta = sMeta + rtl::OUString::createFromAscii("...");
+ }
+ if ( mpMetadataAuthor->GetText() != sMeta )
+ {
+ mpMetadataAuthor->SetText(sMeta);
+ }
+
+ Date aDate = GetDate();
+ if (aDate==Date())
+ {
+ sMeta = String(SW_RES(STR_POSTIT_TODAY));
+ }
+ else if (aDate == Date(Date()-1))
+ {
+ sMeta = String(SW_RES(STR_POSTIT_YESTERDAY));
+ }
+ else if (aDate.IsValid() )
+ {
+ sMeta = rLocalData.getDate(aDate);
+ }
+ else
+ {
+ sMeta = String(SW_RES(STR_NODATE));
+ }
+ if (GetTime()!=0)
+ {
+ sMeta = sMeta + rtl::OUString::createFromAscii(" ") + rLocalData.getTime( GetTime(),false );
+ }
+ if ( mpMetadataDate->GetText() != sMeta )
+ {
+ mpMetadataDate->SetText(sMeta);
+ }
+
+}
+
+void SwSidebarWin::Rescale()
+{
+ MapMode aMode = GetParent()->GetMapMode();
+ aMode.SetOrigin( Point() );
+ mpOutliner->SetRefMapMode( aMode );
+ SetMapMode( aMode );
+ mpSidebarTxtControl->SetMapMode( aMode );
+ if ( mpMetadataAuthor )
+ {
+ Font aFont( mpMetadataAuthor->GetSettings().GetStyleSettings().GetFieldFont() );
+ sal_Int32 nHeight = aFont.GetHeight();
+ nHeight = nHeight * aMode.GetScaleY().GetNumerator() / aMode.GetScaleY().GetDenominator();
+ aFont.SetHeight( nHeight );
+ mpMetadataAuthor->SetControlFont( aFont );
+ }
+ if ( mpMetadataDate )
+ {
+ Font aFont( mpMetadataDate->GetSettings().GetStyleSettings().GetFieldFont() );
+ sal_Int32 nHeight = aFont.GetHeight();
+ nHeight = nHeight * aMode.GetScaleY().GetNumerator() / aMode.GetScaleY().GetDenominator();
+ aFont.SetHeight( nHeight );
+ mpMetadataDate->SetControlFont( aFont );
+ }
+}
+
+void SwSidebarWin::SetPosAndSize()
+{
+ bool bChange = false;
+
+ if (GetSizePixel() != mPosSize.GetSize())
+ {
+ bChange = true;
+ SetSizePixel(mPosSize.GetSize());
+ DoResize();
+ }
+
+ if (GetPosPixel().X() != mPosSize.TopLeft().X() || (abs(GetPosPixel().Y() - mPosSize.TopLeft().Y()) > 5) )
+ {
+ bChange = true;
+ SetPosPixel(mPosSize.TopLeft());
+
+ Point aLineStart;
+ Point aLineEnd ;
+ switch ( meSidebarPosition )
+ {
+ case sw::sidebarwindows::SIDEBAR_LEFT:
+ {
+ aLineStart = EditWin()->PixelToLogic( Point(GetPosPixel().X()+GetSizePixel().Width(),GetPosPixel().Y()-1) );
+ aLineEnd = EditWin()->PixelToLogic( Point(GetPosPixel().X(),GetPosPixel().Y()-1) );
+ }
+ break;
+ case sw::sidebarwindows::SIDEBAR_RIGHT:
+ {
+ aLineStart = EditWin()->PixelToLogic( Point(GetPosPixel().X(),GetPosPixel().Y()-1) );
+ aLineEnd = EditWin()->PixelToLogic( Point(GetPosPixel().X()+GetSizePixel().Width(),GetPosPixel().Y()-1) );
+ }
+ break;
+ default:
+ ASSERT( false,
+ "<SwSidebarWin::SetPosAndSize()> - unexpected position of sidebar" );
+ break;
+ }
+
+ if (!IsPreview())
+ {
+ if (mpAnchor)
+ {
+ mpAnchor->SetAllPosition( basegfx::B2DPoint( mAnchorRect.Left() , mAnchorRect.Bottom() - 5* 15),
+ basegfx::B2DPoint( mAnchorRect.Left()-5*15 , mAnchorRect.Bottom()+5*15),
+ basegfx::B2DPoint( mAnchorRect.Left()+5*15 , mAnchorRect.Bottom()+5*15),
+ basegfx::B2DPoint( mAnchorRect.Left(), mAnchorRect.Bottom()+2*15),
+ basegfx::B2DPoint( mPageBorder ,mAnchorRect.Bottom()+2*15),
+ basegfx::B2DPoint( aLineStart.X(),aLineStart.Y()),
+ basegfx::B2DPoint( aLineEnd.X(),aLineEnd.Y()));
+ mpAnchor->SetHeight(mAnchorRect.Height());
+ }
+ else
+ {
+ mpAnchor = AnchorOverlayObject::CreateAnchorOverlayObject( mrView,
+ mAnchorRect,
+ mPageBorder,
+ aLineStart,
+ aLineEnd,
+ mColorAnchor );
+ if ( mpAnchor )
+ {
+ mpAnchor->SetHeight(mAnchorRect.Height());
+ mpAnchor->setVisible(true);
+ mpAnchor->SetAnchorState(AS_TRI);
+ if (HasChildPathFocus())
+ {
+ mpAnchor->setLineSolid(true);
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ if ( mpAnchor &&
+ ( mpAnchor->getBasePosition() != basegfx::B2DPoint( mAnchorRect.Left() , mAnchorRect.Bottom()-5*15) ) )
+ {
+ mpAnchor->SetTriPosition( basegfx::B2DPoint( mAnchorRect.Left() , mAnchorRect.Bottom() - 5* 15),
+ basegfx::B2DPoint( mAnchorRect.Left()-5*15 , mAnchorRect.Bottom()+5*15),
+ basegfx::B2DPoint( mAnchorRect.Left()+5*15 , mAnchorRect.Bottom()+5*15),
+ basegfx::B2DPoint( mAnchorRect.Left(), mAnchorRect.Bottom()+2*15),
+ basegfx::B2DPoint( mPageBorder , mAnchorRect.Bottom()+2*15));
+ }
+ }
+
+ if (bChange)
+ {
+ Point aStart = EditWin()->PixelToLogic(GetPosPixel()+Point(0,GetSizePixel().Height()));
+ Point aEnd = EditWin()->PixelToLogic(GetPosPixel()+Point(GetSizePixel().Width()-1,GetSizePixel().Height()));
+ mpShadow->SetPosition(basegfx::B2DPoint(aStart.X(),aStart.Y()), basegfx::B2DPoint(aEnd.X(),aEnd.Y()));
+ }
+
+ if (mrMgr.ShowNotes())
+ {
+ if (IsFollow() && !HasChildPathFocus())
+ {
+ mpAnchor->SetAnchorState(AS_END);
+ }
+ else
+ {
+ mpAnchor->SetAnchorState(AS_ALL);
+ SwSidebarWin* pWin = GetTopReplyNote();
+ if (pWin)
+ pWin->Anchor()->SetAnchorState(AS_END);
+ }
+ }
+}
+
+void SwSidebarWin::DoResize()
+{
+ long aTextHeight = LogicToPixel( mpOutliner->CalcTextSize()).Height();
+ long aHeight = GetSizePixel().Height();
+ unsigned long aWidth = GetSizePixel().Width();
+
+ aHeight -= GetMetaHeight();
+ mpMetadataAuthor->Show();
+ mpMetadataDate->Show();
+ mpSidebarTxtControl->SetQuickHelpText(EMPTYSTRING);
+
+ if ((aTextHeight > aHeight) && !IsPreview())
+ { // we need vertical scrollbars and have to reduce the width
+ aWidth -= GetScrollbarWidth();
+ mpVScrollbar->Show();
+ }
+ else
+ {
+ mpVScrollbar->Hide();
+ }
+
+ {
+ const Size aSizeOfMetadataControls( GetSizePixel().Width() - GetMetaButtonAreaWidth(),
+ GetMetaHeight()/2 );
+ mpMetadataAuthor->SetPosSizePixel( 0,
+ aHeight,
+ aSizeOfMetadataControls.Width(),
+ aSizeOfMetadataControls.Height() );
+ mpMetadataDate->SetPosSizePixel( 0,
+ aHeight + aSizeOfMetadataControls.Height(),
+ aSizeOfMetadataControls.Width(),
+ aSizeOfMetadataControls.Height() );
+ }
+
+ mpOutliner->SetPaperSize( PixelToLogic( Size(aWidth,aHeight) ) ) ;
+ mpOutlinerView->SetOutputArea( PixelToLogic( Rectangle(0,0,aWidth,aHeight) ) );
+ if (!mpVScrollbar->IsVisible())
+ { // if we do not have a scrollbar anymore, we want to see the complete text
+ mpOutlinerView->SetVisArea( PixelToLogic( Rectangle(0,0,aWidth,aHeight) ) );
+ }
+
+ if (!Application::GetSettings().GetLayoutRTL())
+ {
+ mpSidebarTxtControl->SetPosSizePixel(0, 0, aWidth, aHeight);
+ mpVScrollbar->SetPosSizePixel( aWidth, 0, GetScrollbarWidth(), aHeight);
+ }
+ else
+ {
+ mpSidebarTxtControl->SetPosSizePixel( ( (aTextHeight > aHeight) && !IsPreview()
+ ? GetScrollbarWidth() : 0 ) , 0,
+ aWidth, aHeight);
+ mpVScrollbar->SetPosSizePixel( 0, 0, GetScrollbarWidth(), aHeight);
+ }
+
+ mpVScrollbar->SetVisibleSize( PixelToLogic(Size(0,aHeight)).Height() );
+ mpVScrollbar->SetPageSize( PixelToLogic(Size(0,aHeight)).Height() * 8 / 10 );
+ mpVScrollbar->SetLineSize( mpOutliner->GetTextHeight() / 10 );
+ SetScrollbar();
+ mpVScrollbar->SetRange( Range(0, mpOutliner->GetTextHeight()));
+
+ //calculate rects for meta- button
+ const Fraction& fx( GetMapMode().GetScaleX() );
+ const Fraction& fy( GetMapMode().GetScaleY() );
+
+ const Point aPos( mpMetadataAuthor->GetPosPixel());
+ Rectangle aRectMetaButton;
+ if (IsPreview())
+ {
+ aRectMetaButton = PixelToLogic(
+ Rectangle( Point( aPos.X()+GetSizePixel().Width()-(METABUTTON_WIDTH*4+10)*fx.GetNumerator()/fx.GetDenominator(),
+ aPos.Y()+5*fy.GetNumerator()/fy.GetDenominator() ),
+ Size( METABUTTON_WIDTH*4*fx.GetNumerator()/fx.GetDenominator(),
+ METABUTTON_HEIGHT*fy.GetNumerator()/fy.GetDenominator() ) ) );
+ }
+ else
+ {
+ aRectMetaButton = PixelToLogic(
+ Rectangle( Point( aPos.X()+GetSizePixel().Width()-(METABUTTON_WIDTH+10)*fx.GetNumerator()/fx.GetDenominator(),
+ aPos.Y()+5*fy.GetNumerator()/fy.GetDenominator() ),
+ Size( METABUTTON_WIDTH*fx.GetNumerator()/fx.GetDenominator(),
+ METABUTTON_HEIGHT*fy.GetNumerator()/fy.GetDenominator() ) ) );
+ }
+
+ {
+ const Rectangle aRectMetaButtonPixel( LogicToPixel( aRectMetaButton ) );
+ mpMenuButton->SetPosSizePixel( aRectMetaButtonPixel.Left(),
+ aRectMetaButtonPixel.Top(),
+ aRectMetaButtonPixel.GetWidth(),
+ aRectMetaButtonPixel.GetHeight() );
+ }
+}
+
+void SwSidebarWin::SetSizePixel( const Size& rNewSize )
+{
+ Window::SetSizePixel(rNewSize);
+
+ if (mpShadow)
+ {
+ Point aStart = EditWin()->PixelToLogic(GetPosPixel()+Point(0,GetSizePixel().Height()));
+ Point aEnd = EditWin()->PixelToLogic(GetPosPixel()+Point(GetSizePixel().Width()-1,GetSizePixel().Height()));
+ mpShadow->SetPosition(basegfx::B2DPoint(aStart.X(),aStart.Y()), basegfx::B2DPoint(aEnd.X(),aEnd.Y()));
+ }
+}
+
+void SwSidebarWin::SetScrollbar()
+{
+ mpVScrollbar->SetThumbPos( mpOutlinerView->GetVisArea().Top()+ mpOutlinerView->GetEditView().GetCursor()->GetOffsetY());
+}
+
+void SwSidebarWin::ResizeIfNeccessary(long aOldHeight, long aNewHeight)
+{
+ if (aOldHeight != aNewHeight)
+ {
+ //check for lower border or next note
+ long aBorder = mrMgr.GetNextBorder();
+ if (aBorder != -1)
+ {
+ if (aNewHeight > GetMinimumSizeWithoutMeta())
+ {
+ long aNewLowerValue = GetPosPixel().Y() + aNewHeight + GetMetaHeight();
+ if (aNewLowerValue < aBorder)
+ SetSizePixel(Size(GetSizePixel().Width(),aNewHeight+GetMetaHeight()));
+ else
+ SetSizePixel(Size(GetSizePixel().Width(),aBorder - GetPosPixel().Y()));
+ DoResize();
+ Invalidate();
+ }
+ else
+ {
+ if (GetSizePixel().Height() != GetMinimumSizeWithoutMeta() + GetMetaHeight())
+ SetSizePixel(Size(GetSizePixel().Width(),GetMinimumSizeWithoutMeta() + GetMetaHeight()));
+ DoResize();
+ Invalidate();
+ }
+ }
+ else
+ {
+ DoResize();
+ Invalidate();
+ }
+ }
+ else
+ {
+ SetScrollbar();
+ }
+}
+
+void SwSidebarWin::SetColor(Color aColorDark,Color aColorLight, Color aColorAnchor)
+{
+ mColorDark = aColorDark;
+ mColorLight = aColorLight;
+ mColorAnchor = aColorAnchor;
+
+ if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
+ {
+ {
+ mpMetadataAuthor->SetControlBackground(mColorDark);
+ AllSettings aSettings = mpMetadataAuthor->GetSettings();
+ StyleSettings aStyleSettings = aSettings.GetStyleSettings();
+ aStyleSettings.SetFieldTextColor(aColorAnchor);
+ aSettings.SetStyleSettings(aStyleSettings);
+ mpMetadataAuthor->SetSettings(aSettings);
+ }
+
+ {
+ mpMetadataDate->SetControlBackground(mColorDark);
+ AllSettings aSettings = mpMetadataDate->GetSettings();
+ StyleSettings aStyleSettings = aSettings.GetStyleSettings();
+ aStyleSettings.SetFieldTextColor(aColorAnchor);
+ aSettings.SetStyleSettings(aStyleSettings);
+ mpMetadataDate->SetSettings(aSettings);
+ }
+
+ AllSettings aSettings2 = mpVScrollbar->GetSettings();
+ StyleSettings aStyleSettings2 = aSettings2.GetStyleSettings();
+ aStyleSettings2.SetButtonTextColor(Color(0,0,0));
+ aStyleSettings2.SetCheckedColor(mColorLight); //hintergund
+ aStyleSettings2.SetShadowColor(mColorAnchor);
+ aStyleSettings2.SetFaceColor(mColorDark);
+ aSettings2.SetStyleSettings(aStyleSettings2);
+ mpVScrollbar->SetSettings(aSettings2);
+ }
+}
+
+void SwSidebarWin::SetSidebarPosition(sw::sidebarwindows::SidebarPosition eSidebarPosition)
+{
+ meSidebarPosition = eSidebarPosition;
+}
+
+void SwSidebarWin::SetReadonly(BOOL bSet)
+{
+ mbReadonly = bSet;
+ GetOutlinerView()->SetReadOnly(bSet);
+}
+
+void SwSidebarWin::SetLanguage(const SvxLanguageItem aNewItem)
+{
+ Link pLink = Engine()->GetModifyHdl();
+ Engine()->SetModifyHdl( Link() );
+ ESelection aOld = GetOutlinerView()->GetSelection();
+
+ ESelection aNewSelection( 0, 0, (USHORT)Engine()->GetParagraphCount()-1, USHRT_MAX );
+ GetOutlinerView()->SetSelection( aNewSelection );
+ SfxItemSet aEditAttr(GetOutlinerView()->GetAttribs());
+ aEditAttr.Put(aNewItem);
+ GetOutlinerView()->SetAttribs( aEditAttr );
+
+ GetOutlinerView()->SetSelection(aOld);
+ Engine()->SetModifyHdl( pLink );
+
+ const SwViewOption* pVOpt = mrView.GetWrtShellPtr()->GetViewOptions();
+ ULONG nCntrl = Engine()->GetControlWord();
+ // turn off
+ if (!pVOpt->IsOnlineSpell())
+ nCntrl &= ~EE_CNTRL_ONLINESPELLING;
+ else
+ nCntrl &= ~EE_CNTRL_ONLINESPELLING;
+ Engine()->SetControlWord(nCntrl);
+
+ //turn back on
+ if (pVOpt->IsOnlineSpell())
+ nCntrl |= EE_CNTRL_ONLINESPELLING;
+ else
+ nCntrl &= ~EE_CNTRL_ONLINESPELLING;
+ Engine()->SetControlWord(nCntrl);
+
+ Engine()->CompleteOnlineSpelling();
+ Invalidate();
+}
+
+void SwSidebarWin::DataChanged( const DataChangedEvent& aEvent)
+{
+ Window::DataChanged( aEvent );
+}
+
+void SwSidebarWin::GetFocus()
+{
+ if (mpSidebarTxtControl)
+ mpSidebarTxtControl->GrabFocus();
+}
+
+void SwSidebarWin::LoseFocus()
+{
+}
+
+void SwSidebarWin::ShowNote()
+{
+ SetPosAndSize();
+ if (!IsVisible())
+ Window::Show();
+ if (mpShadow && !mpShadow->isVisible())
+ mpShadow->setVisible(true);
+ if (mpAnchor && !mpAnchor->isVisible())
+ mpAnchor->setVisible(true);
+}
+
+void SwSidebarWin::HideNote()
+{
+ if (IsVisible())
+ Window::Hide();
+ if (mpAnchor)
+ {
+ if (mrMgr.IsShowAnchor())
+ mpAnchor->SetAnchorState(AS_TRI);
+ else
+ mpAnchor->setVisible(false);
+ }
+ if (mpShadow && mpShadow->isVisible())
+ mpShadow->setVisible(false);
+}
+
+void SwSidebarWin::ActivatePostIt()
+{
+ mrMgr.AssureStdModeAtShell();
+
+ mpOutliner->ClearModifyFlag();
+ mpOutliner->GetUndoManager().Clear();
+
+ CheckMetaText();
+ SetViewState(VS_EDIT);
+ GetOutlinerView()->ShowCursor();
+
+ mpOutlinerView->GetEditView().SetInsertMode(mrView.GetWrtShellPtr()->IsInsMode());
+
+ if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
+ GetOutlinerView()->SetBackgroundColor(mColorDark);
+}
+
+void SwSidebarWin::DeactivatePostIt()
+{
+ // remove selection, #i87073#
+ if (GetOutlinerView()->GetEditView().HasSelection())
+ {
+ ESelection aSelection = GetOutlinerView()->GetEditView().GetSelection();
+ aSelection.nEndPara = aSelection.nStartPara;
+ aSelection.nEndPos = aSelection.nStartPos;
+ GetOutlinerView()->GetEditView().SetSelection(aSelection);
+ }
+
+ mpOutliner->CompleteOnlineSpelling();
+
+ SetViewState(VS_NORMAL);
+ // write the visible text back into the SwField
+ UpdateData();
+
+ if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
+ GetOutlinerView()->SetBackgroundColor(COL_TRANSPARENT);
+
+
+ if ( !IsProtected() &&
+ Engine()->GetEditEngine().GetText()==String(EMPTYSTRING) )
+ {
+ mnEventId = Application::PostUserEvent( LINK( this, SwSidebarWin, DeleteHdl), 0 );
+ }
+}
+
+void SwSidebarWin::ToggleInsMode()
+{
+ if (!mrView.GetWrtShell().IsRedlineOn())
+ {
+ //change outliner
+ mpOutlinerView->GetEditView().SetInsertMode(!mpOutlinerView->GetEditView().IsInsertMode());
+ //change documnet
+ mrView.GetWrtShell().ToggleInsMode();
+ //update statusbar
+ SfxBindings &rBnd = mrView.GetViewFrame()->GetBindings();
+ rBnd.Invalidate(SID_ATTR_INSERT);
+ rBnd.Update(SID_ATTR_INSERT);
+ }
+}
+
+void SwSidebarWin::ExecuteCommand(USHORT nSlot)
+{
+ mrMgr.AssureStdModeAtShell();
+
+ switch (nSlot)
+ {
+ case FN_POSTIT:
+ case FN_REPLY:
+ {
+ // if this note is empty, it will be deleted once losing the focus, so no reply, but only a new note
+ // will be created
+ if (Engine()->GetEditEngine().GetText() != String(EMPTYSTRING))
+ {
+ OutlinerParaObject* pPara = new OutlinerParaObject(*GetOutlinerView()->GetEditView().CreateTextObject());
+ mrMgr.RegisterAnswer(pPara);
+ }
+ if (mrMgr.HasActiveSidebarWin())
+ mrMgr.SetActiveSidebarWin(0);
+ SwitchToFieldPos();
+ mrView.GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT);
+ break;
+ }
+ case FN_DELETE_COMMENT:
+ case FN_DELETE_NOTE:
+
+ //Delete(); // do not kill the parent of our open popup menu
+ mnEventId = Application::PostUserEvent( LINK( this, SwSidebarWin, DeleteHdl), 0 );
+ break;
+ case FN_DELETE_ALL_NOTES:
+ case FN_HIDE_ALL_NOTES:
+ // not possible as slot as this would require that "this" is the active postit
+ mrView.GetViewFrame()->GetBindings().Execute( nSlot, 0, 0, SFX_CALLMODE_ASYNCHRON );
+ break;
+ case FN_DELETE_NOTE_AUTHOR:
+ case FN_HIDE_NOTE_AUTHOR:
+ {
+ // not possible as slot as this would require that "this" is the active postit
+ SfxStringItem aItem( nSlot, GetAuthor() );
+ const SfxPoolItem* aItems[2];
+ aItems[0] = &aItem;
+ aItems[1] = 0;
+ mrView.GetViewFrame()->GetBindings().Execute( nSlot, aItems, 0, SFX_CALLMODE_ASYNCHRON );
+ }
+ default:
+ mrView.GetViewFrame()->GetBindings().Execute( nSlot );
+ break;
+ }
+}
+
+SwEditWin* SwSidebarWin::EditWin()
+{
+ return &mrView.GetEditWin();
+}
+
+long SwSidebarWin::GetPostItTextHeight()
+{
+ return mpOutliner ? LogicToPixel(mpOutliner->CalcTextSize()).Height() : 0;
+}
+
+void SwSidebarWin::SwitchToPostIt(USHORT aDirection)
+{
+ SwSidebarWin* pPostIt = mrMgr.GetNextPostIt(aDirection, this);
+ if (pPostIt)
+ pPostIt->GrabFocus();
+}
+
+IMPL_LINK( SwSidebarWin, WindowEventListener, VclSimpleEvent*, pEvent )
+{
+ VclWindowEvent* pWinEvent = dynamic_cast<VclWindowEvent*>(pEvent);
+ if ( pWinEvent )
+ {
+ if ( pWinEvent->GetId() == VCLEVENT_WINDOW_MOUSEMOVE )
+ {
+ MouseEvent* pMouseEvt = (MouseEvent*)pWinEvent->GetData();
+ if ( pMouseEvt->IsEnterWindow() )
+ {
+ mbMouseOver = true;
+ if ( !HasFocus() )
+ {
+ SetViewState(VS_VIEW);
+ Invalidate();
+ }
+ }
+ else if ( pMouseEvt->IsLeaveWindow())
+ {
+ if (IsPreview())
+ {
+ //doLazyDelete();
+ }
+ else
+ {
+ mbMouseOver = false;
+ if ( !HasFocus() )
+ {
+ SetViewState(VS_NORMAL);
+ Invalidate();
+ }
+ }
+ }
+ }
+ else if ( pWinEvent->GetId() == VCLEVENT_WINDOW_ACTIVATE &&
+ pWinEvent->GetWindow() == mpSidebarTxtControl )
+ {
+ const BOOL bLockView = mrView.GetWrtShell().IsViewLocked();
+ mrView.GetWrtShell().LockView( TRUE );
+
+ if ( !IsPreview() )
+ {
+ mrMgr.SetActiveSidebarWin( this );
+ }
+
+ mrView.GetWrtShell().LockView( bLockView );
+ mrMgr.MakeVisible( this );
+ }
+ else if ( pWinEvent->GetWindow() == mpSidebarTxtControl )
+ {
+ int i = 5;
+ ++i;
+ }
+ }
+ return sal_True;
+}
+
+void SwSidebarWin::Delete()
+{
+ if ( mrMgr.GetActiveSidebarWin() == this)
+ {
+ mrMgr.SetActiveSidebarWin(0);
+ // if the note is empty, the previous line will send a delete event, but we are already there
+ if (mnEventId)
+ {
+ Application::RemoveUserEvent( mnEventId );
+ mnEventId = 0;
+ }
+ }
+}
+
+IMPL_LINK(SwSidebarWin, ScrollHdl, ScrollBar*, pScroll)
+{
+ long nDiff = GetOutlinerView()->GetEditView().GetVisArea().Top() - pScroll->GetThumbPos();
+ GetOutlinerView()->Scroll( 0, nDiff );
+ return 0;
+}
+
+IMPL_LINK(SwSidebarWin, ModifyHdl, void*, pVoid)
+{
+ // no warnings, please
+ pVoid=0;
+ mrView.GetDocShell()->SetModified(sal_True);
+ return 0;
+}
+
+IMPL_LINK(SwSidebarWin, DeleteHdl, void*, pVoid)
+{
+ // no warnings, please
+ pVoid=0;
+ mnEventId = 0;
+ Delete();
+ return 0;
+}
+
+
+void SwSidebarWin::ResetAttributes()
+{
+ mpOutlinerView->RemoveAttribsKeepLanguages(TRUE);
+ mpOutliner->RemoveFields(TRUE);
+ mpOutlinerView->SetAttribs(DefaultItem());
+}
+
+sal_Int32 SwSidebarWin::GetScrollbarWidth()
+{
+ return mrView.GetWrtShell().GetViewOptions()->GetZoom() / 10;
+}
+
+sal_Int32 SwSidebarWin::GetMetaButtonAreaWidth()
+{
+ const Fraction& f( GetMapMode().GetScaleX() );
+ if (IsPreview())
+ return 3 * METABUTTON_AREA_WIDTH * f.GetNumerator() / f.GetDenominator();
+ else
+ return METABUTTON_AREA_WIDTH * f.GetNumerator() / f.GetDenominator();
+}
+
+sal_Int32 SwSidebarWin::GetMetaHeight()
+{
+ const Fraction& f( GetMapMode().GetScaleY() );
+ return POSTIT_META_HEIGHT * f.GetNumerator() / f.GetDenominator();
+}
+
+sal_Int32 SwSidebarWin::GetMinimumSizeWithMeta()
+{
+ return mrMgr.GetMinimumSizeWithMeta();
+}
+
+sal_Int32 SwSidebarWin::GetMinimumSizeWithoutMeta()
+{
+ const Fraction& f( GetMapMode().GetScaleY() );
+ return POSTIT_MINIMUMSIZE_WITHOUT_META * f.GetNumerator() / f.GetDenominator();
+}
+
+void SwSidebarWin::SetSpellChecking()
+{
+ const SwViewOption* pVOpt = mrView.GetWrtShellPtr()->GetViewOptions();
+ ULONG nCntrl = mpOutliner->GetControlWord();
+ if (pVOpt->IsOnlineSpell())
+ nCntrl |= EE_CNTRL_ONLINESPELLING;
+ else
+ nCntrl &= ~EE_CNTRL_ONLINESPELLING;
+ mpOutliner->SetControlWord(nCntrl);
+
+ mpOutliner->CompleteOnlineSpelling();
+ Invalidate();
+}
+
+void SwSidebarWin::SetViewState(ViewState bViewState)
+{
+ switch (bViewState)
+ {
+ case VS_EDIT:
+ {
+ if (mpAnchor)
+ {
+ mpAnchor->SetAnchorState(AS_ALL);
+ SwSidebarWin* pWin = GetTopReplyNote();
+ if (pWin)
+ pWin->Anchor()->SetAnchorState(AS_END);
+ mpAnchor->setLineSolid(true);
+ }
+ if (mpShadow)
+ mpShadow->SetShadowState(SS_EDIT);
+ break;
+ }
+ case VS_VIEW:
+ {
+ if (mpAnchor)
+ mpAnchor->setLineSolid(true);
+ if (mpShadow)
+ mpShadow->SetShadowState(SS_VIEW);
+ break;
+ }
+ case VS_NORMAL:
+ {
+ if (mpAnchor)
+ {
+ if (IsFollow())
+ {
+ // if there is no visible parent note, we want to see the complete anchor ??
+ //if (IsAnyStackParentVisible())
+ mpAnchor->SetAnchorState(AS_END);
+ SwSidebarWin* pTopWinSelf = GetTopReplyNote();
+ SwSidebarWin* pTopWinActive = mrMgr.HasActiveSidebarWin()
+ ? mrMgr.GetActiveSidebarWin()->GetTopReplyNote()
+ : 0;
+ if (pTopWinSelf && (pTopWinSelf!=pTopWinActive))
+ {
+ if (pTopWinSelf!=mrMgr.GetActiveSidebarWin())
+ pTopWinSelf->Anchor()->setLineSolid(false);
+ pTopWinSelf->Anchor()->SetAnchorState(AS_ALL);
+ }
+ }
+ mpAnchor->setLineSolid(false);
+ }
+ if (mpShadow)
+ mpShadow->SetShadowState(SS_NORMAL);
+ break;
+ }
+ }
+}
+
+SwSidebarWin* SwSidebarWin::GetTopReplyNote()
+{
+ SwSidebarWin* pTopNote = 0;
+ SwSidebarWin* pSidebarWin = IsFollow() ? mrMgr.GetNextPostIt(KEY_PAGEUP, this) : 0;
+ while (pSidebarWin)
+ {
+ pTopNote = pSidebarWin;
+ pSidebarWin = pSidebarWin->IsFollow() ? mrMgr.GetNextPostIt(KEY_PAGEUP, pSidebarWin) : 0;
+ }
+ return pTopNote;
+}
+
+void SwSidebarWin::SwitchToFieldPos()
+{
+ if ( mrMgr.GetActiveSidebarWin() == this )
+ mrMgr.SetActiveSidebarWin(0);
+ GotoPos();
+ sal_uInt32 aCount = MoveCaret();
+ if (aCount)
+ mrView.GetDocShell()->GetWrtShell()->SwCrsrShell::Right(aCount, 0, FALSE);
+ GrabFocusToDocument();
+}
+
+SvxLanguageItem SwSidebarWin::GetLanguage(void)
+{
+ return SvxLanguageItem(SwLangHelper::GetLanguage(mrView.GetWrtShell(),RES_CHRATR_LANGUAGE),RES_CHRATR_LANGUAGE);
+}
+
+void SwSidebarWin::SetChangeTracking( const SwPostItHelper::SwLayoutStatus aLayoutStatus,
+ const Color& aChangeColor )
+{
+ if ( (mLayoutStatus != aLayoutStatus) ||
+ (mChangeColor != aChangeColor) )
+ {
+ mLayoutStatus = aLayoutStatus;
+ mChangeColor = aChangeColor;
+ Invalidate();
+ }
+}
+
+bool SwSidebarWin::HasScrollbar() const
+{
+ return mpVScrollbar != 0;
+}
+
+bool SwSidebarWin::IsScrollbarVisible() const
+{
+ return HasScrollbar() && mpVScrollbar->IsVisible();
+}
+
+void SwSidebarWin::ChangeSidebarItem( SwSidebarItem& rSidebarItem )
+{
+ const bool bAnchorChanged = mpAnchorFrm != rSidebarItem.maLayoutInfo.mpAnchorFrm;
+ if ( bAnchorChanged )
+ {
+ mrMgr.DisconnectSidebarWinFromFrm( *(mpAnchorFrm), *this );
+ }
+
+ mrSidebarItem = rSidebarItem;
+ mpAnchorFrm = mrSidebarItem.maLayoutInfo.mpAnchorFrm;
+
+ if ( GetWindowPeer() )
+ {
+ SidebarWinAccessible* pAcc =
+ static_cast<SidebarWinAccessible*>( GetWindowPeer() );
+ ASSERT( dynamic_cast<SidebarWinAccessible*>( GetWindowPeer() ),
+ "<SwSidebarWin::ChangeSidebarItem(..)> - unexpected type of window peer -> crash possible!" );
+ pAcc->ChangeSidebarItem( mrSidebarItem );
+ }
+
+ if ( bAnchorChanged )
+ {
+ mrMgr.ConnectSidebarWinToFrm( *(mrSidebarItem.maLayoutInfo.mpAnchorFrm),
+ *(mrSidebarItem.GetFmtFld()),
+ *this );
+ }
+}
+
+css::uno::Reference< css::accessibility::XAccessible > SwSidebarWin::CreateAccessible()
+{
+ SidebarWinAccessible* pAcc( new SidebarWinAccessible( *this,
+ mrView.GetWrtShell(),
+ mrSidebarItem ) );
+ css::uno::Reference< css::awt::XWindowPeer > xWinPeer( pAcc );
+ SetWindowPeer( xWinPeer, pAcc );
+
+ css::uno::Reference< css::accessibility::XAccessible > xAcc( xWinPeer, css::uno::UNO_QUERY );
+ return xAcc;
+}
+
+} } // eof of namespace sw::sidebarwindows
+
+/********** SwRedComment**************/
+/*
+SwRedComment::SwRedComment( Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits,SwRedline* pRed)
+ : SwSidebarWin(pParent,nBits,aMgr,aBits),
+ pRedline(pRed)
+{
+}
+
+void SwRedComment::SetPopup()
+{
+ mpButtonPopup = new PopupMenu(SW_RES(MN_REDCOMMENT_BUTTON));
+ //mpButtonPopup->SetMenuFlags(MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES);
+}
+
+void SwRedComment::UpdateData()
+{
+ if ( Engine()->IsModified() )
+ {
+ // so we get a new layout of notes (Anchor position is still the same and we would otherwise not get one)
+ Mgr()->SetLayout();
+ // SetRedline is calling SetModified already
+ DocView()->GetWrtShell().SetRedlineComment(Engine()->GetEditEngine().GetText());
+ }
+ Engine()->ClearModifyFlag();
+ Engine()->GetUndoManager().Clear();
+}
+
+void SwRedComment::SetPostItText()
+{
+ Engine()->SetModifyHdl( Link() );
+ Engine()->EnableUndo( FALSE );
+
+ Engine()->Clear();
+ View()->SetAttribs(DefaultItem());
+ View()->InsertText(pRedline->GetComment(),false);
+
+ Engine()->ClearModifyFlag();
+ Engine()->GetUndoManager().Clear();
+ Engine()->EnableUndo( TRUE );
+ Engine()->SetModifyHdl( LINK( this, SwSidebarWin, ModifyHdl ) );
+ Invalidate();
+}
+
+void SwRedComment::DeactivatePostIt()
+{
+ SwSidebarWin::DeactivatePostIt();
+ // current Redline is still selected
+ DocView()->GetWrtShellPtr()->ClearMark();
+}
+
+void SwRedComment::ActivatePostIt()
+{
+ SwSidebarWin::ActivatePostIt();
+
+ // do we want the redline selected?
+ // otherwise, SwRedComment::ActivatePostIt() as well as SwRedComment::DeactivatePostIt()
+ // can be thrown out completly
+ DocView()->GetDocShell()->GetWrtShell()->GotoRedline(
+ DocView()->GetDocShell()->GetWrtShell()->FindRedlineOfData(pRedline->GetRedlineData()),true);
+}
+
+void SwRedComment::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ if (mRectMetaButton.IsInside(PixelToLogic(rMEvt.GetPosPixel())) && rMEvt.IsLeft())
+ {
+ ExecuteCommand( mpButtonPopup->Execute( this,Rectangle(LogicToPixel(mRectMetaButton.BottomLeft()),LogicToPixel(mRectMetaButton.BottomLeft())),POPUPMENU_EXECUTE_DOWN | POPUPMENU_NOMOUSEUPCLOSE) );
+ }
+}
+
+void SwRedComment::Delete()
+{
+ SwSidebarWin::Delete();
+ // we are not neccessarily on our redline, so let's move there
+ GotoPos();
+ DocView()->GetWrtShell().SetRedlineComment(EMPTYSTRING);
+ DocView()->GetWrtShell().ClearMark();
+ // so we get a new layout of notes (Anchor position is still the same and we would otherwise not get one)
+ Mgr()->SetLayout();
+ Mgr()->RemoveItem(pRedline);
+}
+
+void SwRedComment::GotoPos()
+{
+ DocView()->GetDocShell()->GetWrtShell()->GotoRedline(
+ DocView()->GetDocShell()->GetWrtShell()->FindRedlineOfData(pRedline->GetRedlineData()));
+}
+
+String SwRedComment::GetAuthor()
+{
+ return pRedline->GetAuthorString();
+}
+
+Date SwRedComment::GetDate()
+{
+ return pRedline->GetTimeStamp().GetDate();
+}
+
+Time SwRedComment::GetTime()
+{
+ return pRedline->GetTimeStamp().GetTime();
+}
+
+bool SwRedComment::IsProtected()
+{
+ return SwSidebarWin::IsProtected() || pRedline->Start()->nNode.GetNode().GetTxtNode()->IsInProtectSect();
+}
+*/
diff --git a/sw/source/ui/docvw/SidebarWinAcc.cxx b/sw/source/ui/docvw/SidebarWinAcc.cxx
new file mode 100644
index 0000000000..214913963d
--- /dev/null
+++ b/sw/source/ui/docvw/SidebarWinAcc.cxx
@@ -0,0 +1,162 @@
+/************************************************************************* *
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ * $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 <SidebarWinAcc.hxx>
+
+#include <SidebarWin.hxx>
+#include <viewsh.hxx>
+#include <accmap.hxx>
+#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+
+namespace css = ::com::sun::star;
+
+namespace sw { namespace sidebarwindows {
+
+// =============================================================================
+// declaration and implementation of accessible context for <SidebarWinAccessible> instance
+// =============================================================================
+class SidebarWinAccessibleContext : public VCLXAccessibleComponent
+{
+ public:
+ explicit SidebarWinAccessibleContext( SwSidebarWin& rSidebarWin,
+ ViewShell& rViewShell,
+ const SwFrm* pAnchorFrm )
+ : VCLXAccessibleComponent( rSidebarWin.GetWindowPeer() )
+ , mrViewShell( rViewShell )
+ , mpAnchorFrm( pAnchorFrm )
+ , maMutex()
+ {
+ rSidebarWin.SetAccessibleRole( css::accessibility::AccessibleRole::COMMENT );
+ }
+
+ virtual ~SidebarWinAccessibleContext()
+ {}
+
+ void ChangeAnchor( const SwFrm* pAnchorFrm )
+ {
+ vos::OGuard aGuard(maMutex);
+
+ mpAnchorFrm = pAnchorFrm;
+ }
+
+ virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
+ getAccessibleParent() throw (css::uno::RuntimeException)
+ {
+ vos::OGuard aGuard(maMutex);
+
+ css::uno::Reference< css::accessibility::XAccessible > xAccParent;
+
+ if ( mpAnchorFrm &&
+ mrViewShell.GetAccessibleMap() )
+ {
+ xAccParent = mrViewShell.GetAccessibleMap()->GetContext( mpAnchorFrm, sal_False );
+ }
+
+ return xAccParent;
+ }
+
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() throw (css::uno::RuntimeException)
+ {
+ vos::OGuard aGuard(maMutex);
+
+ sal_Int32 nIndex( -1 );
+
+ if ( mpAnchorFrm && GetWindow() &&
+ mrViewShell.GetAccessibleMap() )
+ {
+ nIndex = mrViewShell.GetAccessibleMap()->GetChildIndex( *mpAnchorFrm,
+ *GetWindow() );
+ }
+
+ return nIndex;
+ }
+
+ private:
+ ViewShell& mrViewShell;
+ const SwFrm* mpAnchorFrm;
+
+ ::vos::OMutex maMutex;
+};
+
+// =============================================================================
+// implementaion of accessible for <SwSidebarWin> instance
+// =============================================================================
+SidebarWinAccessible::SidebarWinAccessible( SwSidebarWin& rSidebarWin,
+ ViewShell& rViewShell,
+ const SwSidebarItem& rSidebarItem )
+ : VCLXWindow()
+ , mrSidebarWin( rSidebarWin )
+ , mrViewShell( rViewShell )
+ , mpAnchorFrm( rSidebarItem.maLayoutInfo.mpAnchorFrm )
+ , bAccContextCreated( false )
+{
+ SetWindow( &mrSidebarWin );
+}
+
+SidebarWinAccessible::~SidebarWinAccessible()
+{
+}
+
+void SidebarWinAccessible::ChangeSidebarItem( const SwSidebarItem& rSidebarItem )
+{
+ if ( bAccContextCreated )
+ {
+ css::uno::Reference< css::accessibility::XAccessibleContext > xAcc
+ = getAccessibleContext();
+ if ( xAcc.is() )
+ {
+ SidebarWinAccessibleContext* pAccContext =
+ dynamic_cast<SidebarWinAccessibleContext*>(xAcc.get());
+ if ( pAccContext )
+ {
+ pAccContext->ChangeAnchor( rSidebarItem.maLayoutInfo.mpAnchorFrm );
+ }
+ }
+ }
+}
+
+css::uno::Reference< css::accessibility::XAccessibleContext > SidebarWinAccessible::CreateAccessibleContext()
+{
+ SidebarWinAccessibleContext* pAccContext =
+ new SidebarWinAccessibleContext( mrSidebarWin,
+ mrViewShell,
+ mpAnchorFrm );
+ css::uno::Reference< css::accessibility::XAccessibleContext > xAcc( pAccContext );
+ bAccContextCreated = true;
+ return xAcc;
+}
+
+} } // end of namespace sw::sidebarwindows
+
diff --git a/sw/source/ui/docvw/SidebarWinAcc.hxx b/sw/source/ui/docvw/SidebarWinAcc.hxx
new file mode 100644
index 0000000000..0abe1acbfa
--- /dev/null
+++ b/sw/source/ui/docvw/SidebarWinAcc.hxx
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ *
+ * $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 _SIDEBARWINACC_HXX
+#define _SIDEBARWINACC_HXX
+
+#include <toolkit/awt/vclxwindow.hxx>
+
+class ViewShell;
+class SwSidebarItem;
+class SwFrm;
+
+namespace sw { namespace sidebarwindows {
+
+class SwSidebarWin;
+
+class SidebarWinAccessible : public VCLXWindow
+{
+ public:
+ explicit SidebarWinAccessible( SwSidebarWin& rSidebarWin,
+ ViewShell& rViewShell,
+ const SwSidebarItem& rSidebarItem );
+ virtual ~SidebarWinAccessible();
+
+ virtual com::sun::star::uno::Reference< com::sun::star::accessibility::XAccessibleContext >
+ CreateAccessibleContext();
+
+ void ChangeSidebarItem( const SwSidebarItem& rSidebarItem );
+
+ private:
+ SwSidebarWin& mrSidebarWin;
+ ViewShell& mrViewShell;
+ const SwFrm* mpAnchorFrm;
+ bool bAccContextCreated;
+};
+
+} } // end of namespace sw::sidebarwindows
+
+#endif
diff --git a/sw/source/ui/docvw/access.src b/sw/source/ui/docvw/access.src
index 99d05eafc3..42081d3ab7 100644
--- a/sw/source/ui/docvw/access.src
+++ b/sw/source/ui/docvw/access.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -83,4 +83,20 @@ String STR_ACCESS_PAGE_DESC
{
Text [ en-US ] = "Page: $(ARG1)";
};
+String STR_ACCESS_ANNOTATION_AUTHOR_NAME
+{
+ Text [ en-US ] = "Author";
+};
+String STR_ACCESS_ANNOTATION_DATE_NAME
+{
+ Text [ en-US ] = "Date";
+};
+String STR_ACCESS_ANNOTATION_BUTTON_NAME
+{
+ Text [ en-US ] = "Actions";
+};
+String STR_ACCESS_ANNOTATION_BUTTON_DESC
+{
+ Text [ en-US ] = "Activate this button to open a list of actions which can be performed on this comment and other comments";
+};
diff --git a/sw/source/ui/docvw/annotation.hrc b/sw/source/ui/docvw/annotation.hrc
new file mode 100644
index 0000000000..e43a903424
--- /dev/null
+++ b/sw/source/ui/docvw/annotation.hrc
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ * $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 _ANNOTATION_HRC
+#define _ANNOTATION_HRC
+
+#include "rcid.hrc"
+
+#define STR_POSTIT_TODAY (RC_ANNOTATION_BEGIN + 1)
+#define STR_POSTIT_YESTERDAY (RC_ANNOTATION_BEGIN + 2)
+
+#define STR_DELETE_ALL_NOTES (RC_ANNOTATION_BEGIN + 3)
+#define STR_DELETE_AUTHOR_NOTES (RC_ANNOTATION_BEGIN + 4)
+
+#define STR_NODATE (RC_ANNOTATION_BEGIN + 5)
+#define STR_NOAUTHOR (RC_ANNOTATION_BEGIN + 6)
+
+#define STR_REPLY (RC_ANNOTATION_BEGIN + 7)
+
+
+#define ANNOTATION_ACT_END STR_REPLY
+#if ANNOTATION_ACT_END > RC_ANNOTATION_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+
+#endif
diff --git a/sw/source/ui/docvw/annotation.src b/sw/source/ui/docvw/annotation.src
new file mode 100644
index 0000000000..8dcda9c25b
--- /dev/null
+++ b/sw/source/ui/docvw/annotation.src
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ * $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 "annotation.hrc"
+#include "cmdid.h"
+
+String STR_POSTIT_TODAY
+{
+ Text [ en-US ] = "Today," ;
+};
+
+String STR_POSTIT_YESTERDAY
+{
+ Text [ en-US ] = "Yesterday," ;
+};
+
+String STR_DELETE_ALL_NOTES
+{
+ Text [ en-US ] = "All Comments" ;
+};
+
+String STR_DELETE_AUTHOR_NOTES
+{
+ Text [ en-US ] = "Comments by " ;
+};
+
+String STR_NODATE
+{
+ Text [ en-US ] = "(no date)" ;
+};
+
+String STR_NOAUTHOR
+{
+ Text [ en-US ] = "(no author)" ;
+};
+
+String STR_REPLY
+{
+ Text [ en-US ] = "Reply to $1" ;
+};
+
diff --git a/sw/source/ui/docvw/docvw.hrc b/sw/source/ui/docvw/docvw.hrc
index ff6e6c4fe0..c0f1529179 100644
--- a/sw/source/ui/docvw/docvw.hrc
+++ b/sw/source/ui/docvw/docvw.hrc
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -59,11 +59,11 @@
#define STR_EXPORT_GRAFIK_TITLE (RC_DOCVW_BEGIN + 1)
#define STR_CHAIN_OK (RC_DOCVW_BEGIN + 2)
-#define STR_CHAIN_NOT_EMPTY (RC_DOCVW_BEGIN + 3)
-#define STR_CHAIN_IS_IN_CHAIN (RC_DOCVW_BEGIN + 4)
+#define STR_CHAIN_NOT_EMPTY (RC_DOCVW_BEGIN + 3)
+#define STR_CHAIN_IS_IN_CHAIN (RC_DOCVW_BEGIN + 4)
#define STR_CHAIN_WRONG_AREA (RC_DOCVW_BEGIN + 5)
#define STR_CHAIN_NOT_FOUND (RC_DOCVW_BEGIN + 6)
-#define STR_CHAIN_SOURCE_CHAINED (RC_DOCVW_BEGIN + 7)
+#define STR_CHAIN_SOURCE_CHAINED (RC_DOCVW_BEGIN + 7)
#define STR_CHAIN_SELF (RC_DOCVW_BEGIN + 8)
#define STR_REDLINE_INSERT (RC_DOCVW_BEGIN + 9)
#define STR_REDLINE_DELETE (RC_DOCVW_BEGIN + 10)
@@ -71,7 +71,7 @@
#define STR_REDLINE_TABLE (RC_DOCVW_BEGIN + 12)
#define STR_REDLINE_FMTCOLL (RC_DOCVW_BEGIN + 13)
#define STR_ENDNOTE (RC_DOCVW_BEGIN + 14)
-#define STR_FTNNOTE (RC_DOCVW_BEGIN + 15)
+#define STR_FTNNOTE (RC_DOCVW_BEGIN + 15)
#define STR_TABLE_COL_ADJUST (RC_DOCVW_BEGIN + 16)
#define STR_TABLE_ROW_ADJUST (RC_DOCVW_BEGIN + 17)
@@ -81,18 +81,7 @@
#define STR_SMARTTAG_CLICK (RC_DOCVW_BEGIN + 21)
-#define STR_POSTIT_TODAY (RC_DOCVW_BEGIN + 22)
-#define STR_POSTIT_YESTERDAY (RC_DOCVW_BEGIN + 23)
-
-#define STR_DELETE_ALL_NOTES (RC_DOCVW_BEGIN + 24)
-#define STR_DELETE_AUTHOR_NOTES (RC_DOCVW_BEGIN + 25)
-
-#define STR_NODATE (RC_DOCVW_BEGIN + 26)
-#define STR_NOAUTHOR (RC_DOCVW_BEGIN + 27)
-
-#define STR_REPLY (RC_DOCVW_BEGIN + 28)
-
-#define MSG_READONLY_CONTENT (RC_DOCVW_BEGIN + 1)
+#define MSG_READONLY_CONTENT (RC_DOCVW_BEGIN + 1)
#define DOCVW_ACT_END STR_SMARTTAG_CLICK
diff --git a/sw/source/ui/docvw/docvw.src b/sw/source/ui/docvw/docvw.src
index 1ca8ebf6d8..dcd0f98103 100644
--- a/sw/source/ui/docvw/docvw.src
+++ b/sw/source/ui/docvw/docvw.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -294,38 +294,3 @@ String STR_SMARTTAG_CLICK
Text [ en-US ] = "%s-click to open Smart Tag menu" ;
};
-String STR_POSTIT_TODAY
-{
- Text [ en-US ] = "Today," ;
-};
-
-String STR_POSTIT_YESTERDAY
-{
- Text [ en-US ] = "Yesterday," ;
-};
-
-String STR_DELETE_ALL_NOTES
-{
- Text [ en-US ] = "All Comments" ;
-};
-
-String STR_DELETE_AUTHOR_NOTES
-{
- Text [ en-US ] = "Comments by " ;
-};
-
-String STR_NODATE
-{
- Text [ en-US ] = "(no date)" ;
-};
-
-String STR_NOAUTHOR
-{
- Text [ en-US ] = "(no author)" ;
-};
-
-String STR_REPLY
-{
- Text [ en-US ] = "Reply to $1" ;
-};
-
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index f299146c02..9945b90086 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -139,8 +139,7 @@
#include <doc.hxx>
#include <xmloff/odffields.hxx>
-#include "PostItMgr.hxx"
-#include "postit.hxx"
+#include <PostItMgr.hxx>
//JP 11.10.2001: enable test code for bug fix 91313
#if defined(DBG_UTIL) && (OSL_DEBUG_LEVEL > 1)
@@ -1342,8 +1341,8 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
}
aKeyEvent = KeyEvent( rKEvt.GetCharCode(),
- KeyCode( nKey, rKEvt.GetKeyCode().GetModifier() ),
- rKEvt.GetRepeat() );
+ KeyCode( nKey, rKEvt.GetKeyCode().GetModifier() ),
+ rKEvt.GetRepeat() );
}
}
@@ -2262,7 +2261,8 @@ KEYINPUT_CHECKTABLE_INSDEL:
BOOL bIsAutoCorrectChar = SvxAutoCorrect::IsAutoCorrectChar( aCh );
- if( !aKeyEvent.GetRepeat() && pACorr && bIsAutoCorrectChar &&
+ BOOL bRunNext = pACorr->HasRunNext();
+ if( !aKeyEvent.GetRepeat() && pACorr && ( bIsAutoCorrectChar || bRunNext ) &&
pACfg->IsAutoFmtByInput() &&
(( pACorr->IsAutoCorrFlag( ChgWeightUnderl ) &&
( '*' == aCh || '_' == aCh ) ) ||
@@ -2274,14 +2274,13 @@ KEYINPUT_CHECKTABLE_INSDEL:
if( '\"' != aCh && '\'' != aCh ) // nur bei "*_" rufen!
rSh.UpdateAttr();
}
- else if( !aKeyEvent.GetRepeat() && pACorr && bIsAutoCorrectChar &&
+ else if( !aKeyEvent.GetRepeat() && pACorr && ( bIsAutoCorrectChar || bRunNext ) &&
pACfg->IsAutoFmtByInput() &&
pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd |
- ChgOrdinalNumber |
+ ChgOrdinalNumber | AddNonBrkSpace |
ChgToEnEmDash | SetINetAttr |
Autocorrect ) &&
- '\"' != aCh && '\'' != aCh && '*' != aCh && '_' != aCh &&
- !bIsNormalChar
+ '\"' != aCh && '\'' != aCh && '*' != aCh && '_' != aCh
)
{
FlushInBuffer();
@@ -2605,7 +2604,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if (rView.GetPostItMgr()->IsHit(rMEvt.GetPosPixel()))
return;
- rView.GetPostItMgr()->SetActivePostIt(0);
+ rView.GetPostItMgr()->SetActiveSidebarWin(0);
GrabFocus();
@@ -4701,8 +4700,10 @@ BOOL SwEditWin::IsDrawSelMode()
void SwEditWin::GetFocus()
{
- if (rView.GetPostItMgr()->GetActivePostIt())
- rView.GetPostItMgr()->GetActivePostIt()->GrabFocus();
+ if ( rView.GetPostItMgr()->HasActiveSidebarWin() )
+ {
+ rView.GetPostItMgr()->GrabFocusOnActiveSidebarWin();
+ }
else
{
rView.GotFocus();
diff --git a/sw/source/ui/docvw/edtwin2.cxx b/sw/source/ui/docvw/edtwin2.cxx
index 4ee301e9f2..8aa6c2e766 100644
--- a/sw/source/ui/docvw/edtwin2.cxx
+++ b/sw/source/ui/docvw/edtwin2.cxx
@@ -35,9 +35,7 @@
#include <stdio.h>
#endif
-#ifndef _HELP_HXX //autogen
#include <vcl/help.hxx>
-#endif
#include <svl/stritem.hxx>
#include <unotools/securityoptions.hxx>
#include <tools/urlobj.hxx>
@@ -46,24 +44,15 @@
#include <editeng/flditem.hxx>
#include <svl/urihelper.hxx>
#include <svx/svdotext.hxx>
-#ifndef _OUTLINER_HXX //autogen
-#define _EEITEMID_HXX
#include <editeng/outliner.hxx>
-#endif
#include <svl/itemiter.hxx>
#include <svx/svdview.hxx>
#include <svx/svdpagv.hxx>
#include <swmodule.hxx>
-#ifndef _MODCFG_HXX
#include <modcfg.hxx>
-#endif
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <edtwin.hxx>
#include <dpage.hxx>
#include <shellres.hxx>
@@ -80,14 +69,9 @@
#include <txttxmrk.hxx>
#include <uitool.hxx>
#include <viewopt.hxx>
-#ifndef _DOCVW_HRC
#include <docvw.hrc>
-#endif
-#ifndef _UTLUI_HRC
#include <utlui.hrc>
-#endif
-#include <postit.hxx>
#include <PostItMgr.hxx>
#include <fmtfld.hxx>
@@ -320,7 +304,8 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
{
USHORT nOldSubType = pFld->GetSubType();
((SwField*)pFld)->SetSubType(nsSwExtendedSubType::SUB_CMD);
- sTxt = pFld->Expand();
+ sTxt =
+ pFld->ExpandField(rSh.GetDoc()->IsClipBoard());
((SwField*)pFld)->SetSubType(nOldSubType);
}
break;
diff --git a/sw/source/ui/docvw/frmsidebarwincontainer.cxx b/sw/source/ui/docvw/frmsidebarwincontainer.cxx
new file mode 100644
index 0000000000..b5e406dcf6
--- /dev/null
+++ b/sw/source/ui/docvw/frmsidebarwincontainer.cxx
@@ -0,0 +1,216 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ * $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.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+#include <frmsidebarwincontainer.hxx>
+
+#include <map>
+#include <fmtfld.hxx>
+#include <txtfld.hxx>
+#include <SidebarWin.hxx>
+
+namespace {
+ struct SidebarWinKey
+ {
+ const xub_StrLen mnIndex;
+
+ explicit SidebarWinKey( const xub_StrLen nIndex )
+ : mnIndex( nIndex )
+ {}
+
+ bool operator < ( const SidebarWinKey& rSidebarWinKey ) const
+ {
+ return mnIndex < rSidebarWinKey.mnIndex;
+ }
+ };
+
+ struct SidebarWinOrder
+ {
+ sal_Bool operator()( const SidebarWinKey& rSidebarWinKeyA,
+ const SidebarWinKey& rSidebarWinKeyB ) const
+ {
+ return rSidebarWinKeyA < rSidebarWinKeyB;
+ }
+ };
+
+ typedef ::std::map < SidebarWinKey, sw::sidebarwindows::SwSidebarWin*, SidebarWinOrder > SidebarWinContainer;
+
+ struct FrmKey
+ {
+ const SwFrm* mpFrm;
+
+ explicit FrmKey( const SwFrm* pFrm )
+ : mpFrm( pFrm )
+ {}
+
+ bool operator < ( const FrmKey& rFrmKey ) const
+ {
+ return mpFrm < rFrmKey.mpFrm;
+ }
+ };
+
+ struct FrmOrder
+ {
+ sal_Bool operator()( const FrmKey& rFrmKeyA,
+ const FrmKey& rFrmKeyB ) const
+ {
+ return rFrmKeyA < rFrmKeyB;
+ }
+ };
+
+ typedef ::std::map < FrmKey, SidebarWinContainer, FrmOrder > _FrmSidebarWinContainer;
+}
+
+namespace sw { namespace sidebarwindows {
+
+class FrmSidebarWinContainer : public _FrmSidebarWinContainer
+{
+};
+
+SwFrmSidebarWinContainer::SwFrmSidebarWinContainer()
+ : mpFrmSidebarWinContainer( new FrmSidebarWinContainer() )
+{}
+
+SwFrmSidebarWinContainer::~SwFrmSidebarWinContainer()
+{
+ mpFrmSidebarWinContainer->clear();
+ delete mpFrmSidebarWinContainer;
+}
+
+bool SwFrmSidebarWinContainer::insert( const SwFrm& rFrm,
+ const SwFmtFld& rFmtFld,
+ SwSidebarWin& rSidebarWin )
+{
+ bool bInserted( false );
+
+ FrmKey aFrmKey( &rFrm );
+ SidebarWinContainer& rSidebarWinContainer = (*mpFrmSidebarWinContainer)[ aFrmKey ];
+
+ SidebarWinKey aSidebarWinKey( *(rFmtFld.GetTxtFld()->GetStart()) );
+ if ( rSidebarWinContainer.empty() ||
+ rSidebarWinContainer.find( aSidebarWinKey) == rSidebarWinContainer.end() )
+ {
+ rSidebarWinContainer[ aSidebarWinKey ] = &rSidebarWin;
+ bInserted = true;
+ }
+
+ return bInserted;
+}
+
+bool SwFrmSidebarWinContainer::remove( const SwFrm& rFrm,
+ const SwSidebarWin& rSidebarWin )
+{
+ bool bRemoved( false );
+
+ FrmKey aFrmKey( &rFrm );
+ FrmSidebarWinContainer::iterator aFrmIter = mpFrmSidebarWinContainer->find( aFrmKey );
+ if ( aFrmIter != mpFrmSidebarWinContainer->end() )
+ {
+ SidebarWinContainer& rSidebarWinContainer = (*aFrmIter).second;
+ for ( SidebarWinContainer::iterator aIter = rSidebarWinContainer.begin();
+ aIter != rSidebarWinContainer.end();
+ ++aIter )
+ {
+ if ( (*aIter).second == &rSidebarWin )
+ {
+ rSidebarWinContainer.erase( aIter );
+ bRemoved = true;
+ break;
+ }
+ }
+ }
+
+ return bRemoved;
+}
+
+bool SwFrmSidebarWinContainer::empty( const SwFrm& rFrm )
+{
+ bool bEmpty( true );
+
+ FrmKey aFrmKey( &rFrm );
+ FrmSidebarWinContainer::iterator aFrmIter = mpFrmSidebarWinContainer->find( aFrmKey );
+ if ( aFrmIter != mpFrmSidebarWinContainer->end() )
+ {
+ bEmpty = (*aFrmIter).second.empty();
+ }
+
+ return bEmpty;
+}
+
+SwSidebarWin* SwFrmSidebarWinContainer::get( const SwFrm& rFrm,
+ const sal_Int32 nIndex )
+{
+ SwSidebarWin* pRet( 0 );
+
+ FrmKey aFrmKey( &rFrm );
+ FrmSidebarWinContainer::iterator aFrmIter = mpFrmSidebarWinContainer->find( aFrmKey );
+ if ( aFrmIter != mpFrmSidebarWinContainer->end() )
+ {
+ SidebarWinContainer& rSidebarWinContainer = (*aFrmIter).second;
+ sal_Int32 nCounter( nIndex );
+ for ( SidebarWinContainer::iterator aIter = rSidebarWinContainer.begin();
+ nCounter >= 0 && aIter != rSidebarWinContainer.end();
+ ++aIter )
+ {
+ if ( nCounter == 0 )
+ {
+ pRet = (*aIter).second;
+ break;
+ }
+
+ --nCounter;
+ }
+ }
+
+ return pRet;
+}
+
+void SwFrmSidebarWinContainer::getAll( const SwFrm& rFrm,
+ std::vector< Window* >* pSidebarWins )
+{
+ pSidebarWins->clear();
+
+ FrmKey aFrmKey( &rFrm );
+ FrmSidebarWinContainer::iterator aFrmIter = mpFrmSidebarWinContainer->find( aFrmKey );
+ if ( aFrmIter != mpFrmSidebarWinContainer->end() )
+ {
+ SidebarWinContainer& rSidebarWinContainer = (*aFrmIter).second;
+ for ( SidebarWinContainer::iterator aIter = rSidebarWinContainer.begin();
+ aIter != rSidebarWinContainer.end();
+ ++aIter )
+ {
+ pSidebarWins->push_back( (*aIter).second );
+ }
+ }
+}
+
+} } // eof of namespace sw::sidebarwindows::
diff --git a/sw/source/ui/docvw/frmsidebarwincontainer.hxx b/sw/source/ui/docvw/frmsidebarwincontainer.hxx
new file mode 100644
index 0000000000..1583f36a0b
--- /dev/null
+++ b/sw/source/ui/docvw/frmsidebarwincontainer.hxx
@@ -0,0 +1,73 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ * $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 _FRMSIDEBARWINCONTAINER_HXX
+#define _FRMSIDEBARWINCONTAINER_HXX
+
+#include <sal/types.h>
+#include <vector>
+
+class SwFrm;
+class SwFmtFld;
+class Window;
+
+namespace sw { namespace sidebarwindows {
+
+class SwSidebarWin;
+class FrmSidebarWinContainer;
+
+class SwFrmSidebarWinContainer
+{
+ public:
+ SwFrmSidebarWinContainer();
+ ~SwFrmSidebarWinContainer();
+
+ bool insert( const SwFrm& rFrm,
+ const SwFmtFld& rFmtFld,
+ SwSidebarWin& rSidebarWin );
+
+ bool remove( const SwFrm& rFrm,
+ const SwSidebarWin& rSidebarWin );
+
+ bool empty( const SwFrm& rFrm );
+
+ SwSidebarWin* get( const SwFrm& rFrm,
+ const sal_Int32 nIndex );
+
+ void getAll( const SwFrm& rFrm,
+ std::vector< Window* >* pSidebarWins );
+
+ private:
+ FrmSidebarWinContainer* mpFrmSidebarWinContainer;
+};
+
+} } // eof of namespace sw::sidebarwindows::
+
+#endif
+
diff --git a/sw/source/ui/docvw/makefile.mk b/sw/source/ui/docvw/makefile.mk
index c3644c83f2..a2914b2f86 100644
--- a/sw/source/ui/docvw/makefile.mk
+++ b/sw/source/ui/docvw/makefile.mk
@@ -42,7 +42,8 @@ ENABLE_EXCEPTIONS=TRUE
SRS1NAME=$(TARGET)
SRC1FILES = \
access.src \
- docvw.src
+ docvw.src \
+ annotation.src
SLOFILES = \
$(SLO)$/edtdd.obj \
@@ -51,8 +52,16 @@ SLOFILES = \
$(SLO)$/edtwin3.obj \
$(SLO)$/romenu.obj \
$(SLO)$/srcedtw.obj \
- $(SLO)$/postit.obj \
- $(SLO)$/PostItMgr.obj
+ $(SLO)$/PostItMgr.obj \
+ $(SLO)$/frmsidebarwincontainer.obj \
+ $(SLO)$/AnchorOverlayObject.obj \
+ $(SLO)$/ShadowOverlayObject.obj \
+ $(SLO)$/SidebarWin.obj \
+ $(SLO)$/SidebarWinAcc.obj \
+ $(SLO)$/AnnotationWin.obj \
+ $(SLO)$/AnnotationMenuButton.obj \
+ $(SLO)$/SidebarTxtControl.obj \
+ $(SLO)$/SidebarTxtControlAcc.obj
# --- Tagets -------------------------------------------------------
diff --git a/sw/source/ui/docvw/postit.cxx b/sw/source/ui/docvw/postit.cxx
deleted file mode 100644
index 363a653670..0000000000
--- a/sw/source/ui/docvw/postit.cxx
+++ /dev/null
@@ -1,2482 +0,0 @@
-/************************************************************************* *
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General 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 <postit.hxx>
-#include <PostItMgr.hxx>
-
-#include <popup.hrc>
-#include <docvw.hrc>
-#include <app.hrc>
-
-#include <hintids.hxx>
-#include "viewopt.hxx"
-#include "cmdid.h"
-
-#include <tools/poly.hxx> // Polygon
-
-#include <editeng/postitem.hxx>
-#include <editeng/fontitem.hxx>
-#include <editeng/eeitem.hxx>
-#include <editeng/fhgtitem.hxx>
-#include <editeng/bulitem.hxx>
-#include <editeng/udlnitem.hxx>
-#include <editeng/shdditem.hxx>
-#include <editeng/wghtitem.hxx>
-#include <editeng/colritem.hxx>
-#include <editeng/flditem.hxx>
-#include <editeng/frmdir.hxx>
-#include <editeng/frmdiritem.hxx>
-#include <editeng/langitem.hxx>
-#include <editeng/adjitem.hxx>
-#include <editeng/editview.hxx>
-#include <svx/svdview.hxx>
-#include <svx/sdrpaintwindow.hxx>
-#include <svx/sdr/overlay/overlaymanager.hxx>
-#include <editeng/editstat.hxx> //EditEngine flags
-#include <editeng/outliner.hxx>
-#include <editeng/editeng.hxx>
-#include <editeng/editobj.hxx>
-#include <editeng/unolingu.hxx>
-
-#include <svtools/langtab.hxx>
-#include <svl/slstitm.hxx>
-#include <unotools/securityoptions.hxx>
-#include <unotools/useroptions.hxx>
-#include <svl/languageoptions.hxx>
-#include <svl/zforlist.hxx>
-#include <svtools/svmedit.hxx>
-
-#include <linguistic/lngprops.hxx>
-
-#include <sfx2/request.hxx>
-#include <sfx2/viewfrm.hxx>
-#include <sfx2/bindings.hxx>
-#include <sfx2/dispatch.hxx>
-#include <sfx2/mnumgr.hxx>
-
-#include <vcl/vclenum.hxx>
-#include <vcl/edit.hxx>
-#include <vcl/help.hxx>
-#include <vcl/scrbar.hxx>
-#include <vcl/button.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/gradient.hxx>
-#include <vcl/salbtype.hxx> // FRound
-#include <vcl/msgbox.hxx>
-
-#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <basegfx/tuple/b2dtuple.hxx>
-#include <basegfx/polygon/b2dpolygontools.hxx>
-
-#include <swrect.hxx>
-#include <docufld.hxx> // SwPostItField
-#include <edtwin.hxx>
-#include <view.hxx>
-#include <viewsh.hxx>
-#include <docsh.hxx>
-#include <shellres.hxx>
-#include <fmtfld.hxx>
-#include <wrtsh.hxx>
-#include <textsh.hxx>
-#include <doc.hxx>
-#include <txtfld.hxx>
-#include <redline.hxx>
-#include <uitool.hxx>
-#include <SwUndoField.hxx>
-#include <editsh.hxx>
-#include <swmodule.hxx>
-#include <node.hxx>
-#include <ndtxt.hxx>
-#include <langhelper.hxx>
-
-#include <sw_primitivetypes2d.hxx>
-#include <drawinglayer/primitive2d/primitivetools2d.hxx>
-#include <drawinglayer/primitive2d/fillgradientprimitive2d.hxx>
-#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
-#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
-#include <drawinglayer/primitive2d/shadowprimitive2d.hxx>
-
-using namespace ::com::sun::star;
-
-#define METABUTTON_WIDTH 16
-#define METABUTTON_HEIGHT 18
-#define METABUTTON_AREA_WIDTH 30
-#define POSTIT_META_HEIGHT (sal_Int32) 30
-#define POSTIT_MINIMUMSIZE_WITHOUT_META 50
-
-#define POSTIT_SHADOW_BRIGHT Color(180,180,180)
-#define POSTIT_SHADOW_DARK Color(83,83,83)
-
-#define LINEBREAK rtl::OUString::createFromAscii("\n")
-#define EMPTYSTRING rtl::OUString::createFromAscii("")
-
-TYPEINIT0(SwMarginWin);
-TYPEINIT1(SwPostIt,SwMarginWin);
-//TYPEINIT1(SwRedComment,SwMarginWin);
-
-Color ColorFromAlphaColor(UINT8 aTransparency, Color &aFront, Color &aBack )
-{
- return Color((UINT8)(aFront.GetRed() * aTransparency/(double)255 + aBack.GetRed() * (1-aTransparency/(double)255)),
- (UINT8)(aFront.GetGreen() * aTransparency/(double)255 + aBack.GetGreen() * (1-aTransparency/(double)255)),
- (UINT8)(aFront.GetBlue() * aTransparency/(double)255 + aBack.GetBlue() * (1-aTransparency/(double)255)));
-}
-
-/************ PostItTxt **************************************/
-PostItTxt::PostItTxt(Window* pParent, WinBits nBits) : Window(pParent, nBits), mpOutlinerView(0),mMouseOver(false),mbShowPopup(FALSE)
-{
- SetHelpId(26276);
- AddEventListener( LINK( this, PostItTxt, WindowEventListener ) );
- mpMarginWin = static_cast<SwMarginWin*>(GetParent());
-}
-
-PostItTxt::~PostItTxt()
-{
- RemoveEventListener( LINK( this, PostItTxt, WindowEventListener ) );
-}
-
-void PostItTxt::GetFocus()
-{
- BOOL bLockView = mpMarginWin->DocView()->GetWrtShell().IsViewLocked();
- mpMarginWin->DocView()->GetWrtShell().LockView( TRUE );
-
- if(mpMarginWin && !mpMarginWin->IsPreview())
- mpMarginWin->Mgr()->SetActivePostIt(mpMarginWin);
- Window::GetFocus();
- if (!mMouseOver)
- Invalidate();
-
- mpMarginWin->DocView()->GetWrtShell().LockView( bLockView );
- mpMarginWin->Mgr()->MakeVisible(mpMarginWin);
-}
-
-void PostItTxt::LoseFocus()
-{
- // write the visible text back into the SwField
- if ( mpMarginWin )
- mpMarginWin->UpdateData();
-
- Window::LoseFocus();
- if (!mMouseOver)
- Invalidate();
-}
-
-void PostItTxt::RequestHelp(const HelpEvent &rEvt)
-{
- USHORT nResId = 0;
- switch( mpMarginWin->GetStatus() )
- {
- case SwPostItHelper::INSERTED: nResId = STR_REDLINE_INSERT; break;
- case SwPostItHelper::DELETED: nResId = STR_REDLINE_DELETE; break;
- default: nResId = 0;
- }
-
- SwContentAtPos aCntntAtPos( SwContentAtPos::SW_REDLINE );
- if ( nResId && mpMarginWin->DocView()->GetWrtShell().GetContentAtPos( mpMarginWin->GetAnkorRect().Pos(), aCntntAtPos ) )
- {
- String sTxt;
- sTxt = SW_RESSTR( nResId );
- sTxt.AppendAscii( RTL_CONSTASCII_STRINGPARAM(": " ));
- sTxt += aCntntAtPos.aFnd.pRedl->GetAuthorString();
- sTxt.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " - " ));
- sTxt += GetAppLangDateTimeString( aCntntAtPos.aFnd.pRedl->GetTimeStamp() );
- Help::ShowQuickHelp( this,PixelToLogic(Rectangle(rEvt.GetMousePosPixel(),Size(50,10))),sTxt);
- }
-}
-
-void PostItTxt::Paint( const Rectangle& rRect)
-{
- if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
- {
- if (mMouseOver || HasFocus())
- DrawGradient(Rectangle(Point(0,0),PixelToLogic(GetSizePixel())),
- Gradient(GRADIENT_LINEAR,mpMarginWin->ColorDark(),mpMarginWin->ColorDark()));
- else
- DrawGradient(Rectangle(Point(0,0),PixelToLogic(GetSizePixel())),
- Gradient(GRADIENT_LINEAR,mpMarginWin->ColorLight(),mpMarginWin->ColorDark()));
- }
-
- mpOutlinerView->Paint( rRect );
-
- if (mpMarginWin->GetStatus()==SwPostItHelper::DELETED)
- {
- SetLineColor(static_cast<SwPostIt*>(mpMarginWin)->GetChangeColor());
- DrawLine(PixelToLogic(GetPosPixel()),PixelToLogic(GetPosPixel()+Point(GetSizePixel().Width(),GetSizePixel().Height())));
- DrawLine(PixelToLogic(GetPosPixel()+Point(GetSizePixel().Width(),0)),PixelToLogic(GetPosPixel()+Point(0,GetSizePixel().Height())));
- }
-}
-
-void PostItTxt::KeyInput( const KeyEvent& rKeyEvt )
-{
- const KeyCode& rKeyCode = rKeyEvt.GetKeyCode();
- USHORT nKey = rKeyCode.GetCode();
- SwView* pView = mpMarginWin->DocView();
- if ((rKeyCode.IsMod1() && rKeyCode.IsMod2()) && ((nKey == KEY_PAGEUP) || (nKey == KEY_PAGEDOWN)))
- mpMarginWin->SwitchToPostIt(nKey);
- else
- if ((nKey == KEY_ESCAPE) || (rKeyCode.IsMod1() && ((nKey == KEY_PAGEUP) || (nKey == KEY_PAGEDOWN))))
- mpMarginWin->SwitchToFieldPos();
- else
- if (nKey == KEY_INSERT)
- {
- if (!rKeyCode.IsMod1() && !rKeyCode.IsMod2())
- mpMarginWin->ToggleInsMode();
- }
- else
- {
- //let's make sure we see our note
- mpMarginWin->Mgr()->MakeVisible(mpMarginWin);
-
- long aOldHeight = mpMarginWin->GetPostItTextHeight();
- bool bDone = false;
-
- /// HACK: need to switch off processing of Undo/Redo in Outliner
- if ( !( (nKey == KEY_Z || nKey == KEY_Y) && rKeyCode.IsMod1()) )
- {
- /*
- SwPostItHelper::SwLayoutStatus aStatus = mpMarginWin->GetStatus();
- if ( (aStatus!=SwPostItHelper::DELETED) ||
- ( (aStatus==SwPostItHelper::DELETED) && (!mpMarginWin->Engine()->GetEditEngine().DoesKeyChangeText(rKeyEvt))) )
- */
- bool bIsProtected = mpMarginWin->IsProtected();
- if (!bIsProtected || (bIsProtected && !mpMarginWin->Engine()->GetEditEngine().DoesKeyChangeText(rKeyEvt)) )
- bDone = mpOutlinerView->PostKeyEvent( rKeyEvt );
- else
- InfoBox( this, SW_RES( MSG_READONLY_CONTENT )).Execute();
- }
- if (bDone)
- mpMarginWin->ResizeIfNeccessary(aOldHeight,mpMarginWin->GetPostItTextHeight());
- else
- {
- // write back data first when showing navigator
- if ( nKey==KEY_F5 )
- mpMarginWin->UpdateData();
- if (!pView->KeyInput(rKeyEvt))
- Window::KeyInput(rKeyEvt);
- }
- }
-
- pView->GetViewFrame()->GetBindings().InvalidateAll(FALSE);
-}
-
-void PostItTxt::MouseMove( const MouseEvent& rMEvt )
-{
- if ( mpOutlinerView )
- {
- mpOutlinerView->MouseMove( rMEvt );
- // mba: why does OutlinerView not handle the modifier setting?!
- // this forces the postit to handle *all* pointer types
- SetPointer( mpOutlinerView->GetPointer( rMEvt.GetPosPixel() ) );
-
- const EditView& aEV = mpOutlinerView->GetEditView();
- const SvxFieldItem* pItem = aEV.GetFieldUnderMousePointer();
- if ( pItem )
- {
- const SvxFieldData* pFld = pItem->GetField();
- const SvxURLField* pURL = PTR_CAST( SvxURLField, pFld );
- if ( pURL )
- {
- String sURL( pURL->GetURL() );
- SvtSecurityOptions aSecOpts;
- if ( aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK) )
- {
- sURL.InsertAscii( ": ", 0 );
- sURL.Insert( ViewShell::GetShellRes()->aHyperlinkClick, 0 );
- }
- Help::ShowQuickHelp( this,PixelToLogic(Rectangle(GetPosPixel(),Size(50,10))),sURL);
- }
- }
- }
-}
-
-void PostItTxt::MouseButtonDown( const MouseEvent& rMEvt )
-{
- if (mpOutlinerView )
- {
- SvtSecurityOptions aSecOpts;
- bool bExecuteMod = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK);
-
- if ( !bExecuteMod || (bExecuteMod && rMEvt.GetModifier() == KEY_MOD1))
- {
- const EditView& aEV = mpOutlinerView->GetEditView();
- const SvxFieldItem* pItem = aEV.GetFieldUnderMousePointer();
- if ( pItem )
- {
- const SvxFieldData* pFld = pItem->GetField();
- const SvxURLField* pURL = PTR_CAST( SvxURLField, pFld );
- if ( pURL )
- {
- mpOutlinerView->MouseButtonDown( rMEvt );
- SwWrtShell &rSh = mpMarginWin->DocView()->GetWrtShell();
- String sURL( pURL->GetURL() );
- String sTarget( pURL->GetTargetFrame() );
- ::LoadURL( sURL, &rSh, URLLOAD_NOFILTER, &sTarget);
- return;
- }
- }
- }
- }
-
- GrabFocus();
- if ( mpOutlinerView )
- mpOutlinerView->MouseButtonDown( rMEvt );
- mpMarginWin->DocView()->GetViewFrame()->GetBindings().InvalidateAll(FALSE);
-}
-
-void PostItTxt::MouseButtonUp( const MouseEvent& rMEvt )
-{
- if ( mpOutlinerView )
- mpOutlinerView->MouseButtonUp( rMEvt );
-}
-
-IMPL_LINK(PostItTxt, OnlineSpellCallback, SpellCallbackInfo*, pInfo)
-{
- if ( mpMarginWin && (pInfo->nCommand == SPELLCMD_STARTSPELLDLG) )
- mpMarginWin->DocView()->GetViewFrame()->GetDispatcher()->Execute( FN_SPELL_GRAMMAR_DIALOG, SFX_CALLMODE_ASYNCHRON);
- return 0;
-}
-
-IMPL_LINK( PostItTxt, Select, Menu*, pSelMenu )
-{
- mpMarginWin->ExecuteCommand( pSelMenu->GetCurItemId() );
- return 0;
-}
-
-void PostItTxt::Command( const CommandEvent& rCEvt )
-{
- if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
- {
- if (!mpMarginWin->IsProtected() &&
- //if (!mpMarginWin->IsReadOnly() && (mpMarginWin->GetStatus()!=SwPostItHelper::DELETED) &&
- mpOutlinerView->IsWrongSpelledWordAtPos( rCEvt.GetMousePosPixel(),TRUE ))
- {
- Link aLink = LINK(this, PostItTxt, OnlineSpellCallback);
- mpOutlinerView->ExecuteSpellPopup(rCEvt.GetMousePosPixel(),&aLink);
- }
- else
- {
- SfxPopupMenuManager* aMgr = mpMarginWin->DocView()->GetViewFrame()->GetDispatcher()->Popup(0, this,&rCEvt.GetMousePosPixel());
- XubString aText = ((PopupMenu*)aMgr->GetSVMenu())->GetItemText( FN_DELETE_NOTE_AUTHOR );
- SwRewriter aRewriter;
- aRewriter.AddRule(UNDO_ARG1, mpMarginWin->GetAuthor());
- aText = aRewriter.Apply(aText);
- ((PopupMenu*)aMgr->GetSVMenu())->SetItemText(FN_DELETE_NOTE_AUTHOR,aText);
- // SwPostItLinkForwarder_Impl aFwd( ((PopupMenu*)aMgr->GetSVMenu())->pSvMenu->GetSelectHdl(), mpPostIt );
- // ((PopupMenu*)aMgr->GetSVMenu())->pSvMenu->SetSelectHdl( LINK(&aFwd, SwPostItLinkForwarder_Impl, Select) );
-
- ((PopupMenu*)aMgr->GetSVMenu())->SetSelectHdl( LINK(this, PostItTxt, Select) );
-
- if (rCEvt.IsMouseEvent())
- ((PopupMenu*)aMgr->GetSVMenu())->Execute(this,rCEvt.GetMousePosPixel());
- else
- {
- const Size aSize = GetSizePixel();
- const Point aPos = Point( aSize.getWidth()/2, aSize.getHeight()/2 );
- ((PopupMenu*)aMgr->GetSVMenu())->Execute(this,aPos);
- }
- delete aMgr;
- }
- }
- else
- if (rCEvt.GetCommand() == COMMAND_WHEEL)
- {
- if (mpMarginWin->Scrollbar()->IsVisible())
- {
- const CommandWheelData* pData = rCEvt.GetWheelData();
- if (pData->IsShift() || pData->IsMod1() || pData->IsMod2())
- {
- mpMarginWin->DocView()->HandleWheelCommands(rCEvt);
- }
- else
- {
- HandleScrollCommand( rCEvt, 0 , mpMarginWin->Scrollbar());
-
- /*
- long nLines = pData->GetNotchDelta() * (long)pData->GetScrollLines();
- if ( ((mpMarginWin->Scrollbar()->GetRange().Min() == mpMarginWin->Scrollbar()->GetThumbPos()) && (nLines > 0)) ||
- ( (mpMarginWin->Scrollbar()->GetRange().Max() == mpMarginWin->Scrollbar()->GetThumbPos()+mpMarginWin->Scrollbar()->GetVisibleSize()) && (nLines < 0)) )
- {
- mpMarginWin->DocView()->HandleWheelCommands(rCEvt);
- }
- else
- {
- HandleScrollCommand( rCEvt, 0 , mpMarginWin->Scrollbar());
- }
- */
- }
- }
- else
- {
- mpMarginWin->DocView()->HandleWheelCommands(rCEvt);
- }
- }
- else
- {
- if ( mpOutlinerView )
- mpOutlinerView->Command( rCEvt );
- else
- Window::Command(rCEvt);
- }
-}
-
-void PostItTxt::DataChanged( const DataChangedEvent& aData)
-{
- Window::DataChanged( aData );
-}
-
-IMPL_LINK( PostItTxt, WindowEventListener, VclSimpleEvent*, pWinEvent )
-{
- if ( pWinEvent && pWinEvent->ISA( VclWindowEvent ) )
- {
- VclWindowEvent *pEvent = (VclWindowEvent*)pWinEvent;
- if (pEvent->GetId() == VCLEVENT_WINDOW_MOUSEMOVE)
- {
- MouseEvent* pMouseEvt = (MouseEvent*)pEvent->GetData();
- if ( pMouseEvt->IsEnterWindow() )
- {
- mMouseOver = true;
- if (!mbShowPopup && !HasFocus())
- {
- mpMarginWin->SetViewState(SS_VIEW);
- Invalidate();
- }
- }
- else if ( pMouseEvt->IsLeaveWindow())
- {
- if (mpMarginWin->IsPreview())
- {
- //mpMarginWin->doLazyDelete();
- }
- else
- {
- mMouseOver = false;
- if (!mbShowPopup && !HasFocus())
- {
- mpMarginWin->SetViewState(SS_NORMAL);
- Invalidate();
- }
- }
- }
- }
- }
- return sal_True;
-}
-
-XubString PostItTxt::GetSurroundingText() const
-{
- if( mpOutlinerView )
- return mpOutlinerView->GetSurroundingText();
- else
- return XubString::EmptyString();
-}
-
-Selection PostItTxt::GetSurroundingTextSelection() const
-{
- if( mpOutlinerView )
- return mpOutlinerView->GetSurroundingTextSelection();
- else
- return Selection( 0, 0 );
-}
-
-/************** SwMarginWin***********************************++*/
-SwMarginWin::SwMarginWin(Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits)
-: Window(pParent, nBits),
- mnEventId(0),
- mpOutlinerView(0),
- mpOutliner(0),
- mpPostItTxt(0),
- mpMeta(0),
- mpVScrollbar(0),
- mpAnkor(0),
- mpShadow(0),
- mpMgr(aMgr),
- mbMeta(true),
- nFlags(aBits),
- mbMouseOverButton(false),
- mpButtonPopup(0),
- mbIsFollow(false)
-{
- SwEditWin* aWin = static_cast<SwEditWin*>(GetParent());
- mpView = &aWin->GetView();
-
- SdrPaintWindow* pPaintWindow = mpView->GetDrawView()->GetPaintWindow(0);
- if(pPaintWindow)
- {
- pOverlayManager = pPaintWindow->GetOverlayManager();
-
- mpShadow = new SwPostItShadow(basegfx::B2DPoint(0,0),basegfx::B2DPoint(0,0),Color(0,0,0),SS_NORMAL);
- mpShadow->setVisible(false);
- pOverlayManager->add(*mpShadow);
- }
-}
-
-SwMarginWin::~SwMarginWin()
-{
- if (mpOutlinerView)
- {
- delete mpOutlinerView;
- }
-
- if (mpOutliner)
- {
- delete mpOutliner;
- }
-
- if (mpMeta)
- {
- mpMeta->RemoveEventListener( LINK( mpPostItTxt, PostItTxt, WindowEventListener ) );
- delete mpMeta;
- }
-
- if (mpPostItTxt)
- {
- delete mpPostItTxt;
- }
-
- if (mpVScrollbar)
- {
- delete mpVScrollbar;
- }
-
- if (mpAnkor)
- {
- if (mpAnkor->getOverlayManager())
- {
- // remove this object from the chain
- mpAnkor->getOverlayManager()->remove(*mpAnkor);
- }
- delete mpAnkor;
- }
-
- if (mpShadow)
- {
- if (mpShadow->getOverlayManager())
- {
- mpShadow->getOverlayManager()->remove(*mpShadow);
- }
- delete mpShadow;
- }
-
- if (mpButtonPopup)
- {
- delete mpButtonPopup;
- }
-
- if (mnEventId)
- Application::RemoveUserEvent( mnEventId );
-}
-
-void SwMarginWin::Paint( const Rectangle& rRect)
-{
- Window::Paint(rRect);
-
- if (mpMeta->IsVisible() )
- {
- //draw left over space
- if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
- SetFillColor(COL_BLACK);
- else
- SetFillColor(mColorDark);
- SetLineColor();
- DrawRect(PixelToLogic(Rectangle(Point(mpMeta->GetPosPixel().X()+mpMeta->GetSizePixel().Width(),mpMeta->GetPosPixel().Y()),Size(GetMetaButtonAreaWidth(),mpMeta->GetSizePixel().Height()))));
-
- if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode())
- {
- //draw rect around button
- SetFillColor(COL_BLACK);
- SetLineColor(COL_WHITE);
- }
- else
- {
- //draw button
- Gradient aGradient;
- if (mbMouseOverButton)
- aGradient = Gradient(GRADIENT_LINEAR,ColorFromAlphaColor(80,mColorAnkor,mColorDark),ColorFromAlphaColor(15,mColorAnkor,mColorDark));
- else
- aGradient = Gradient(GRADIENT_LINEAR,ColorFromAlphaColor(15,mColorAnkor,mColorDark),ColorFromAlphaColor(80,mColorAnkor,mColorDark));
- DrawGradient(mRectMetaButton,aGradient);
- //draw rect around button
- SetFillColor();
- SetLineColor(ColorFromAlphaColor(90,mColorAnkor,mColorDark));
- }
- DrawRect(mRectMetaButton);
-
- if (IsPreview())
- {
- Font aOldFont( GetFont());
- Font aFont(aOldFont);
- Color aCol( COL_BLACK);
- aFont.SetColor( aCol );
- aFont.SetHeight(200);
- aFont.SetWeight(WEIGHT_MEDIUM);
- SetFont( aFont );
- DrawText(mRectMetaButton,rtl::OUString::createFromAscii("Edit Note"),TEXT_DRAW_CENTER);
- SetFont( aOldFont );
- }
- else
- {
- //draw arrow
- if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
- SetFillColor(COL_WHITE);
- else
- SetFillColor(COL_BLACK);
- SetLineColor();
- DrawPolygon(Polygon(aPopupTriangle));
- }
- }
-}
-
-void SwMarginWin::SetPosSizePixelRect(long nX, long nY,long nWidth, long nHeight,const SwRect &aRect, const long aPageBorder)
-{
- mbMeta = true;
- mPosSize = Rectangle(Point(nX,nY),Size(nWidth,nHeight));
- mAnkorRect = aRect;
- mPageBorder = aPageBorder;
-}
-
-void SwMarginWin::SetSize( const Size& rNewSize )
-{
- mPosSize.SetSize(rNewSize);
-}
-
-void SwMarginWin::SetVirtualPosSize( const Point& aPoint, const Size& aSize)
-{
- mPosSize = Rectangle(aPoint,aSize);
-}
-
-void SwMarginWin::TranslateTopPosition(const long aAmount)
-{
- mPosSize.Move(0,aAmount);
-}
-
-void SwMarginWin::ShowAnkorOnly(const Point &aPoint)
-{
- HideNote();
- SetPosAndSize();
- if (mpAnkor)
- {
- mpAnkor->SetSixthPosition(basegfx::B2DPoint(aPoint.X(),aPoint.Y()));
- mpAnkor->SetSeventhPosition(basegfx::B2DPoint(aPoint.X(),aPoint.Y()));
- mpAnkor->SetAnkorState(AS_ALL);
- mpAnkor->setVisible(true);
- }
- if (mpShadow)
- mpShadow->setVisible(false);
-}
-
-SfxItemSet SwMarginWin::DefaultItem()
-{
- SfxItemSet aItem( mpView->GetDocShell()->GetPool() );
- aItem.Put(SvxFontHeightItem(200,100,EE_CHAR_FONTHEIGHT));
- aItem.Put(SvxFontItem(FAMILY_SWISS,GetSettings().GetStyleSettings().GetFieldFont().GetName(),
- EMPTYSTRING,PITCH_DONTKNOW,RTL_TEXTENCODING_DONTKNOW,EE_CHAR_FONTINFO));
- return aItem;
-}
-
-void SwMarginWin::InitControls()
-{
- // actual window which holds the user text
- mpPostItTxt = new PostItTxt(this, WB_NODIALOGCONTROL);
- mpPostItTxt->SetPointer(Pointer(POINTER_TEXT));
-
- // window control for author and date
- mpMeta = new MultiLineEdit(this,0);
- mpMeta->SetReadOnly();
- mpMeta->SetRightToLeft(Application::GetSettings().GetLayoutRTL());
- mpMeta->AlwaysDisableInput(true);
- mpMeta->SetCallHandlersOnInputDisabled(true);
- mpMeta->AddEventListener( LINK( mpPostItTxt, PostItTxt, WindowEventListener ) );
- AddEventListener( LINK( mpPostItTxt, PostItTxt, WindowEventListener ) );
-
- // we should leave this setting alone, but for this we need a better layout algo
- // with variable meta size height
- AllSettings aSettings = mpMeta->GetSettings();
- StyleSettings aStyleSettings = aSettings.GetStyleSettings();
- Font aFont = aStyleSettings.GetFieldFont();
- aFont.SetHeight(8);
- aStyleSettings.SetFieldFont(aFont);
- aSettings.SetStyleSettings(aStyleSettings);
- mpMeta->SetSettings(aSettings);
-
- SwDocShell* aShell = mpView->GetDocShell();
- mpOutliner = new Outliner(&aShell->GetPool(),OUTLINERMODE_TEXTOBJECT);
- aShell->GetDoc()->SetCalcFieldValueHdl( mpOutliner );
- // mpOutliner->EnableUndo( FALSE );
- mpOutliner->SetUpdateMode( TRUE );
- Rescale();
-
- OutputDevice* pDev = aShell->GetDoc()->getReferenceDevice(TRUE);
- if ( pDev )
- {
- mpOutliner->SetRefDevice( pDev );
- }
-
- mpOutlinerView = new OutlinerView ( mpOutliner, mpPostItTxt );
- mpOutlinerView->SetBackgroundColor(COL_TRANSPARENT);
- mpOutliner->InsertView(mpOutlinerView );
- mpPostItTxt->SetTextView(mpOutlinerView);
- mpOutlinerView->SetOutputArea( PixelToLogic( Rectangle(0,0,1,1) ) );
-
- mpOutlinerView->SetAttribs(DefaultItem());
-
- // TODO: ??
- EEHorizontalTextDirection aDefHoriTextDir = Application::GetSettings().GetLayoutRTL() ? EE_HTEXTDIR_R2L : EE_HTEXTDIR_L2R;
- mpOutliner->SetDefaultHorizontalTextDirection( aDefHoriTextDir );
-
- //create Scrollbars
- mpVScrollbar = new ScrollBar(this, WB_3DLOOK |WB_VSCROLL|WB_DRAG);
- mpVScrollbar->EnableNativeWidget(false);
- mpVScrollbar->EnableRTL( false );
- mpVScrollbar->SetScrollHdl(LINK(this, SwMarginWin, ScrollHdl));
- mpVScrollbar->EnableDrag();
- mpVScrollbar->AddEventListener( LINK( mpPostItTxt, PostItTxt, WindowEventListener ) );
-
- const SwViewOption* pVOpt = mpView->GetWrtShellPtr()->GetViewOptions();
- ULONG nCntrl = mpOutliner->GetControlWord();
- // TODO: crash when AUTOCOMPLETE enabled
- nCntrl |= EE_CNTRL_MARKFIELDS | EE_CNTRL_PASTESPECIAL | EE_CNTRL_AUTOCORRECT | EV_CNTRL_AUTOSCROLL | EE_CNTRL_URLSFXEXECUTE; // | EE_CNTRL_AUTOCOMPLETE;
- if (pVOpt->IsFieldShadings())
- nCntrl |= EE_CNTRL_MARKFIELDS;
- else
- nCntrl &= ~EE_CNTRL_MARKFIELDS;
- if (pVOpt->IsOnlineSpell())
- nCntrl |= EE_CNTRL_ONLINESPELLING;
- else
- nCntrl &= ~EE_CNTRL_ONLINESPELLING;
- mpOutliner->SetControlWord(nCntrl);
-
- sal_uInt16 aIndex = SW_MOD()->InsertRedlineAuthor(GetAuthor());
- SetColor(mpMgr->GetColorDark(aIndex),mpMgr->GetColorLight(aIndex),mpMgr->GetColorAnkor(aIndex));
-
- CheckMetaText();
- SetPopup();
- SetLanguage(GetLanguage());
- View()->StartSpeller();
- SetPostItText();
- Engine()->CompleteOnlineSpelling();
-
- mpMeta->Show();
- mpVScrollbar->Show();
- mpPostItTxt->Show();
-}
-
-void SwMarginWin::CheckMetaText()
-{
- const LocaleDataWrapper& rLocalData = SvtSysLocale().GetLocaleData();
- String sMeta = GetAuthor();
- if (sMeta==String(EMPTYSTRING))
- sMeta = String(SW_RES(STR_NOAUTHOR));
- if (sMeta.Len() > 22)
- {
- sMeta.Erase(20);
- sMeta = sMeta + rtl::OUString::createFromAscii("...");
- }
- Date aDate = GetDate();
- if (aDate==Date())
- sMeta = sMeta + LINEBREAK + String(SW_RES(STR_POSTIT_TODAY));
- else
- if (aDate == Date(Date()-1))
- sMeta = sMeta + LINEBREAK + String(SW_RES(STR_POSTIT_YESTERDAY));
- else
- if (aDate.IsValid() )
- sMeta = sMeta + LINEBREAK + rLocalData.getDate(aDate);
- else
- sMeta = sMeta + LINEBREAK + String(SW_RES(STR_NODATE));
- if (GetTime()!=0)
- sMeta = sMeta + rtl::OUString::createFromAscii(" ") + rLocalData.getTime( GetTime(),false );
- if (mpMeta->GetText() != sMeta)
- mpMeta->SetText(sMeta);
-}
-
-void SwMarginWin::Rescale()
-{
- MapMode aMode = GetParent()->GetMapMode();
- aMode.SetOrigin( Point() );
- //aMode.SetScaleX( aMode.GetScaleX() * Fraction( 8, 10 ) );
- //aMode.SetScaleY( aMode.GetScaleY() * Fraction( 8, 10 ) );
- mpOutliner->SetRefMapMode( aMode );
- SetMapMode( aMode );
- mpPostItTxt->SetMapMode( aMode );
- if ( mpMeta )
- {
- Font aFont( mpMeta->GetSettings().GetStyleSettings().GetFieldFont() );
- sal_Int32 nHeight = aFont.GetHeight();
- nHeight = nHeight * aMode.GetScaleY().GetNumerator() / aMode.GetScaleY().GetDenominator();
- aFont.SetHeight( nHeight );
- mpMeta->SetControlFont( aFont );
- }
-}
-
-void SwMarginWin::SetPosAndSize()
-{
- bool bChange = false;
-
- if (GetSizePixel() != mPosSize.GetSize())
- {
- bChange = true;
- SetSizePixel(mPosSize.GetSize());
- DoResize();
- }
-
- if (GetPosPixel().X() != mPosSize.TopLeft().X() || (abs(GetPosPixel().Y() - mPosSize.TopLeft().Y()) > 5) )
- {
- bChange = true;
- SetPosPixel(mPosSize.TopLeft());
-
- Point aLineStart;
- Point aLineEnd ;
- if (mbMarginSide)
- {
- aLineStart = EditWin()->PixelToLogic( Point(GetPosPixel().X()+GetSizePixel().Width(),GetPosPixel().Y()-1) );
- aLineEnd = EditWin()->PixelToLogic( Point(GetPosPixel().X(),GetPosPixel().Y()-1) );
- }
- else
- {
- aLineStart = EditWin()->PixelToLogic( Point(GetPosPixel().X(),GetPosPixel().Y()-1) );
- aLineEnd = EditWin()->PixelToLogic( Point(GetPosPixel().X()+GetSizePixel().Width(),GetPosPixel().Y()-1) );
- }
-
- if (!IsPreview())
- {
- if (mpAnkor)
- {
- mpAnkor->SetAllPosition(basegfx::B2DPoint( mAnkorRect.Left() , mAnkorRect.Bottom() - 5* 15),
- basegfx::B2DPoint( mAnkorRect.Left()-5*15 , mAnkorRect.Bottom()+5*15),
- basegfx::B2DPoint( mAnkorRect.Left()+5*15 , mAnkorRect.Bottom()+5*15),
- basegfx::B2DPoint( mAnkorRect.Left(), mAnkorRect.Bottom()+2*15),
- basegfx::B2DPoint( mPageBorder ,mAnkorRect.Bottom()+2*15),
- basegfx::B2DPoint( aLineStart.X(),aLineStart.Y()),
- basegfx::B2DPoint( aLineEnd.X(),aLineEnd.Y()));
- mpAnkor->SetHeight(mAnkorRect.Height());
- }
- else
- {
- mpAnkor = new SwPostItAnkor(basegfx::B2DPoint( mAnkorRect.Left() , mAnkorRect.Bottom()-5*15),
- basegfx::B2DPoint( mAnkorRect.Left()-5*15 , mAnkorRect.Bottom()+5*15),
- basegfx::B2DPoint( mAnkorRect.Left()+5*15 , mAnkorRect.Bottom()+5*15),
- basegfx::B2DPoint( mAnkorRect.Left(), mAnkorRect.Bottom()+2*15),
- basegfx::B2DPoint( mPageBorder ,mAnkorRect.Bottom()+2*15),
- basegfx::B2DPoint( aLineStart.X(),aLineStart.Y()),
- basegfx::B2DPoint( aLineEnd.X(),aLineEnd.Y()) ,
- mColorAnkor,
- false,
- false);
- mpAnkor->SetHeight(mAnkorRect.Height());
- mpAnkor->setVisible(true);
- mpAnkor->SetAnkorState(AS_TRI);
- if (HasChildPathFocus())
- {
- mpAnkor->setLineSolid(true);
- }
- pOverlayManager->add(*mpAnkor);
- }
- }
- }
- else
- {
- if ( mpAnkor && (mpAnkor->getBasePosition() != basegfx::B2DPoint( mAnkorRect.Left() , mAnkorRect.Bottom()-5*15)) )
- mpAnkor->SetTriPosition(basegfx::B2DPoint( mAnkorRect.Left() , mAnkorRect.Bottom() - 5* 15),
- basegfx::B2DPoint( mAnkorRect.Left()-5*15 , mAnkorRect.Bottom()+5*15),
- basegfx::B2DPoint( mAnkorRect.Left()+5*15 , mAnkorRect.Bottom()+5*15),
- basegfx::B2DPoint( mAnkorRect.Left(), mAnkorRect.Bottom()+2*15),
- basegfx::B2DPoint( mPageBorder ,mAnkorRect.Bottom()+2*15));
- }
-
- if (bChange)
- {
- Point aStart = EditWin()->PixelToLogic(GetPosPixel()+Point(0,GetSizePixel().Height()));
- Point aEnd = EditWin()->PixelToLogic(GetPosPixel()+Point(GetSizePixel().Width()-1,GetSizePixel().Height()));
- mpShadow->SetPosition(basegfx::B2DPoint(aStart.X(),aStart.Y()), basegfx::B2DPoint(aEnd.X(),aEnd.Y()));
- }
-
- if (mpMgr->ShowNotes())
- {
- if (IsFollow() && !HasChildPathFocus())
- {
- mpAnkor->SetAnkorState(AS_END);
- }
- else
- {
- mpAnkor->SetAnkorState(AS_ALL);
- SwMarginWin* pWin = GetTopReplyNote();
- if (pWin)
- pWin->Ankor()->SetAnkorState(AS_END);
- }
- }
-}
-
-void SwMarginWin::DoResize()
-{
- long aTextHeight = LogicToPixel( mpOutliner->CalcTextSize()).Height();
- long aHeight = GetSizePixel().Height();
- unsigned long aWidth = GetSizePixel().Width();
-
- if (mbMeta)
- {
- aHeight -= GetMetaHeight();
- mpMeta->Show();
- mpPostItTxt->SetQuickHelpText(EMPTYSTRING);
- }
- else
- {
- mpMeta->Hide();
- mpPostItTxt->SetQuickHelpText(mpMeta->GetText());
- }
-
- if ((aTextHeight > aHeight) && !IsPreview())
- { // we need vertical scrollbars and have to reduce the width
- aWidth -= GetScrollbarWidth();
- mpVScrollbar->Show();
- }
- else
- {
- mpVScrollbar->Hide();
- }
-
- mpMeta->SetPosSizePixel(0,aHeight,GetSizePixel().Width()-GetMetaButtonAreaWidth(),GetMetaHeight());
- mpOutliner->SetPaperSize( PixelToLogic( Size(aWidth,aHeight) ) ) ;
- mpOutlinerView->SetOutputArea( PixelToLogic( Rectangle(0,0,aWidth,aHeight) ) );
- if (!mpVScrollbar->IsVisible())
- { // if we do not have a scrollbar anymore, we want to see the complete text
- mpOutlinerView->SetVisArea( PixelToLogic( Rectangle(0,0,aWidth,aHeight) ) );
- }
-
- if (!Application::GetSettings().GetLayoutRTL())
- {
- mpPostItTxt->SetPosSizePixel(0, 0, aWidth, aHeight);
- mpVScrollbar->SetPosSizePixel( aWidth, 0, GetScrollbarWidth(), aHeight);
- }
- else
- {
- mpPostItTxt->SetPosSizePixel((aTextHeight > aHeight) && !IsPreview() ? GetScrollbarWidth() : 0 , 0, aWidth, aHeight);
- mpVScrollbar->SetPosSizePixel( 0, 0, GetScrollbarWidth(), aHeight);
- }
-
- mpVScrollbar->SetVisibleSize( PixelToLogic(Size(0,aHeight)).Height() );
- mpVScrollbar->SetPageSize( PixelToLogic(Size(0,aHeight)).Height() * 8 / 10 );
- mpVScrollbar->SetLineSize( mpOutliner->GetTextHeight() / 10 );
- SetScrollbar();
- mpVScrollbar->SetRange( Range(0, mpOutliner->GetTextHeight()));
-
- //calculate rects for meta- button
- const Fraction& fx( GetMapMode().GetScaleX() );
- const Fraction& fy( GetMapMode().GetScaleY() );
-
- Point aPos( mpMeta->GetPosPixel());
- Point aBase( aPos.X() + aPos.X() + GetSizePixel().Width(), aPos.Y() );
- Point aLeft = PixelToLogic( Point( aBase.X() - (METABUTTON_WIDTH+5)*fx.GetNumerator()/fx.GetDenominator(), aBase.Y()+17*fy.GetNumerator()/fx.GetDenominator() ) );
- Point aRight = PixelToLogic( Point( aBase.X() - (METABUTTON_WIDTH-1)*fx.GetNumerator()/fx.GetDenominator(), aBase.Y()+17*fy.GetNumerator()/fy.GetDenominator() ) );
- Point aBottom = PixelToLogic( Point( aBase.X() - (METABUTTON_WIDTH+2)*fx.GetNumerator()/fx.GetDenominator(), aBase.Y()+20*fy.GetNumerator()/fy.GetDenominator() ) );
-
- aPopupTriangle.clear();
- aPopupTriangle.append(basegfx::B2DPoint(aLeft.X(),aLeft.Y()));
- aPopupTriangle.append(basegfx::B2DPoint(aRight.X(),aRight.Y()));
- aPopupTriangle.append(basegfx::B2DPoint(aBottom.X(),aBottom.Y()));
- aPopupTriangle.setClosed(true);
- if (IsPreview())
- mRectMetaButton = PixelToLogic( Rectangle( Point(
- aPos.X()+GetSizePixel().Width()-(METABUTTON_WIDTH*4+10)*fx.GetNumerator()/fx.GetDenominator(),
- aPos.Y()+5*fy.GetNumerator()/fy.GetDenominator() ),
- Size( METABUTTON_WIDTH*4*fx.GetNumerator()/fx.GetDenominator(), METABUTTON_HEIGHT*fy.GetNumerator()/fy.GetDenominator() ) ) );
- else
- mRectMetaButton = PixelToLogic( Rectangle( Point(
- aPos.X()+GetSizePixel().Width()-(METABUTTON_WIDTH+10)*fx.GetNumerator()/fx.GetDenominator(),
- aPos.Y()+5*fy.GetNumerator()/fy.GetDenominator() ),
- Size( METABUTTON_WIDTH*fx.GetNumerator()/fx.GetDenominator(), METABUTTON_HEIGHT*fy.GetNumerator()/fy.GetDenominator() ) ) );
-}
-
-void SwMarginWin::SetSizePixel( const Size& rNewSize )
-{
- Window::SetSizePixel(rNewSize);
-
- if (mpShadow)
- {
- Point aStart = EditWin()->PixelToLogic(GetPosPixel()+Point(0,GetSizePixel().Height()));
- Point aEnd = EditWin()->PixelToLogic(GetPosPixel()+Point(GetSizePixel().Width()-1,GetSizePixel().Height()));
- mpShadow->SetPosition(basegfx::B2DPoint(aStart.X(),aStart.Y()), basegfx::B2DPoint(aEnd.X(),aEnd.Y()));
- }
-}
-
-void SwMarginWin::SetScrollbar()
-{
- mpVScrollbar->SetThumbPos( mpOutlinerView->GetVisArea().Top()+ mpOutlinerView->GetEditView().GetCursor()->GetOffsetY());
-}
-
-void SwMarginWin::ResizeIfNeccessary(long aOldHeight, long aNewHeight)
-{
- if (aOldHeight != aNewHeight)
- {
- //check for lower border or next note
- long aBorder = mpMgr->GetNextBorder();
- if (aBorder != -1)
- {
- if (aNewHeight > GetMinimumSizeWithoutMeta())
- {
- long aNewLowerValue = GetPosPixel().Y() + aNewHeight + GetMetaHeight();
- if (aNewLowerValue < aBorder)
- SetSizePixel(Size(GetSizePixel().Width(),aNewHeight+GetMetaHeight()));
- else
- SetSizePixel(Size(GetSizePixel().Width(),aBorder - GetPosPixel().Y()));
- DoResize();
- Invalidate();
- }
- else
- {
- if (GetSizePixel().Height() != GetMinimumSizeWithoutMeta() + GetMetaHeight())
- SetSizePixel(Size(GetSizePixel().Width(),GetMinimumSizeWithoutMeta() + GetMetaHeight()));
- DoResize();
- Invalidate();
- }
- }
- else
- {
- DoResize();
- Invalidate();
- }
- }
- else
- {
- SetScrollbar();
- }
-}
-
-void SwMarginWin::SetColor(Color aColorDark,Color aColorLight, Color aColorAnkor)
-{
- mColorDark = aColorDark;
- mColorLight = aColorLight;
- mColorAnkor = aColorAnkor;
-
- if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
- {
- //Wallpaper aWall(Gradient(GRADIENT_LINEAR,mColorLight,mColorDark));
- //mpPostItTxt->SetBackground(aWall);
-
- mpMeta->SetControlBackground(mColorDark);
- AllSettings aSettings = mpMeta->GetSettings();
- StyleSettings aStyleSettings = aSettings.GetStyleSettings();
- aStyleSettings.SetFieldTextColor(aColorAnkor);
- aSettings.SetStyleSettings(aStyleSettings);
- mpMeta->SetSettings(aSettings);
-
- AllSettings aSettings2 = mpVScrollbar->GetSettings();
- StyleSettings aStyleSettings2 = aSettings2.GetStyleSettings();
- aStyleSettings2.SetButtonTextColor(Color(0,0,0));
- //aStyleSettings2.SetLightColor(mColorAnkor);
- aStyleSettings2.SetCheckedColor(mColorLight); //hintergund
- //aStyleSettings2.SetLightBorderColor(mColorAnkor);
- aStyleSettings2.SetShadowColor(mColorAnkor);
- aStyleSettings2.SetFaceColor(mColorDark);
- aSettings2.SetStyleSettings(aStyleSettings2);
- mpVScrollbar->SetSettings(aSettings2);
- }
-}
-
-void SwMarginWin::SetMarginSide(bool aMarginSide)
-{
- mbMarginSide = aMarginSide;
-}
-
-void SwMarginWin::SetReadonly(BOOL bSet)
-{
- mbReadonly = bSet;
- View()->SetReadOnly(bSet);
-}
-
-void SwMarginWin::SetLanguage(const SvxLanguageItem aNewItem)
-{
- Engine()->SetModifyHdl( Link() );
- ESelection aOld = View()->GetSelection();
-
- ESelection aNewSelection( 0, 0, (USHORT)Engine()->GetParagraphCount()-1, USHRT_MAX );
- View()->SetSelection( aNewSelection );
- SfxItemSet aEditAttr(View()->GetAttribs());
- aEditAttr.Put(aNewItem);
- View()->SetAttribs( aEditAttr );
-
- View()->SetSelection(aOld);
- Engine()->SetModifyHdl( LINK( this, SwPostIt, ModifyHdl ) );
-
- const SwViewOption* pVOpt = DocView()->GetWrtShellPtr()->GetViewOptions();
- ULONG nCntrl = Engine()->GetControlWord();
- // turn off
- if (!pVOpt->IsOnlineSpell())
- nCntrl &= ~EE_CNTRL_ONLINESPELLING;
- else
- nCntrl &= ~EE_CNTRL_ONLINESPELLING;
- Engine()->SetControlWord(nCntrl);
-
- //turn back on
- if (pVOpt->IsOnlineSpell())
- nCntrl |= EE_CNTRL_ONLINESPELLING;
- else
- nCntrl &= ~EE_CNTRL_ONLINESPELLING;
- Engine()->SetControlWord(nCntrl);
-
- Engine()->CompleteOnlineSpelling();
- Invalidate();
-}
-
-void SwMarginWin::DataChanged( const DataChangedEvent& aEvent)
-{
- Window::DataChanged( aEvent );
-}
-
-void SwMarginWin::GetFocus()
-{
- if (mpPostItTxt)
- mpPostItTxt->GrabFocus();
-}
-
-void SwMarginWin::LoseFocus()
-{
-}
-
-void SwMarginWin::ShowNote()
-{
- SetPosAndSize();
- if (!IsVisible())
- Window::Show();
- if (mpAnkor && !mpShadow->isVisible())
- mpShadow->setVisible(true);
- if (mpAnkor && !mpAnkor->isVisible())
- mpAnkor->setVisible(true);
-}
-
-void SwMarginWin::HideNote()
-{
- if (IsVisible())
- Window::Hide();
- if (mpAnkor)
- {
- if (mpMgr->IsShowAnkor())
- mpAnkor->SetAnkorState(AS_TRI);
- else
- mpAnkor->setVisible(false);
- }
- if (mpShadow && mpShadow->isVisible())
- mpShadow->setVisible(false);
-}
-
-void SwMarginWin::ActivatePostIt()
-{
- mpMgr->AssureStdModeAtShell();
-
- mpOutliner->ClearModifyFlag();
- mpOutliner->GetUndoManager().Clear();
-
- CheckMetaText();
- SetViewState(SS_EDIT);
- View()->ShowCursor();
-
- mpOutlinerView->GetEditView().SetInsertMode(mpView->GetWrtShellPtr()->IsInsMode());
-
- if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
- View()->SetBackgroundColor(mColorDark);
-
- // mpPostItTxt->SetBackground(Wallpaper(mColorDark));
-}
-
-void SwMarginWin::DeactivatePostIt()
-{
- // remove selection, #i87073#
- if (View()->GetEditView().HasSelection())
- {
- ESelection aSelection = View()->GetEditView().GetSelection();
- aSelection.nEndPara = aSelection.nStartPara;
- aSelection.nEndPos = aSelection.nStartPos;
- View()->GetEditView().SetSelection(aSelection);
- }
-
- mpOutliner->CompleteOnlineSpelling();
-
- SetViewState(SS_NORMAL);
- // write the visible text back into the SwField
- UpdateData();
-
- if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
- View()->SetBackgroundColor(COL_TRANSPARENT);
-
- //mpPostItTxt->SetBackground(Gradient(GRADIENT_LINEAR,mColorLight,mColorDark));
-
- if ( !IsProtected() &&
- //if (!IsReadOnly() && (GetStatus()!=SwPostItHelper::DELETED) &&
- Engine()->GetEditEngine().GetText()==String(EMPTYSTRING) )
- mnEventId = Application::PostUserEvent( LINK( this, SwMarginWin, DeleteHdl), 0 );
-}
-
-void SwMarginWin::ToggleInsMode()
-{
- if (!mpView->GetWrtShell().IsRedlineOn())
- {
- //change outliner
- mpOutlinerView->GetEditView().SetInsertMode(!mpOutlinerView->GetEditView().IsInsertMode());
- //change documnet
- mpView->GetWrtShell().ToggleInsMode();
- //update statusbar
- SfxBindings &rBnd = mpView->GetViewFrame()->GetBindings();
- rBnd.Invalidate(SID_ATTR_INSERT);
- rBnd.Update(SID_ATTR_INSERT);
- }
-}
-
-void SwMarginWin::ExecuteCommand(USHORT nSlot)
-{
- mpMgr->AssureStdModeAtShell();
-
- switch (nSlot)
- {
- case FN_POSTIT:
- case FN_REPLY:
- {
- // if this note is empty, it will be deleted once losing the focus, so no reply, but only a new note
- // will be created
- SwView* pView = DocView();
- if (Engine()->GetEditEngine().GetText() != String(EMPTYSTRING))
- {
- OutlinerParaObject* pPara = new OutlinerParaObject(*View()->GetEditView().CreateTextObject());
- Mgr()->RegisterAnswer(pPara);
- }
- if (Mgr()->GetActivePostIt())
- Mgr()->SetActivePostIt(0);
- SwitchToFieldPos();
- pView->GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT);
- break;
- }
- case FN_DELETE_COMMENT:
- case FN_DELETE_NOTE:
-
- //Delete(); // do not kill the parent of our open popup menu
- mnEventId = Application::PostUserEvent( LINK( this, SwMarginWin, DeleteHdl), 0 );
- break;
- /*
- case FN_HIDE_NOTE:
- if ( Mgr()->GetActivePostIt() == this )
- {
- Mgr()->SetActivePostIt(0);
- // put the cursor back into the document
- SwitchToFieldPos();
- }
- Mgr()->Hide(mpFld);
- break;
- */
- case FN_DELETE_ALL_NOTES:
- case FN_HIDE_ALL_NOTES:
- // not possible as slot as this would require that "this" is the active postit
- DocView()->GetViewFrame()->GetBindings().Execute( nSlot, 0, 0, SFX_CALLMODE_ASYNCHRON );
- break;
- case FN_DELETE_NOTE_AUTHOR:
- case FN_HIDE_NOTE_AUTHOR:
- {
- // not possible as slot as this would require that "this" is the active postit
- SfxStringItem aItem( nSlot, GetAuthor() );
- const SfxPoolItem* aItems[2];
- aItems[0] = &aItem;
- aItems[1] = 0;
- DocView()->GetViewFrame()->GetBindings().Execute( nSlot, aItems, 0, SFX_CALLMODE_ASYNCHRON );
- }
- default:
- mpView->GetViewFrame()->GetBindings().Execute( nSlot );
- break;
- }
-}
-
-bool SwMarginWin::CalcFollow()
-{
- return false;
-}
-
-SwEditWin* SwMarginWin::EditWin()
-{
- return &mpView->GetEditWin();
-}
-
-String SwPostIt::GetAuthor()
-{
- return mpFld->GetPar1();
-}
-
-Date SwPostIt::GetDate()
-{
- return mpFld->GetDate();
-}
-
-Time SwPostIt::GetTime()
-{
- return mpFld->GetTime();
-}
-
-long SwMarginWin::GetPostItTextHeight()
-{
- return mpOutliner ? LogicToPixel(mpOutliner->CalcTextSize()).Height() : 0;
-}
-
-void SwMarginWin::SwitchToPostIt(USHORT aDirection)
-{
- if (mpMgr)
- {
- SwMarginWin* pPostIt = mpMgr->GetNextPostIt(aDirection, this);
- if (pPostIt)
- pPostIt->GrabFocus();
- }
-}
-
-void SwMarginWin::MouseButtonDown( const MouseEvent& /*rMEvt */)
-{
-}
-
-void SwMarginWin::MouseMove( const MouseEvent& rMEvt )
-{
- if (mRectMetaButton.IsInside(PixelToLogic(rMEvt.GetPosPixel())))
- {
- if (!mbMouseOverButton)
- {
- Invalidate(mRectMetaButton);
- mbMouseOverButton = true;
- }
- }
- else
- {
- if (mbMouseOverButton)
- {
- Invalidate(mRectMetaButton);
- mbMouseOverButton = false;
- }
- }
-}
-
-void SwMarginWin::Delete()
-{
- if ( Mgr()->GetActivePostIt() == this)
- {
- Mgr()->SetActivePostIt(0);
- // if the note is empty, the previous line will send a delete event, but we are already there
- if (mnEventId)
- {
- Application::RemoveUserEvent( mnEventId );
- mnEventId = 0;
- }
- }
-}
-
-IMPL_LINK(SwMarginWin, ScrollHdl, ScrollBar*, pScroll)
-{
- long nDiff = View()->GetEditView().GetVisArea().Top() - pScroll->GetThumbPos();
- View()->Scroll( 0, nDiff );
- return 0;
-}
-
-IMPL_LINK(SwMarginWin, ModifyHdl, void*, pVoid)
-{
- // no warnings, please
- pVoid=0;
- DocView()->GetDocShell()->SetModified(sal_True);
- return 0;
-}
-
-IMPL_LINK(SwMarginWin, DeleteHdl, void*, pVoid)
-{
- // no warnings, please
- pVoid=0;
- mnEventId = 0;
- Delete();
- return 0;
-}
-
-
-void SwMarginWin::ResetAttributes()
-{
- mpOutlinerView->RemoveAttribsKeepLanguages(TRUE);
- mpOutliner->RemoveFields(TRUE);
- mpOutlinerView->SetAttribs(DefaultItem());
-}
-
-sal_Int32 SwMarginWin::GetScrollbarWidth()
-{
- return mpView->GetWrtShell().GetViewOptions()->GetZoom() / 10;
-}
-
-sal_Int32 SwMarginWin::GetMetaButtonAreaWidth()
-{
- const Fraction& f( GetMapMode().GetScaleX() );
- if (IsPreview())
- return 3 * METABUTTON_AREA_WIDTH * f.GetNumerator() / f.GetDenominator();
- else
- return METABUTTON_AREA_WIDTH * f.GetNumerator() / f.GetDenominator();
-}
-
-sal_Int32 SwMarginWin::GetMetaHeight()
-{
- const Fraction& f( GetMapMode().GetScaleY() );
- return POSTIT_META_HEIGHT * f.GetNumerator() / f.GetDenominator();
-}
-
-sal_Int32 SwMarginWin::GetMinimumSizeWithMeta()
-{
- return mpMgr->GetMinimumSizeWithMeta();
-}
-
-sal_Int32 SwMarginWin::GetMinimumSizeWithoutMeta()
-{
- const Fraction& f( GetMapMode().GetScaleY() );
- return POSTIT_MINIMUMSIZE_WITHOUT_META * f.GetNumerator() / f.GetDenominator();
-}
-
-void SwMarginWin::SetSpellChecking()
-{
- const SwViewOption* pVOpt = mpView->GetWrtShellPtr()->GetViewOptions();
- ULONG nCntrl = mpOutliner->GetControlWord();
- if (pVOpt->IsOnlineSpell())
- nCntrl |= EE_CNTRL_ONLINESPELLING;
- else
- nCntrl &= ~EE_CNTRL_ONLINESPELLING;
- mpOutliner->SetControlWord(nCntrl);
-
- mpOutliner->CompleteOnlineSpelling();
- Invalidate();
-}
-
-void SwMarginWin::SetViewState(ShadowState bState)
-{
- switch (bState)
- {
- case SS_EDIT:
- {
- if (mpAnkor)
- {
- mpAnkor->SetAnkorState(AS_ALL);
- SwMarginWin* pWin = GetTopReplyNote();
- if (pWin)
- pWin->Ankor()->SetAnkorState(AS_END);
- mpAnkor->setLineSolid(true);
- }
- if (mpShadow)
- mpShadow->SetShadowState(bState);
- break;
- }
- case SS_VIEW:
- {
- if (mpAnkor)
- mpAnkor->setLineSolid(true);
- if (mpShadow)
- mpShadow->SetShadowState(bState);
- break;
- }
- case SS_NORMAL:
- {
- if (mpAnkor)
- {
- if (IsFollow())
- {
- // if there is no visible parent note, we want to see the complete anchor ??
- //if (IsAnyStackParentVisible())
- mpAnkor->SetAnkorState(AS_END);
- SwMarginWin* pTopWinSelf = GetTopReplyNote();
- SwMarginWin* pTopWinActive = mpMgr->GetActivePostIt() ? mpMgr->GetActivePostIt()->GetTopReplyNote() : 0;
- if (pTopWinSelf && (pTopWinSelf!=pTopWinActive))
- {
- if (pTopWinSelf!=mpMgr->GetActivePostIt())
- pTopWinSelf->Ankor()->setLineSolid(false);
- pTopWinSelf->Ankor()->SetAnkorState(AS_ALL);
- }
- }
- mpAnkor->setLineSolid(false);
- }
- if (mpShadow)
- mpShadow->SetShadowState(bState);
- break;
- }
- }
-}
-
-bool SwMarginWin::IsAnyStackParentVisible()
-{
- SwMarginWin* pMarginWin = mpMgr->GetNextPostIt(KEY_PAGEUP, this);
- while (pMarginWin)
- {
- if (pMarginWin->IsFollow())
- {
- pMarginWin = mpMgr->GetNextPostIt(KEY_PAGEUP, pMarginWin);
- if (pMarginWin && pMarginWin->IsVisible())
- return true;
- }
- else
- return pMarginWin && pMarginWin->IsVisible() ? true : false;
- }
- return false;
-}
-
-SwMarginWin* SwMarginWin::GetTopReplyNote()
-{
- SwMarginWin* pTopNote = 0;
- SwMarginWin* pMarginWin = IsFollow() ? mpMgr->GetNextPostIt(KEY_PAGEUP, this) : 0;
- while (pMarginWin)
- {
- pTopNote = pMarginWin;
- pMarginWin = pMarginWin->IsFollow() ? mpMgr->GetNextPostIt(KEY_PAGEUP, pMarginWin) : 0;
- }
- return pTopNote;
-}
-
-void SwMarginWin::SwitchToFieldPos()
-{
- if ( Mgr()->GetActivePostIt() == this )
- Mgr()->SetActivePostIt(0);
- GotoPos();
- sal_uInt32 aCount = MoveCaret();
- if (aCount)
- DocView()->GetDocShell()->GetWrtShell()->SwCrsrShell::Right(aCount, 0, FALSE);
- GrabFocusToDocument();
-}
-
-String SwMarginWin::GetAuthor()
-{
- return String(EMPTYSTRING);
-}
-
-Date SwMarginWin::GetDate()
-{
- return Date(0);
-}
-
-Time SwMarginWin::GetTime()
-{
- return Time(0);
-}
-
-SvxLanguageItem SwMarginWin::GetLanguage(void)
-{
- return SvxLanguageItem(SwLangHelper::GetLanguage(DocView()->GetWrtShell(),RES_CHRATR_LANGUAGE),RES_CHRATR_LANGUAGE);
-}
-
-/***** SwPostIt *********************************************/
-SwPostIt::SwPostIt( Window* pParent, WinBits nBits, SwFmtFld* aField,SwPostItMgr* aMgr,SwPostItBits aBits)
- : SwMarginWin(pParent,nBits,aMgr,aBits),
- mpFmtFld(aField),
- mpFld( static_cast<SwPostItField*>(aField->GetFld())),
- mStatus(SwPostItHelper::INVISIBLE)
-{
-}
-
-void SwPostIt::SetPostItText()
-{
- // get text from SwPostItField and insert into our textview
- Engine()->SetModifyHdl( Link() );
- Engine()->EnableUndo( FALSE );
- mpFld = static_cast<SwPostItField*>(mpFmtFld->GetFld());
- if( mpFld->GetTextObject() )
- Engine()->SetText( *mpFld->GetTextObject() );
- else
- {
- Engine()->Clear();
- View()->SetAttribs(DefaultItem());
- View()->InsertText(mpFld->GetPar2(),false);
- }
-
- Engine()->ClearModifyFlag();
- Engine()->GetUndoManager().Clear();
- Engine()->EnableUndo( TRUE );
- Engine()->SetModifyHdl( LINK( this, SwPostIt, ModifyHdl ) );
- Invalidate();
-}
-
-void SwPostIt::UpdateData()
-{
- if ( Engine()->IsModified() )
- {
- SwTxtFld* pTxtFld = mpFmtFld->GetTxtFld();
- SwPosition aPosition( pTxtFld->GetTxtNode() );
- aPosition.nContent = *pTxtFld->GetStart();
- SwField* pOldField = mpFld->Copy();
- mpFld->SetPar2(Engine()->GetEditEngine().GetText());
- mpFld->SetTextObject(Engine()->CreateParaObject());
- DocView()->GetDocShell()->GetDoc()->AppendUndo(new SwUndoFieldFromDoc(aPosition, *pOldField, *mpFld, 0, true));
- delete pOldField;
- // so we get a new layout of notes (anchor position is still the same and we would otherwise not get one)
- Mgr()->SetLayout();
- // #i98686# if we have several views, all notes should update their text
- mpFmtFld->Broadcast(SwFmtFldHint( 0, SWFMTFLD_CHANGED));
- DocView()->GetDocShell()->SetModified();
- }
- Engine()->ClearModifyFlag();
- Engine()->GetUndoManager().Clear();
-}
-
-void SwPostIt::SetChangeTracking(SwPostItHelper::SwLayoutStatus& aStatus,Color aColor)
-{
- if ( (mStatus != aStatus) || (mChangeColor != aColor) )
- {
- mStatus = aStatus;
- mChangeColor = aColor;
- Invalidate();
- }
-}
-
-void SwPostIt::Delete()
-{
- SwMarginWin::Delete();
- // we delete the field directly, the Mgr cleans up the PostIt by listening
- DocView()->GetWrtShellPtr()->GotoField(*mpFmtFld);
- GrabFocusToDocument();
- DocView()->GetWrtShellPtr()->DelRight();
-}
-
-void SwPostIt::GotoPos()
-{
- DocView()->GetDocShell()->GetWrtShell()->GotoField(*mpFmtFld);
-}
-
-sal_uInt32 SwPostIt::MoveCaret()
-{
- // if this is an answer, do not skip over all following ones, but insert directly behind the current one
- // but when just leaving a note, skip all following ones as well to continue typing
- return Mgr()->IsAnswer() ? 1 : 1 + CountFollowing();
-}
-
-//returns true, if there is another note right before this note
-bool SwPostIt::CalcFollow()
-{
- SwTxtFld* pTxtFld = mpFmtFld->GetTxtFld();
- SwPosition aPosition( pTxtFld->GetTxtNode() );
- aPosition.nContent = *pTxtFld->GetStart();
- SwTxtAttr * const pTxtAttr = pTxtFld->GetTxtNode().GetTxtAttrForCharAt(
- aPosition.nContent.GetIndex() - 1, RES_TXTATR_FIELD );
- const SwField* pFld = pTxtAttr ? pTxtAttr->GetFld().GetFld() : 0;
- return pFld && (pFld->Which()== RES_POSTITFLD);
-}
-
-// counts how many SwPostItField we have right after the current one
-sal_uInt32 SwPostIt::CountFollowing()
-{
- sal_uInt32 aCount = 1; // we start with 1, so we have to subtract one at the end again
- SwTxtFld* pTxtFld = mpFmtFld->GetTxtFld();
- SwPosition aPosition( pTxtFld->GetTxtNode() );
- aPosition.nContent = *pTxtFld->GetStart();
-
- SwTxtAttr * pTxtAttr = pTxtFld->GetTxtNode().GetTxtAttrForCharAt(
- aPosition.nContent.GetIndex() + 1, RES_TXTATR_FIELD );
- SwField* pFld = pTxtAttr ? const_cast<SwField*>(pTxtAttr->GetFld().GetFld()) : 0;
- while (pFld && (pFld->Which()== RES_POSTITFLD))
- {
- aCount++;
- pTxtAttr = pTxtFld->GetTxtNode().GetTxtAttrForCharAt(
- aPosition.nContent.GetIndex() + aCount, RES_TXTATR_FIELD );
- pFld = pTxtAttr ? const_cast<SwField*>(pTxtAttr->GetFld().GetFld()) : 0;
- }
- return aCount - 1;
-}
-
-void SwPostIt::MouseButtonDown( const MouseEvent& rMEvt )
-{
- if (mRectMetaButton.IsInside(PixelToLogic(rMEvt.GetPosPixel())) && rMEvt.IsLeft())
- {
- if (IsPreview())
- {
- doLazyDelete();
- if (Mgr())
- {
- SwPostIt* pPostIt = dynamic_cast<SwPostIt*>(Mgr()->GetPostIt(mpFmtFld));
- if (pPostIt)
- {
- pPostIt->GrabFocus();
- Mgr()->MakeVisible(pPostIt);
- }
- }
-
- }
- else
- {
- if ( mbReadonly )
- {
- mpButtonPopup->EnableItem(FN_REPLY,false);
- mpButtonPopup->EnableItem(FN_DELETE_NOTE,false);
- mpButtonPopup->EnableItem(FN_DELETE_NOTE_AUTHOR,false);
- mpButtonPopup->EnableItem(FN_DELETE_ALL_NOTES,false);
- }
- else
- {
- if (IsProtected())
- mpButtonPopup->EnableItem(FN_DELETE_NOTE,false);
- else
- mpButtonPopup->EnableItem(FN_DELETE_NOTE,true);
- mpButtonPopup->EnableItem(FN_DELETE_NOTE_AUTHOR,true);
- mpButtonPopup->EnableItem(FN_DELETE_ALL_NOTES,true);
- }
- SvtUserOptions aUserOpt;
- String sAuthor;
- if( !(sAuthor = aUserOpt.GetFullName()).Len())
- if( !(sAuthor = aUserOpt.GetID()).Len() )
- sAuthor = String( SW_RES( STR_REDLINE_UNKNOWN_AUTHOR ));
- // do not allow to reply to ourself and no answer possible if this note is in a protected section
- if ((sAuthor == GetAuthor()) || (IsProtected()))
- mpButtonPopup->EnableItem(FN_REPLY,false);
- else
- mpButtonPopup->EnableItem(FN_REPLY,true);
-
- // show the popup menu and execute the selected command
- ExecuteCommand( mpButtonPopup->Execute( this,Rectangle(LogicToPixel(mRectMetaButton.BottomLeft()),LogicToPixel(mRectMetaButton.BottomLeft())),POPUPMENU_EXECUTE_DOWN | POPUPMENU_NOMOUSEUPCLOSE) );
- }
- }
-}
-
-void SwPostIt::SetPopup()
-{
- mpButtonPopup = new PopupMenu(SW_RES(MN_ANNOTATION_BUTTON));
- //mpButtonPopup->SetMenuFlags(MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES);
- XubString aText = mpButtonPopup->GetItemText( FN_DELETE_NOTE_AUTHOR );
- SwRewriter aRewriter;
- aRewriter.AddRule(UNDO_ARG1,GetAuthor());
- aText = aRewriter.Apply(aText);
- mpButtonPopup->SetItemText(FN_DELETE_NOTE_AUTHOR,aText);
-}
-
-void SwPostIt::InitAnswer(OutlinerParaObject* pText)
-{
- //collect our old meta data
- SwMarginWin* pWin = Mgr()->GetNextPostIt(KEY_PAGEUP, this);
- const LocaleDataWrapper& rLocalData = SvtSysLocale().GetLocaleData();
- String aText = String(SW_RES(STR_REPLY));
- SwRewriter aRewriter;
- aRewriter.AddRule(UNDO_ARG1, pWin->GetAuthor());
- aText = aRewriter.Apply(aText);
- aText.Append(String(rtl::OUString::createFromAscii(" (") +
- String(rLocalData.getDate( pWin->GetDate())) + rtl::OUString::createFromAscii(", ") +
- String(rLocalData.getTime( pWin->GetTime(),false)) + rtl::OUString::createFromAscii("): \"")));
- View()->InsertText(aText,false);
-
- // insert old, selected text or "..."
- // TOOD: iterate over all paragraphs, not only first one to find out if it is empty
- if (pText->GetTextObject().GetText(0) != String(EMPTYSTRING))
- View()->GetEditView().InsertText(pText->GetTextObject());
- else
- View()->InsertText(rtl::OUString::createFromAscii("..."),false);
- View()->InsertText(rtl::OUString::createFromAscii("\"\n"),false);
-
- View()->SetSelection(ESelection(0x0,0x0,0xFFFF,0xFFFF));
- SfxItemSet aAnswerSet( DocView()->GetDocShell()->GetPool() );
- aAnswerSet.Put(SvxFontHeightItem(200,80,EE_CHAR_FONTHEIGHT));
- aAnswerSet.Put(SvxPostureItem(ITALIC_NORMAL,EE_CHAR_ITALIC));
- View()->SetAttribs(aAnswerSet);
- View()->SetSelection(ESelection(0xFFFF,0xFFFF,0xFFFF,0xFFFF));
-
- //remove all attributes and reset our standard ones
- View()->GetEditView().RemoveAttribsKeepLanguages(true);
- View()->SetAttribs(DefaultItem());
- // lets insert an undo step so the initial text can be easily deleted
- // but do not use UpdateData() directly, would set modified state again and reentrance into Mgr
- Engine()->SetModifyHdl( Link() );
- SwTxtFld* pTxtFld = mpFmtFld->GetTxtFld();
- SwPosition aPosition( pTxtFld->GetTxtNode() );
- aPosition.nContent = *pTxtFld->GetStart();
- SwField* pOldField = mpFld->Copy();
- mpFld->SetPar2(Engine()->GetEditEngine().GetText());
- mpFld->SetTextObject(Engine()->CreateParaObject());
- DocView()->GetDocShell()->GetDoc()->AppendUndo(new SwUndoFieldFromDoc(aPosition, *pOldField, *mpFld, 0, true));
- delete pOldField;
- Engine()->SetModifyHdl( LINK( this, SwPostIt, ModifyHdl ) );
- Engine()->ClearModifyFlag();
- Engine()->GetUndoManager().Clear();
-}
-
-SvxLanguageItem SwPostIt::GetLanguage(void)
-{
- // set initial language for outliner
- USHORT nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( mpFld->GetLanguage() );
- USHORT nLangWhichId = 0;
- switch (nScriptType)
- {
- case SCRIPTTYPE_LATIN : nLangWhichId = EE_CHAR_LANGUAGE ; break;
- case SCRIPTTYPE_ASIAN : nLangWhichId = EE_CHAR_LANGUAGE_CJK; break;
- case SCRIPTTYPE_COMPLEX : nLangWhichId = EE_CHAR_LANGUAGE_CTL; break;
- default: DBG_ERROR("GetLanguage: wrong script tye");
- }
- return SvxLanguageItem(mpFld->GetLanguage(),nLangWhichId);
-}
-
-bool SwPostIt::IsProtected()
-{
- bool aReturn;
- aReturn = mpFmtFld ? (SwMarginWin::IsProtected() || (mStatus==SwPostItHelper::DELETED) ||
- mpFmtFld->IsProtect()) : (SwMarginWin::IsProtected() || (mStatus==SwPostItHelper::DELETED));
- return aReturn;
-}
-
-/********** SwRedComment**************/
-/*
-SwRedComment::SwRedComment( Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits,SwRedline* pRed)
- : SwMarginWin(pParent,nBits,aMgr,aBits),
- pRedline(pRed)
-{
-}
-
-void SwRedComment::SetPopup()
-{
- mpButtonPopup = new PopupMenu(SW_RES(MN_REDCOMMENT_BUTTON));
- //mpButtonPopup->SetMenuFlags(MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES);
-}
-
-void SwRedComment::UpdateData()
-{
- if ( Engine()->IsModified() )
- {
- // so we get a new layout of notes (ankor position is still the same and we would otherwise not get one)
- Mgr()->SetLayout();
- // SetRedline is calling SetModified already
- DocView()->GetWrtShell().SetRedlineComment(Engine()->GetEditEngine().GetText());
- }
- Engine()->ClearModifyFlag();
- Engine()->GetUndoManager().Clear();
-}
-
-void SwRedComment::SetPostItText()
-{
- Engine()->SetModifyHdl( Link() );
- Engine()->EnableUndo( FALSE );
-
- Engine()->Clear();
- View()->SetAttribs(DefaultItem());
- View()->InsertText(pRedline->GetComment(),false);
-
- Engine()->ClearModifyFlag();
- Engine()->GetUndoManager().Clear();
- Engine()->EnableUndo( TRUE );
- Engine()->SetModifyHdl( LINK( this, SwMarginWin, ModifyHdl ) );
- Invalidate();
-}
-
-void SwRedComment::DeactivatePostIt()
-{
- SwMarginWin::DeactivatePostIt();
- // current Redline is still selected
- DocView()->GetWrtShellPtr()->ClearMark();
-}
-
-void SwRedComment::ActivatePostIt()
-{
- SwMarginWin::ActivatePostIt();
-
- // do we want the redline selected?
- // otherwise, SwRedComment::ActivatePostIt() as well as SwRedComment::DeactivatePostIt()
- // can be thrown out completly
- DocView()->GetDocShell()->GetWrtShell()->GotoRedline(
- DocView()->GetDocShell()->GetWrtShell()->FindRedlineOfData(pRedline->GetRedlineData()),true);
-}
-
-void SwRedComment::MouseButtonDown( const MouseEvent& rMEvt )
-{
- if (mRectMetaButton.IsInside(PixelToLogic(rMEvt.GetPosPixel())) && rMEvt.IsLeft())
- {
- ExecuteCommand( mpButtonPopup->Execute( this,Rectangle(LogicToPixel(mRectMetaButton.BottomLeft()),LogicToPixel(mRectMetaButton.BottomLeft())),POPUPMENU_EXECUTE_DOWN | POPUPMENU_NOMOUSEUPCLOSE) );
- }
-}
-
-void SwRedComment::Delete()
-{
- SwMarginWin::Delete();
- // we are not neccessarily on our redline, so let's move there
- GotoPos();
- DocView()->GetWrtShell().SetRedlineComment(EMPTYSTRING);
- DocView()->GetWrtShell().ClearMark();
- // so we get a new layout of notes (ankor position is still the same and we would otherwise not get one)
- Mgr()->SetLayout();
- Mgr()->RemoveItem(pRedline);
-}
-
-void SwRedComment::GotoPos()
-{
- DocView()->GetDocShell()->GetWrtShell()->GotoRedline(
- DocView()->GetDocShell()->GetWrtShell()->FindRedlineOfData(pRedline->GetRedlineData()));
-}
-
-String SwRedComment::GetAuthor()
-{
- return pRedline->GetAuthorString();
-}
-
-Date SwRedComment::GetDate()
-{
- return pRedline->GetTimeStamp().GetDate();
-}
-
-Time SwRedComment::GetTime()
-{
- return pRedline->GetTimeStamp().GetTime();
-}
-
-bool SwRedComment::IsProtected()
-{
- return SwMarginWin::IsProtected() || pRedline->Start()->nNode.GetNode().GetTxtNode()->IsInProtectSect();
-}
-*/
-
-//////////////////////////////////////////////////////////////////////////////
-// helper SwPostItShadowPrimitive
-//
-// Used to allow view-dependent primitive definition. For that purpose, the
-// initially created primitive (this one) always has to be view-independent,
-// but the decomposition is made view-dependent. Very simple primitive which
-// just remembers the discrete data and applies it at decomposition time.
-
-class SwPostItShadowPrimitive : public drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D
-{
-private:
- basegfx::B2DPoint maBasePosition;
- basegfx::B2DPoint maSecondPosition;
- ShadowState maShadowState;
-
-protected:
- virtual drawinglayer::primitive2d::Primitive2DSequence create2DDecomposition(
- const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
-
-public:
- SwPostItShadowPrimitive(
- const basegfx::B2DPoint& rBasePosition,
- const basegfx::B2DPoint& rSecondPosition,
- ShadowState aShadowState)
- : drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D(),
- maBasePosition(rBasePosition),
- maSecondPosition(rSecondPosition),
- maShadowState(aShadowState)
- {}
-
- // data access
- const basegfx::B2DPoint& getBasePosition() const { return maBasePosition; }
- const basegfx::B2DPoint& getSecondPosition() const { return maSecondPosition; }
- ShadowState getShadowState() const { return maShadowState; }
-
- virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const;
-
- DeclPrimitrive2DIDBlock()
-};
-
-drawinglayer::primitive2d::Primitive2DSequence SwPostItShadowPrimitive::create2DDecomposition(
- const drawinglayer::geometry::ViewInformation2D& /*rViewInformation*/) const
-{
- // get logic sizes in object coordinate system
- drawinglayer::primitive2d::Primitive2DSequence xRetval;
- basegfx::B2DRange aRange(getBasePosition());
-
- switch(maShadowState)
- {
- case SS_NORMAL:
- {
- aRange.expand(basegfx::B2DTuple(getSecondPosition().getX(), getSecondPosition().getY() + (2.0 * getDiscreteUnit())));
- const drawinglayer::attribute::FillGradientAttribute aFillGradientAttribute(
- drawinglayer::attribute::GRADIENTSTYLE_LINEAR,
- 0.0,
- 0.5,
- 0.5,
- 1800.0 * F_PI1800,
- basegfx::BColor(230.0/255.0,230.0/255.0,230.0/255.0),
- basegfx::BColor(180.0/255.0,180.0/255.0,180.0/255.0),
- 2);
-
- const drawinglayer::primitive2d::Primitive2DReference xReference(
- new drawinglayer::primitive2d::FillGradientPrimitive2D(
- aRange,
- aFillGradientAttribute));
-
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
- break;
- }
- case SS_VIEW:
- {
- aRange.expand(basegfx::B2DTuple(getSecondPosition().getX(), getSecondPosition().getY() + (4.0 * getDiscreteUnit())));
- const drawinglayer::attribute::FillGradientAttribute aFillGradientAttribute(
- drawinglayer::attribute::GRADIENTSTYLE_LINEAR,
- 0.0,
- 0.5,
- 0.5,
- 1800.0 * F_PI1800,
- basegfx::BColor(230.0/255.0,230.0/255.0,230.0/255.0),
- basegfx::BColor(180.0/255.0,180.0/255.0,180.0/255.0),
- 4);
-
- const drawinglayer::primitive2d::Primitive2DReference xReference(
- new drawinglayer::primitive2d::FillGradientPrimitive2D(
- aRange,
- aFillGradientAttribute));
-
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
- break;
- }
- case SS_EDIT:
- {
- aRange.expand(basegfx::B2DTuple(getSecondPosition().getX(), getSecondPosition().getY() + (4.0 * getDiscreteUnit())));
- const drawinglayer::attribute::FillGradientAttribute aFillGradientAttribute(
- drawinglayer::attribute::GRADIENTSTYLE_LINEAR,
- 0.0,
- 0.5,
- 0.5,
- 1800.0 * F_PI1800,
- basegfx::BColor(230.0/255.0,230.0/255.0,230.0/255.0),
- basegfx::BColor(83.0/255.0,83.0/255.0,83.0/255.0),
- 4);
-
- const drawinglayer::primitive2d::Primitive2DReference xReference(
- new drawinglayer::primitive2d::FillGradientPrimitive2D(
- aRange,
- aFillGradientAttribute));
-
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
- break;
- }
- default:
- {
- break;
- }
- }
-
- return xRetval;
-}
-
-bool SwPostItShadowPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const
-{
- if(drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D::operator==(rPrimitive))
- {
- const SwPostItShadowPrimitive& rCompare = static_cast< const SwPostItShadowPrimitive& >(rPrimitive);
-
- return (getBasePosition() == rCompare.getBasePosition()
- && getSecondPosition() == rCompare.getSecondPosition()
- && getShadowState() == rCompare.getShadowState());
- }
-
- return false;
-}
-
-ImplPrimitrive2DIDBlock(SwPostItShadowPrimitive, PRIMITIVE2D_ID_SWPOSTITSHADOWPRIMITIVE)
-
-/****** SwPostItShadow ***********************************************************/
-SwPostItShadow::SwPostItShadow(const basegfx::B2DPoint& rBasePos,const basegfx::B2DPoint& rSecondPosition,
- Color aBaseColor,ShadowState aState)
- : OverlayObjectWithBasePosition(rBasePos, aBaseColor),
- maSecondPosition(rSecondPosition),
- mShadowState(aState)
-{
-// mbAllowsAnimation = false;
-}
-
-SwPostItShadow::~SwPostItShadow()
-{
-}
-
-drawinglayer::primitive2d::Primitive2DSequence SwPostItShadow::createOverlayObjectPrimitive2DSequence()
-{
- const drawinglayer::primitive2d::Primitive2DReference aReference(
- new SwPostItShadowPrimitive(
- getBasePosition(),
- GetSecondPosition(),
- GetShadowState()));
- return drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1);
-}
-
-void SwPostItShadow::SetShadowState(ShadowState aState)
-{
- if (mShadowState != aState)
- {
- mShadowState = aState;
-
- objectChange();
- }
-}
-
-void SwPostItShadow::SetPosition(const basegfx::B2DPoint& rPoint1,
- const basegfx::B2DPoint& rPoint2)
-{
- if(!rPoint1.equal(getBasePosition()) || !rPoint2.equal(GetSecondPosition()))
- {
- maBasePosition = rPoint1;
- maSecondPosition = rPoint2;
-
- objectChange();
- }
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// helper class: Primitive for discrete visualisation
-
-class SwPostItAnkorPrimitive : public drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D
-{
-private:
- basegfx::B2DPolygon maTriangle;
- basegfx::B2DPolygon maLine;
- basegfx::B2DPolygon maLineTop;
- AnkorState maAnkorState;
- basegfx::BColor maColor;
-
- // discrete line width
- double mfLogicLineWidth;
-
- // bitfield
- bool mbShadow : 1;
- bool mbLineSolid : 1;
-
-protected:
- virtual drawinglayer::primitive2d::Primitive2DSequence create2DDecomposition(
- const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
-
-public:
- SwPostItAnkorPrimitive(
- const basegfx::B2DPolygon& rTriangle,
- const basegfx::B2DPolygon& rLine,
- const basegfx::B2DPolygon& rLineTop,
- AnkorState aAnkorState,
- const basegfx::BColor& rColor,
- double fLogicLineWidth,
- bool bShadow,
- bool bLineSolid)
- : drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D(),
- maTriangle(rTriangle),
- maLine(rLine),
- maLineTop(rLineTop),
- maAnkorState(aAnkorState),
- maColor(rColor),
- mfLogicLineWidth(fLogicLineWidth),
- mbShadow(bShadow),
- mbLineSolid(bLineSolid)
- {}
-
- // data access
- const basegfx::B2DPolygon& getTriangle() const { return maTriangle; }
- const basegfx::B2DPolygon& getLine() const { return maLine; }
- const basegfx::B2DPolygon& getLineTop() const { return maLineTop; }
- AnkorState getAnkorState() const { return maAnkorState; }
- const basegfx::BColor& getColor() const { return maColor; }
- double getLogicLineWidth() const { return mfLogicLineWidth; }
- bool getShadow() const { return mbShadow; }
- bool getLineSolid() const { return mbLineSolid; }
-
- virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const;
-
- DeclPrimitrive2DIDBlock()
-};
-
-drawinglayer::primitive2d::Primitive2DSequence SwPostItAnkorPrimitive::create2DDecomposition(
- const drawinglayer::geometry::ViewInformation2D& /*rViewInformation*/) const
-{
- drawinglayer::primitive2d::Primitive2DSequence aRetval;
-
- if(AS_TRI == getAnkorState() || AS_ALL == getAnkorState() || AS_START == getAnkorState())
- {
- // create triangle
- const drawinglayer::primitive2d::Primitive2DReference aTriangle(
- new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(
- basegfx::B2DPolyPolygon(getTriangle()),
- getColor()));
-
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aTriangle);
- }
-
- if(AS_ALL == getAnkorState() || AS_START == getAnkorState())
- {
- // create line start
- const drawinglayer::attribute::LineAttribute aLineAttribute(
- getColor(),
- getLogicLineWidth() / (basegfx::fTools::equalZero(getDiscreteUnit()) ? 1.0 : getDiscreteUnit()));
-
- if(getLineSolid())
- {
- const drawinglayer::primitive2d::Primitive2DReference aSolidLine(
- new drawinglayer::primitive2d::PolygonStrokePrimitive2D(
- getLine(),
- aLineAttribute));
-
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aSolidLine);
- }
- else
- {
- ::std::vector< double > aDotDashArray;
- const double fDistance(3.0 * 15.0);
- const double fDashLen(5.0 * 15.0);
-
- aDotDashArray.push_back(fDashLen);
- aDotDashArray.push_back(fDistance);
-
- const drawinglayer::attribute::StrokeAttribute aStrokeAttribute(
- aDotDashArray,
- fDistance + fDashLen);
-
- const drawinglayer::primitive2d::Primitive2DReference aStrokedLine(
- new drawinglayer::primitive2d::PolygonStrokePrimitive2D(
- getLine(),
- aLineAttribute,
- aStrokeAttribute));
-
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aStrokedLine);
- }
- }
-
- if(aRetval.hasElements() && getShadow())
- {
- // shadow is only for triangle and line start, and in upper left
- // and lower right direction, in different colors
- const double fColorChange(20.0 / 255.0);
- const basegfx::B3DTuple aColorChange(fColorChange, fColorChange, fColorChange);
- basegfx::BColor aLighterColor(getColor() + aColorChange);
- basegfx::BColor aDarkerColor(getColor() - aColorChange);
-
- aLighterColor.clamp();
- aDarkerColor.clamp();
-
- // create shadow sequence
- drawinglayer::primitive2d::Primitive2DSequence aShadows(2);
- basegfx::B2DHomMatrix aTransform;
-
- aTransform.set(0, 2, -getDiscreteUnit());
- aTransform.set(1, 2, -getDiscreteUnit());
-
- aShadows[0] = drawinglayer::primitive2d::Primitive2DReference(
- new drawinglayer::primitive2d::ShadowPrimitive2D(
- aTransform,
- aLighterColor,
- aRetval));
-
- aTransform.set(0, 2, getDiscreteUnit());
- aTransform.set(1, 2, getDiscreteUnit());
-
- aShadows[1] = drawinglayer::primitive2d::Primitive2DReference(
- new drawinglayer::primitive2d::ShadowPrimitive2D(
- aTransform,
- aDarkerColor,
- aRetval));
-
- // add shadow before geometry to make it be proccessed first
- const drawinglayer::primitive2d::Primitive2DSequence aTemporary(aRetval);
-
- aRetval = aShadows;
- drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(aRetval, aTemporary);
- }
-
- if(AS_ALL == getAnkorState() || AS_END == getAnkorState())
- {
- // LineTop has to be created, too, but uses no shadow, so add after
- // the other parts are created
- const drawinglayer::attribute::LineAttribute aLineAttribute(
- getColor(),
- getLogicLineWidth() / (basegfx::fTools::equalZero(getDiscreteUnit()) ? 1.0 : getDiscreteUnit()));
-
- const drawinglayer::primitive2d::Primitive2DReference aLineTop(
- new drawinglayer::primitive2d::PolygonStrokePrimitive2D(
- getLineTop(),
- aLineAttribute));
-
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aLineTop);
- }
-
- return aRetval;
-}
-
-bool SwPostItAnkorPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const
-{
- if(drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D::operator==(rPrimitive))
- {
- const SwPostItAnkorPrimitive& rCompare = static_cast< const SwPostItAnkorPrimitive& >(rPrimitive);
-
- return (getTriangle() == rCompare.getTriangle()
- && getLine() == rCompare.getLine()
- && getLineTop() == rCompare.getLineTop()
- && getAnkorState() == rCompare.getAnkorState()
- && getColor() == rCompare.getColor()
- && getLogicLineWidth() == rCompare.getLogicLineWidth()
- && getShadow() == rCompare.getShadow()
- && getLineSolid() == rCompare.getLineSolid());
- }
-
- return false;
-}
-
-ImplPrimitrive2DIDBlock(SwPostItAnkorPrimitive, PRIMITIVE2D_ID_SWPOSTITANKORPRIMITIVE)
-
-/****** SwPostItAnkor ***********************************************************/
-
-void SwPostItAnkor::implEnsureGeometry()
-{
- if(!maTriangle.count())
- {
- maTriangle.append(getBasePosition());
- maTriangle.append(GetSecondPosition());
- maTriangle.append(GetThirdPosition());
- maTriangle.setClosed(true);
- }
-
- if(!maLine.count())
- {
- maLine.append(GetFourthPosition());
- maLine.append(GetFifthPosition());
- maLine.append(GetSixthPosition());
- }
-
- if(!maLineTop.count())
- {
- maLineTop.append(GetSixthPosition());
- maLineTop.append(GetSeventhPosition());
- }
-}
-
-void SwPostItAnkor::implResetGeometry()
-{
- maTriangle.clear();
- maLine.clear();
- maLineTop.clear();
-}
-
-SwPostItAnkor::SwPostItAnkor(const basegfx::B2DPoint& rBasePos,
- const basegfx::B2DPoint& rSecondPos,
- const basegfx::B2DPoint& rThirdPos,
- const basegfx::B2DPoint& rFourthPos,
- const basegfx::B2DPoint& rFifthPos,
- const basegfx::B2DPoint& rSixthPos,
- const basegfx::B2DPoint& rSeventhPos,
- Color aBaseColor,
- bool bShadowedEffect,
- bool bLineSolid)
- : OverlayObjectWithBasePosition(rBasePos, aBaseColor),
- maSecondPosition(rSecondPos),
- maThirdPosition(rThirdPos),
- maFourthPosition(rFourthPos),
- maFifthPosition(rFifthPos),
- maSixthPosition(rSixthPos),
- maSeventhPosition(rSeventhPos),
- maTriangle(),
- maLine(),
- maLineTop(),
- mHeight(0),
- mAnkorState(AS_ALL),
- mbShadowedEffect(bShadowedEffect),
- mbLineSolid(bLineSolid)
-{
- //mbAllowsAnimation = true;
-}
-
-SwPostItAnkor::~SwPostItAnkor()
-{
-}
-
-drawinglayer::primitive2d::Primitive2DSequence SwPostItAnkor::createOverlayObjectPrimitive2DSequence()
-{
- implEnsureGeometry();
-
- const drawinglayer::primitive2d::Primitive2DReference aReference(
- new SwPostItAnkorPrimitive(
- maTriangle,
- maLine,
- maLineTop,
- GetAnkorState(),
- getBaseColor().getBColor(),
- ANKORLINE_WIDTH * 15.0,
- getShadowedEffect(),
- getLineSolid()));
-
- return drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1);
-}
-
-void SwPostItAnkor::SetAllPosition(const basegfx::B2DPoint& rPoint1,
- const basegfx::B2DPoint& rPoint2,
- const basegfx::B2DPoint& rPoint3,
- const basegfx::B2DPoint& rPoint4,
- const basegfx::B2DPoint& rPoint5,
- const basegfx::B2DPoint& rPoint6,
- const basegfx::B2DPoint& rPoint7)
-{
- if(rPoint1 != getBasePosition()
- || rPoint2 != GetSecondPosition()
- || rPoint3 != GetThirdPosition()
- || rPoint4 != GetFourthPosition()
- || rPoint5 != GetFifthPosition()
- || rPoint6 != GetSixthPosition()
- || rPoint7 != GetSeventhPosition())
- {
- maBasePosition = rPoint1;
- maSecondPosition = rPoint2;
- maThirdPosition = rPoint3;
- maFourthPosition = rPoint4;
- maFifthPosition = rPoint5;
- maSixthPosition = rPoint6;
- maSeventhPosition = rPoint7;
-
- implResetGeometry();
- objectChange();
- }
-}
-
-void SwPostItAnkor::SetSixthPosition(const basegfx::B2DPoint& rNew)
-{
- if(rNew != maSixthPosition)
- {
- maSixthPosition = rNew;
- implResetGeometry();
- objectChange();
- }
-}
-
-void SwPostItAnkor::SetSeventhPosition(const basegfx::B2DPoint& rNew)
-{
- if(rNew != maSeventhPosition)
- {
- maSeventhPosition = rNew;
- implResetGeometry();
- objectChange();
- }
-}
-
-void SwPostItAnkor::SetTriPosition(const basegfx::B2DPoint& rPoint1,const basegfx::B2DPoint& rPoint2,const basegfx::B2DPoint& rPoint3,
- const basegfx::B2DPoint& rPoint4,const basegfx::B2DPoint& rPoint5)
-{
- if(rPoint1 != getBasePosition()
- || rPoint2 != GetSecondPosition()
- || rPoint3 != GetThirdPosition()
- || rPoint4 != GetFourthPosition()
- || rPoint5 != GetFifthPosition())
- {
- maBasePosition = rPoint1;
- maSecondPosition = rPoint2;
- maThirdPosition = rPoint3;
- maFourthPosition = rPoint4;
- maFifthPosition = rPoint5;
-
- implResetGeometry();
- objectChange();
- }
-}
-
-void SwPostItAnkor::setLineSolid(bool bNew)
-{
- if(bNew != getLineSolid())
- {
- mbLineSolid = bNew;
- objectChange();
- }
-}
-
-void SwPostItAnkor::SetAnkorState(AnkorState aState)
-{
- if (mAnkorState != aState)
- {
- mAnkorState = aState;
- objectChange();
- }
-}
diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx
index 42b9bc43e6..4e707ce6ce 100644
--- a/sw/source/ui/fldui/fldmgr.cxx
+++ b/sw/source/ui/fldui/fldmgr.cxx
@@ -1435,7 +1435,7 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat,
}
else
{
- pTmpFld = pCurFld->Copy();
+ pTmpFld = pCurFld->CopyField();
bDelete = true;
}
diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx
index 385ed8d60f..6c9ded39aa 100644
--- a/sw/source/ui/fldui/fldpage.cxx
+++ b/sw/source/ui/fldui/fldpage.cxx
@@ -42,28 +42,16 @@
#include <fmtfld.hxx>
#include <viewopt.hxx>
#include <fldedt.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <swmodule.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
#include <expfld.hxx>
-#ifndef _FLDTDLG_HXX
#include <fldtdlg.hxx>
-#endif
-#ifndef _FLDPAGE_HXX
#include <fldpage.hxx>
-#endif
#include <docufld.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
#include <sfx2/bindings.hxx>
using namespace ::com::sun::star;
@@ -218,7 +206,7 @@ BOOL SwFldPage::InsertFld(USHORT nTypeId, USHORT nSubType, const String& rPar1,
}
else // Feld aendern
{
- SwField * pTmpFld = m_pCurFld->Copy();
+ SwField *const pTmpFld = m_pCurFld->CopyField();
String sPar1(rPar1);
String sPar2(rPar2);
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 939b29acff..79f727aa08 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -354,7 +354,8 @@ IMPL_LINK(SwColumnDlg, OkHdl, OKButton*, EMPTYARG)
const SwSection* pCurrSection = rWrtShell.GetCurrSection();
const SwSectionFmt* pFmt = pCurrSection->GetFmt();
USHORT nNewPos = rWrtShell.GetSectionFmtPos( *pFmt );
- rWrtShell.ChgSection( nNewPos, *pCurrSection, pSectionSet );
+ SwSectionData aData(*pCurrSection);
+ rWrtShell.UpdateSection( nNewPos, aData, pSectionSet );
}
if(pSectionSet && pSectionSet->Count() && bSelSectionChanged )
diff --git a/sw/source/ui/inc/SidebarWindowsConsts.hxx b/sw/source/ui/inc/SidebarWindowsConsts.hxx
new file mode 100644
index 0000000000..378b2be079
--- /dev/null
+++ b/sw/source/ui/inc/SidebarWindowsConsts.hxx
@@ -0,0 +1,41 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ *
+ * $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 _SIDEBARWINDOWSCONSTS_HXX
+#define _SIDEBARWINDOWSCONSTS_HXX
+
+namespace sw { namespace sidebarwindows {
+
+const sal_Int8 ANCHORLINE_WIDTH = 1;
+
+} } // end of namespace sw::sidebarwindows
+
+#endif
diff --git a/sw/source/ui/inc/SwSpellDialogChildWindow.hxx b/sw/source/ui/inc/SwSpellDialogChildWindow.hxx
index 5628aed15b..cc7462f6d8 100644
--- a/sw/source/ui/inc/SwSpellDialogChildWindow.hxx
+++ b/sw/source/ui/inc/SwSpellDialogChildWindow.hxx
@@ -48,8 +48,8 @@ class SwSpellDialogChildWindow
void LockFocusNotification(bool bLock);
protected:
- virtual svx::SpellPortions GetNextWrongSentence (void);
- virtual void ApplyChangedSentence(const svx::SpellPortions& rChanged);
+ virtual svx::SpellPortions GetNextWrongSentence(bool bRecheck);
+ virtual void ApplyChangedSentence(const svx::SpellPortions& rChanged, bool bRecheck);
virtual void AddAutoCorrection(const String& rOld, const String& rNew, LanguageType eLanguage);
virtual bool HasAutoCorrection();
virtual bool HasGrammarChecking();
diff --git a/sw/source/ui/inc/langhelper.hxx b/sw/source/ui/inc/langhelper.hxx
index 419bfb33ad..562cb52287 100755
--- a/sw/source/ui/inc/langhelper.hxx
+++ b/sw/source/ui/inc/langhelper.hxx
@@ -31,31 +31,37 @@ class SwWrtShell;
class SwView;
class EditEngine;
class EditView;
+class OutlinerView;
class SfxItemSet;
struct ESelection;
namespace SwLangHelper
{
- extern USHORT GetLanguageStatus(OutlinerView* pOLV,SfxItemSet& rSet);
- extern bool SetLanguageStatus(OutlinerView* pOLV,SfxRequest &rReq,SwView &rView,SwWrtShell &rSh);
+ extern USHORT GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet );
+ extern bool SetLanguageStatus( OutlinerView* pOLV, SfxRequest &rReq, SwView &rView, SwWrtShell &rSh );
- extern void SetLanguage(SwWrtShell &rWrtSh, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet);
- extern void SetLanguage(SwWrtShell &rWrtSh, EditEngine* pEditEngine,ESelection aSelection, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet);
- extern void SetLanguage_None(SwWrtShell &rWrtSh, EditEngine* pEditEngine,ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet );
- extern void SetLanguage_None(SwWrtShell &rWrtSh,bool bIsForSelection, SfxItemSet &rCoreSet );
+ extern void SetLanguage( SwWrtShell &rWrtSh, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet );
+// extern void SetLanguage( SwWrtShell &rWrtSh, EditEngine* pEditEngine, ESelection aSelection, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet );
+ extern void SetLanguage( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet );
+ extern void SetLanguage_None( SwWrtShell &rWrtSh, bool bIsForSelection, SfxItemSet &rCoreSet );
+// extern void SetLanguage_None( SwWrtShell &rWrtSh, EditEngine* pEditEngine, ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet );
+ extern void SetLanguage_None( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet );
+ extern void ResetLanguages( SwWrtShell &rWrtSh, bool bIsForSelection );
+// extern void ResetLanguages( SwWrtShell &rWrtSh, EditEngine* pEditEngine, ESelection aSelection, bool bIsForSelection );
+ extern void ResetLanguages( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection );
// document
extern void SelectCurrentPara( SwWrtShell &rWrtSh );
// EditView
extern void SelectPara( EditView &rEditView, const ESelection &rCurSel );
- extern String GetTextForLanguageGuessing(EditEngine* rEditEngine, ESelection aDocSelection );
+ extern String GetTextForLanguageGuessing( EditEngine* rEditEngine, ESelection aDocSelection );
extern String GetTextForLanguageGuessing( SwWrtShell &rSh );
extern LanguageType GetLanguage( SfxItemSet aSet, USHORT nLangWhichId );
extern LanguageType GetLanguage( SwWrtShell &rSh, USHORT nLangWhichId );
- extern LanguageType GetCurrentLanguage(SfxItemSet aSet,USHORT nScriptType );
+ extern LanguageType GetCurrentLanguage( SfxItemSet aSet, USHORT nScriptType );
extern LanguageType GetCurrentLanguage( SwWrtShell &rSh );
}
diff --git a/sw/source/ui/inc/olmenu.hxx b/sw/source/ui/inc/olmenu.hxx
index 3f433c249b..e2285207e4 100644
--- a/sw/source/ui/inc/olmenu.hxx
+++ b/sw/source/ui/inc/olmenu.hxx
@@ -51,23 +51,22 @@ class SwSpellPopup : public PopupMenu
::com::sun::star::linguistic2::XSpellAlternatives > xSpellAlt;
::com::sun::star::uno::Sequence< rtl::OUString > aSuggestions;
+
LanguageType nCheckedLanguage;
-
LanguageType nGuessLangWord;
LanguageType nGuessLangPara;
- USHORT nNumLanguageTextEntries;
- USHORT nNumLanguageParaEntries;
- USHORT nNumLanguageDocEntries;
std::map< sal_Int16, ::rtl::OUString > aLangTable_Text;
std::map< sal_Int16, ::rtl::OUString > aLangTable_Paragraph;
- std::map< sal_Int16, ::rtl::OUString > aLangTable_Document;
+// std::map< sal_Int16, ::rtl::OUString > aLangTable_Document;
bool bGrammarResults; // show grammar results? Or show spellcheck results?
Image aInfo16;
- USHORT fillLangPopupMenu( PopupMenu *pPopupMenu , USHORT Lang_Start, ::com::sun::star::uno::Sequence< ::rtl::OUString > aSeq,SwWrtShell* pWrtSh, USHORT nLangTable);
+ void fillLangPopupMenu( PopupMenu *pPopupMenu, USHORT nLangStart,
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > aSeq, SwWrtShell* pWrtSh,
+ std::map< sal_Int16, ::rtl::OUString > &rLangTable );
using PopupMenu::Execute;
diff --git a/sw/source/ui/inc/regionsw.hxx b/sw/source/ui/inc/regionsw.hxx
index 1be9e19c54..2521232be0 100644
--- a/sw/source/ui/inc/regionsw.hxx
+++ b/sw/source/ui/inc/regionsw.hxx
@@ -61,91 +61,11 @@ namespace sfx2
class FileDialogHelper;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-class SectRepr
-{
- SwSection aSection;
- SwFmtCol aCol;
- SvxBrushItem aBrush;
- SwFmtFtnAtTxtEnd aFtnNtAtEnd;
- SwFmtEndAtTxtEnd aEndNtAtEnd;
- SwFmtNoBalancedColumns aBalance;
- SvxFrameDirectionItem aFrmDirItem;
- SvxLRSpaceItem aLRSpaceItem;
- USHORT nArrPos;
- USHORT nColumn;
- BOOL bContent : 1; //zeigt an, ob evtl. Textinhalt im Bereich ist
- BOOL bSelected : 1; //fuer Multiselektion erst markieren, dann mit der TreeListBox arbeiten!
- ::com::sun::star::uno::Sequence <sal_Int8 > aTempPasswd;
-public:
- SectRepr(USHORT nPos, SwSection& rSect);
- BOOL operator ==(SectRepr& rSectRef) const
- {return nArrPos==rSectRef.GetArrPos();}
-
- BOOL operator <(SectRepr& rSectRef) const
- {return nArrPos<rSectRef.GetArrPos();}
-
- SwSection& GetSection() { return aSection; }
- SwFmtCol& GetCol() { return aCol; }
- SvxBrushItem& GetBackground() { return aBrush; }
- SwFmtFtnAtTxtEnd& GetFtnNtAtEnd() { return aFtnNtAtEnd; }
- SwFmtEndAtTxtEnd& GetEndNtAtEnd() { return aEndNtAtEnd; }
- SwFmtNoBalancedColumns& GetBalance() { return aBalance; }
- SvxFrameDirectionItem& GetFrmDir() { return aFrmDirItem; }
- SvxLRSpaceItem& GetLRSpace() { return aLRSpaceItem; }
-
- USHORT GetArrPos() const {return nArrPos;}
- const String& GetCondition() const {return aSection.GetCondition();}
- const String& GetName() const { return aSection.GetName(); }
- String GetFile() const;
- String GetSubRegion() const;
- void SetFile( const String& rFile );
- void SetFilter( const String& rFilter );
- void SetSubRegion( const String& rSubRegion );
-
- void SetFilePasswd( const String& rPasswd )
- { aSection.SetLinkFilePassWd( rPasswd ); }
- void SetCondition( const String& rString )
- {aSection.SetCondition( rString);}
- BOOL IsCondHidden()const
- {return aSection.IsCondHidden();}
- BOOL IsHidden()const
- {return aSection.IsHidden();}
- BOOL IsProtect()const
- {return aSection.IsProtect();}
- // --> FME 2004-06-22 #114856# edit in readonly sections
- BOOL IsEditInReadonly()const
- {return aSection.IsEditInReadonly();}
- void SetEditInReadonly(BOOL bFlag = TRUE)
- {aSection.SetEditInReadonly(bFlag);}
- // <--
- void SetHidden(BOOL bFlag = TRUE)
- {aSection.SetHidden(bFlag);}
- void SetCondHidden(BOOL bFlag = TRUE)
- {aSection.SetCondHidden(bFlag);}
- void SetProtect(BOOL bFlag = TRUE)
- {aSection.SetProtect(bFlag);}
- BOOL IsContent(){return bContent;}
- void SetContent(BOOL bValue){bContent = bValue;}
- void SetSectionType(SectionType eSectionType) {aSection.SetType(eSectionType);}
- SectionType GetSectionType(){return aSection.GetType();}
-
- void SetSelected(){bSelected = TRUE;}
- BOOL IsSelected() const {return bSelected;}
-
-
- const ::com::sun::star::uno::Sequence <sal_Int8 >& GetPasswd() const {return aSection.GetPasswd();}
- ::com::sun::star::uno::Sequence <sal_Int8 >& GetTempPasswd() {return aTempPasswd;}
- void SetTempPasswd(const ::com::sun::star::uno::Sequence <sal_Int8 >& aPasswd) {aTempPasswd = aPasswd;}
-};
-
/*************************************************************************
Dialog "Bereiche bearbeiten"
*************************************************************************/
+class SectRepr;
typedef SectRepr* SectReprPtr;
SV_DECL_PTRARR_SORT( SectReprArr, SectReprPtr, 0, 4 )
@@ -385,7 +305,8 @@ public:
class SwInsertSectionTabDialog : public SfxTabDialog
{
SwWrtShell& rWrtSh;
- SwSection* pToInsertSection;
+ ::std::auto_ptr<SwSectionData> m_pSectionData;
+
protected:
virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
virtual short Ok();
@@ -393,8 +314,8 @@ public:
SwInsertSectionTabDialog(Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh);
virtual ~SwInsertSectionTabDialog();
- void SetSection(const SwSection& rSect);
- SwSection* GetSection() { return pToInsertSection;}
+ void SetSectionData(SwSectionData const& rSect);
+ SwSectionData * GetSectionData() { return m_pSectionData.get(); }
};
/* -----------------21.05.99 13:07-------------------
diff --git a/sw/source/ui/inc/swdtflvr.hxx b/sw/source/ui/inc/swdtflvr.hxx
index 3e93acb021..382188f9e3 100644
--- a/sw/source/ui/inc/swdtflvr.hxx
+++ b/sw/source/ui/inc/swdtflvr.hxx
@@ -26,12 +26,10 @@
************************************************************************/
#ifndef _SWDTFLVR_HXX
#define _SWDTFLVR_HXX
-#ifndef _TRANSFER_HXX
#include <sfx2/objsh.hxx>
#include <svtools/transfer.hxx>
-#endif
#include <vcl/graph.hxx>
#include <sfx2/lnkbase.hxx>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
diff --git a/sw/source/ui/inc/swmn_tmpl.hrc b/sw/source/ui/inc/swmn_tmpl.hrc
index ff71288bcc..af1c013c1a 100644
--- a/sw/source/ui/inc/swmn_tmpl.hrc
+++ b/sw/source/ui/inc/swmn_tmpl.hrc
@@ -131,7 +131,6 @@
HelpID = MN_FORMAT_ALGN ; \
Command = ".uno:AlignTextMenu" ; \
Text [ en-US ] = "A~lignment" ; \
- RadioCheck = TRUE ; \
SubMenu = Menu\
{\
ItemList = \
diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx
index 4712c76e24..039f9ff32c 100644
--- a/sw/source/ui/inc/view.hxx
+++ b/sw/source/ui/inc/view.hxx
@@ -437,6 +437,12 @@ public:
virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE );
virtual void MarginChanged();
+ // replace word/selection with text from the thesaurus
+ // (this code has special handling for "in word" character)
+ void InsertThesaurusSynonym( const String &rSynonmText, const String &rLookUpText, bool bValidSelection );
+ bool IsValidSelectionForThesaurus() const;
+ String GetThesaurusLookUpText( bool bSelection ) const;
+
// Shell sofort wechseln -> fuer GetSelectionObject
void StopShellTimer();
@@ -574,7 +580,7 @@ public:
BOOL HasDrwObj(SdrObject *pSdrObj) const;
BOOL HasOnlyObj(SdrObject *pSdrObj, UINT32 eObjInventor) const;
BOOL BeginTextEdit( SdrObject* pObj, SdrPageView* pPV=NULL,
- Window* pWin=NULL, BOOL bIsNewObj=FALSE);
+ Window* pWin=NULL, bool bIsNewObj=false, bool bSetSelectionToStart=false );
void StateTabWin(SfxItemSet&);
@@ -599,6 +605,7 @@ public:
SwDocShell *GetDocShell();
inline const SwDocShell *GetDocShell() const;
inline FmFormShell *GetFormShell() { return pFormShell; }
+ inline const FmFormShell *GetFormShell() const { return pFormShell; }
//damit in DToren der SubShells ggf. pShell zurueckgesetzt werden kann
void ResetSubShell() { pShell = 0; }
diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx
index ff1143b1f2..14b26c0391 100644
--- a/sw/source/ui/inc/wrtsh.hxx
+++ b/sw/source/ui/inc/wrtsh.hxx
@@ -47,7 +47,7 @@ class SdrView;
class SwView;
class SvGlobalName;
class SwInputFieldList;
-class SwSection;
+class SwSectionData;
class Timer;
class SvxMacro;
class SwFmtINetFmt;
@@ -460,7 +460,7 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
void AutoUpdatePara(SwTxtFmtColl* pColl, const SfxItemSet& rStyleSet);
// Link fuers einfuegen von Bereichen uebers Drag&Drop/Clipboard
- DECL_STATIC_LINK( SwWrtShell, InsertRegionDialog, SwSection* );
+ DECL_STATIC_LINK( SwWrtShell, InsertRegionDialog, SwSectionData* );
//ctoren, der erstere ist eine Art kontrollierter copy ctor fuer weitere
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index 02a342e02f..9a1d361012 100644
--- a/sw/source/ui/lingu/olmenu.cxx
+++ b/sw/source/ui/lingu/olmenu.cxx
@@ -28,85 +28,84 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#include <hintids.hxx>
+#include "SwRewriter.hxx"
+#include "chrdlg.hrc"
+#include "cmdid.h"
+#include "comcore.hrc"
+#include "crsskip.hxx"
+#include "doc.hxx"
+#include "docsh.hxx" //CheckSpellChanges
+#include "edtwin.hxx"
+#include "helpid.h"
+#include "hintids.hxx"
+#include "langhelper.hxx"
+#include "ndtxt.hxx"
+#include "olmenu.hrc"
+#include "olmenu.hxx"
+#include "swabstdlg.hxx"
+#include "swmodule.hxx"
+#include "swtypes.hxx"
+#include "swundo.hxx"
+#include "uitool.hxx"
+#include "undobj.hxx"
+#include "unomid.h"
+#include "view.hxx"
+#include "viewopt.hxx"
+#include "wrtsh.hxx"
+#include "wview.hxx"
+#include "swabstdlg.hxx"
+#include "chrdlg.hrc"
+
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_STRINGSDTOR
#include <svl/svstdarr.hxx>
#endif
-#include <unotools/lingucfg.hxx>
-#include <unotools/linguprops.hxx>
-#include <svtools/filter.hxx>
-#include <editeng/svxacorr.hxx>
-#include <sfx2/dispatch.hxx>
-#include <sfx2/imagemgr.hxx>
-#include <osl/file.hxx>
-#include <rtl/string.hxx>
+#include <comphelper/processfactory.hxx>
+#include <editeng/acorrcfg.hxx>
+#include <editeng/svxacorr.hxx>
+#include <editeng/langitem.hxx>
+#include <editeng/splwrap.hxx>
+#include <editeng/brshitem.hxx>
+#include <editeng/unolingu.hxx>
#include <i18npool/mslangid.hxx>
#include <linguistic/lngprops.hxx>
#include <linguistic/misc.hxx>
-#include <comphelper/processfactory.hxx>
-#include <editeng/unolingu.hxx>
-#include <com/sun/star/uno/Any.hxx>
-#include <com/sun/star/frame/XStorable.hpp>
-#include <com/sun/star/linguistic2/XSpellChecker1.hpp>
-#include <com/sun/star/linguistic2/XLanguageGuessing.hpp>
-#include <com/sun/star/linguistic2/SingleProofreadingError.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/container/XIndexAccess.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
-#include <com/sun/star/frame/XModuleManager.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/i18n/ScriptType.hpp>
-#include <svx/dlgutil.hxx>
+#include <osl/file.hxx>
+#include <rtl/string.hxx>
+#include <svtools/filter.hxx>
+#include <sfx2/dispatch.hxx>
+#include <sfx2/imagemgr.hxx>
+#include <sfx2/request.hxx>
+#include <sfx2/sfxdlg.hxx>
#include <svl/itemset.hxx>
-#include <editeng/langitem.hxx>
-#include <editeng/splwrap.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/settings.hxx>
-#include <unotools/lingucfg.hxx>
-#include <editeng/acorrcfg.hxx>
-#include <swmodule.hxx>
-#include <cmdid.h>
-#include <helpid.h>
-#include <swtypes.hxx>
-#include <wrtsh.hxx>
-#include <view.hxx>
-#include <docsh.hxx> //CheckSpellChanges
-#include <olmenu.hxx>
-#include <swundo.hxx>
-#include <crsskip.hxx>
-#include <ndtxt.hxx>
-#include <olmenu.hrc>
-#include <doc.hxx>
-
-// -> #111827#
-#include <SwRewriter.hxx>
-#include <comcore.hrc>
-#include <undobj.hxx>
-// <- #111827#
-
-#include <unomid.h>
#include <svl/languageoptions.hxx>
-#include <map>
-#include <svtools/langtab.hxx>
-#include <com/sun/star/document/XDocumentLanguages.hpp>
-#include <edtwin.hxx>
-#include <sfx2/sfxdlg.hxx>
-#include "swabstdlg.hxx"
-#include "chrdlg.hrc"
-#include <editeng/brshitem.hxx>
#include <svl/stritem.hxx>
-#include <viewopt.hxx>
-#include <uitool.hxx>
+#include <svtools/filter.hxx>
+#include <svtools/langtab.hxx>
+#include <svx/dlgutil.hxx>
+#include <unotools/lingucfg.hxx>
+#include <unotools/linguprops.hxx>
+#include <vcl/msgbox.hxx>
+#include <vcl/settings.hxx>
+#include <vcl/svapp.hxx>
-#include <wview.hxx>
-#include <sfx2/request.hxx>
+#include <map>
-#include <vcl/msgbox.hxx>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/document/XDocumentLanguages.hpp>
+#include <com/sun/star/frame/XModuleManager.hpp>
+#include <com/sun/star/frame/XStorable.hpp>
+#include <com/sun/star/i18n/ScriptType.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/linguistic2/SingleProofreadingError.hpp>
+#include <com/sun/star/linguistic2/XLanguageGuessing.hpp>
+#include <com/sun/star/linguistic2/XSpellChecker1.hpp>
+#include <com/sun/star/uno/Any.hxx>
-#include <langhelper.hxx>
using namespace ::com::sun::star;
using ::rtl::OUString;
@@ -214,63 +213,59 @@ inline bool lcl_checkScriptType( sal_Int16 nScriptType, LanguageType nLang )
return 0 != (nScriptType & SvtLanguageOptions::GetScriptTypeOfLanguage( nLang ));
}
-USHORT SwSpellPopup::fillLangPopupMenu(
+void SwSpellPopup::fillLangPopupMenu(
PopupMenu *pPopupMenu,
- USHORT Lang_Start,
- uno::Sequence< ::rtl::OUString > aSeq,
+ USHORT nLangItemIdStart,
+ uno::Sequence< OUString > aSeq,
SwWrtShell* pWrtSh,
- USHORT nLangTable )
+ std::map< sal_Int16, ::rtl::OUString > &rLangTable )
{
if (!pPopupMenu)
- return 0;
-
- //Reference< awt::XMenuExtended > m_xMenuExtended( m_xPopupMenu, UNO_QUERY );
- std::map< ::rtl::OUString, ::rtl::OUString > LangItems;
+ return;
SvtLanguageTable aLanguageTable;
- USHORT nItemId = Lang_Start;
- rtl::OUString curLang = aSeq[0];
- USHORT nScriptType = static_cast< sal_Int16 >(aSeq[1].toInt32());
- rtl::OUString keyboardLang = aSeq[2];
- rtl::OUString guessLang = aSeq[3];
-
- //1--add current language
- if(curLang!=OUString::createFromAscii(""))
- {
- LangItems[curLang]=curLang;
- }
+
+ // set of languages to be displayed in the sub menus
+ std::set< OUString > aLangItems;
+
+ OUString aCurLang( aSeq[0] );
+ USHORT nScriptType = static_cast< sal_Int16 >(aSeq[1].toInt32());
+ OUString aKeyboardLang( aSeq[2] );
+ OUString aGuessedTextLang( aSeq[3] );
+
+ if (aCurLang != OUString() &&
+ LANGUAGE_DONTKNOW != aLanguageTable.GetType( aCurLang ))
+ aLangItems.insert( aCurLang );
- SvtLanguageTable aLangTable;
//2--System
- const AllSettings& rAllSettings=Application::GetSettings();
+ const AllSettings& rAllSettings = Application::GetSettings();
LanguageType rSystemLanguage = rAllSettings.GetLanguage();
- if(rSystemLanguage!=LANGUAGE_DONTKNOW)
+ if (rSystemLanguage != LANGUAGE_DONTKNOW)
{
- if (lcl_checkScriptType(nScriptType,rSystemLanguage ))
- LangItems[OUString(aLangTable.GetString(rSystemLanguage))]=OUString(aLangTable.GetString(rSystemLanguage));
+ if (lcl_checkScriptType( nScriptType, rSystemLanguage ))
+ aLangItems.insert( aLanguageTable.GetString(rSystemLanguage) );
}
//3--UI
LanguageType rUILanguage = rAllSettings.GetUILanguage();
- if(rUILanguage!=LANGUAGE_DONTKNOW)
+ if (rUILanguage != LANGUAGE_DONTKNOW)
{
if (lcl_checkScriptType(nScriptType, rUILanguage ))
- LangItems[OUString(aLangTable.GetString(rUILanguage))]=OUString(aLangTable.GetString(rUILanguage));
+ aLangItems.insert( aLanguageTable.GetString(rUILanguage) );
}
//4--guessed language
- if(guessLang!=OUString::createFromAscii(""))
+ if (aGuessedTextLang.getLength() > 0)
{
- if (lcl_checkScriptType(nScriptType, aLanguageTable.GetType(guessLang)))
- LangItems[guessLang]=guessLang;
+ if (lcl_checkScriptType(nScriptType, aLanguageTable.GetType(aGuessedTextLang)))
+ aLangItems.insert( aGuessedTextLang );
}
-
//5--keyboard language
- if(keyboardLang!=OUString::createFromAscii(""))
+ if (aKeyboardLang.getLength() > 0)
{
- if (lcl_checkScriptType(nScriptType, aLanguageTable.GetType(keyboardLang)))
- LangItems[keyboardLang]=keyboardLang;
+ if (lcl_checkScriptType(nScriptType, aLanguageTable.GetType(aKeyboardLang)))
+ aLangItems.insert( aKeyboardLang );
}
//6--all languages used in current document
@@ -278,68 +273,57 @@ USHORT SwSpellPopup::fillLangPopupMenu(
uno::Reference< com::sun::star::frame::XController > xController( pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface()->getController(), uno::UNO_QUERY );
if ( xController.is() )
xModel = xController->getModel();
-
uno::Reference< document::XDocumentLanguages > xDocumentLanguages( xModel, uno::UNO_QUERY );
- /*the description of nScriptType
- LATIN : 1
- ASIAN : 2
- COMPLEX:4
- LATIN + ASIAN : 3
- LATIN + COMPLEX : 5
- ASIAN + COMPLEX : 6
- LATIN + ASIAN + COMPLEX : 7
+ /*the description of nScriptType flags
+ LATIN : 0x0001
+ ASIAN : 0x0002
+ COMPLEX: 0x0004
*/
-
- sal_Int16 nCount=7;
- if(xDocumentLanguages.is())
+ const sal_Int16 nMaxCount = 7;
+ if (xDocumentLanguages.is())
{
- uno::Sequence< lang::Locale > rLocales(xDocumentLanguages->getDocumentLanguages(nScriptType,nCount));
- if(rLocales.getLength()>0)
+ uno::Sequence< lang::Locale > rLocales( xDocumentLanguages->getDocumentLanguages( nScriptType, nMaxCount ) );
+ if (rLocales.getLength() > 0)
{
- for(USHORT i = 0; i<rLocales.getLength();++i)
+ for (USHORT i = 0; i < rLocales.getLength(); ++i)
{
- if (LangItems.size()==7)
+ if (aLangItems.size() == (size_t)nMaxCount)
break;
- const lang::Locale& rLocale=rLocales[i];
- if(lcl_checkScriptType(nScriptType, aLanguageTable.GetType(rLocale.Language)))
- LangItems[ rtl::OUString(rLocale.Language)]=OUString(rLocale.Language);
+ const lang::Locale& rLocale = rLocales[i];
+ if (lcl_checkScriptType( nScriptType, aLanguageTable.GetType( rLocale.Language )))
+ aLangItems.insert( rLocale.Language );
}
}
}
- for (std::map< rtl::OUString, rtl::OUString >::const_iterator it = LangItems.begin(); it != LangItems.end(); ++it)
+
+ USHORT nItemId = nLangItemIdStart;
+ const OUString sAsterix(RTL_CONSTASCII_USTRINGPARAM("*")); // multiple languages in current selection
+ const OUString sEmpty; // 'no language found' from language guessing
+ std::set< OUString >::const_iterator it;
+ for (it = aLangItems.begin(); it != aLangItems.end(); ++it)
{
- rtl::OUString aEntryTxt( it->first );
- if (aEntryTxt != rtl::OUString( aLangTable.GetString( LANGUAGE_NONE ) )&&
- aEntryTxt != rtl::OUString::createFromAscii("*") &&
- aEntryTxt.getLength() > 0)
+ OUString aEntryTxt( *it );
+ if (aEntryTxt != OUString( aLanguageTable.GetString( LANGUAGE_NONE ) )&&
+ aEntryTxt != sAsterix &&
+ aEntryTxt != sEmpty)
{
- ++nItemId;
- if (nLangTable == 0) // language for selection
- aLangTable_Text[nItemId] = aEntryTxt;
- else if (nLangTable == 1) // language for paragraph
- aLangTable_Paragraph[nItemId] = aEntryTxt;
- else if (nLangTable == 2) // language for document
- aLangTable_Document[nItemId] = aEntryTxt;
-
+ DBG_ASSERT( nLangItemIdStart <= nItemId && nItemId <= nLangItemIdStart + MN_MAX_NUM_LANG,
+ "nItemId outside of expected range!" );
pPopupMenu->InsertItem( nItemId, aEntryTxt, MIB_RADIOCHECK );
- if (aEntryTxt == curLang)
+ if (aEntryTxt == aCurLang)
{
//make a check mark for the current language
pPopupMenu->CheckItem( nItemId, TRUE );
}
+ rLangTable[ nItemId ] = aEntryTxt;
+ ++nItemId;
}
}
- //7--none
- nItemId++;
- pPopupMenu->InsertItem( nItemId, String(SW_RES( STR_LANGSTATUS_NONE )), MIB_RADIOCHECK );
-
- //More...
- nItemId++;
- pPopupMenu->InsertItem( nItemId, String(SW_RES( STR_LANGSTATUS_MORE )), MIB_RADIOCHECK );
-
- return nItemId - Lang_Start; // return number of inserted entries
+ pPopupMenu->InsertItem( nLangItemIdStart + MN_NONE_OFFSET, String(SW_RES( STR_LANGSTATUS_NONE )), MIB_RADIOCHECK );
+ pPopupMenu->InsertItem( nLangItemIdStart + MN_RESET_OFFSET, String(SW_RES( STR_RESET_TO_DEFAULT_LANGUAGE )), MIB_RADIOCHECK );
+ pPopupMenu->InsertItem( nLangItemIdStart + MN_MORE_OFFSET, String(SW_RES( STR_LANGSTATUS_MORE )), MIB_RADIOCHECK );
}
@@ -362,22 +346,22 @@ static Image lcl_GetImageFromPngUrl( const OUString &rFileUrl )
}
-::rtl::OUString RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL )
+OUString RetrieveLabelFromCommand( const OUString& aCmdURL )
{
- ::rtl::OUString aLabel;
+ OUString aLabel;
if ( aCmdURL.getLength() )
{
try
{
- uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString::createFromAscii("com.sun.star.frame.UICommandDescription") ), uno::UNO_QUERY );
+ uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance( OUString::createFromAscii("com.sun.star.frame.UICommandDescription") ), uno::UNO_QUERY );
if ( xNameAccess.is() )
{
uno::Reference< container::XNameAccess > xUICommandLabels;
- const ::rtl::OUString aModule( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextDocument" ) );
+ const OUString aModule( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextDocument" ) );
uno::Any a = xNameAccess->getByName( aModule );
uno::Reference< container::XNameAccess > xUICommands;
a >>= xUICommandLabels;
- rtl::OUString aStr;
+ OUString aStr;
uno::Sequence< beans::PropertyValue > aPropSeq;
a = xUICommandLabels->getByName( aCmdURL );
if ( a >>= aPropSeq )
@@ -442,25 +426,28 @@ bGrammarResults(false)
InsertSeparator(0);
bEnable = sal_True;
- for( sal_uInt16 i = 0, nPos = 1, nId = MN_AUTOCORR_START + 1;
- i < nStringCount; ++i, ++nPos, ++nId )
+ USHORT nAutoCorrItemId = MN_AUTOCORR_START;
+ USHORT nItemId = MN_SUGGESTION_START;
+ for (USHORT i = 0; i < nStringCount; ++i)
{
const String aEntry = aSuggestions[ i ];
- InsertItem( nPos, aEntry, 0, i );
- SetHelpId( nPos, HID_LINGU_REPLACE);
-
+ InsertItem( nItemId, aEntry, 0, i );
+ SetHelpId( nItemId, HID_LINGU_REPLACE);
if (aSuggestionImageUrl.getLength() > 0)
- SetItemImage( nPos, aImage );
+ SetItemImage( nItemId, aImage );
- pMenu->InsertItem( nId, aEntry );
- pMenu->SetHelpId( nPos, HID_LINGU_AUTOCORR);
+ pMenu->InsertItem( nAutoCorrItemId, aEntry );
+ pMenu->SetHelpId( nAutoCorrItemId, HID_LINGU_AUTOCORR);
+
+ ++nAutoCorrItemId;
+ ++nItemId;
}
}
OUString aIgnoreSelection( String( SW_RES( STR_IGNORE_SELECTION ) ) );
OUString aSpellingAndGrammar = RetrieveLabelFromCommand( C2U(".uno:SpellingAndGrammarDialog") );
- SetItemText( MN_SPELLING, aSpellingAndGrammar );
- USHORT nItemPos = GetItemPos( MN_IGNORE );
+ SetItemText( MN_SPELLING_DLG, aSpellingAndGrammar );
+ USHORT nItemPos = GetItemPos( MN_IGNORE_WORD );
InsertItem( MN_IGNORE_SELECTION, aIgnoreSelection, 0, nItemPos );
SetHelpId( MN_IGNORE_SELECTION, HID_LINGU_IGNORE_SELECTION);
@@ -483,11 +470,9 @@ bGrammarResults(false)
nGuessLangPara = nGuessLangWord;
}
- pMenu = GetPopupMenu(MN_INSERT);
-
- bEnable = FALSE; // enable MN_INSERT?
-
+ pMenu = GetPopupMenu(MN_ADD_TO_DIC);
pMenu->CreateAutoMnemonics();
+ bEnable = FALSE; // enable MN_ADD_TO_DIC?
uno::Reference< linguistic2::XDictionaryList > xDicList( SvxGetDictionaryList() );
if (xDicList.is())
{
@@ -502,6 +487,7 @@ bGrammarResults(false)
const uno::Reference< linguistic2::XDictionary > *pDic = aDics.getConstArray();
USHORT nDicCount = static_cast< USHORT >(aDics.getLength());
+ USHORT nItemId = MN_DICTIONARIES_START;
for( USHORT i = 0; i < nDicCount; i++ )
{
uno::Reference< linguistic2::XDictionary > xDicTmp( pDic[i], uno::UNO_QUERY );
@@ -517,8 +503,7 @@ bGrammarResults(false)
{
// the extra 1 is because of the (possible) external
// linguistic entry above
- USHORT nPos = MN_INSERT_START + i + 1;
- pMenu->InsertItem( nPos, xDicTmp->getName() );
+ pMenu->InsertItem( nItemId, xDicTmp->getName() );
bEnable = sal_True;
uno::Reference< lang::XServiceInfo > xSvcInfo( xDicTmp, uno::UNO_QUERY );
@@ -529,18 +514,20 @@ bGrammarResults(false)
if (aDictionaryImageUrl.getLength() > 0)
{
Image aImage( lcl_GetImageFromPngUrl( aDictionaryImageUrl ) );
- pMenu->SetItemImage( nPos, aImage );
+ pMenu->SetItemImage( nItemId, aImage );
}
}
+
+ ++nItemId;
}
}
}
- EnableItem( MN_INSERT, bEnable );
+ EnableItem( MN_ADD_TO_DIC, bEnable );
//ADD NEW LANGUAGE MENU ITEM
///////////////////////////////////////////////////////////////////////////
String aScriptTypesInUse( String::CreateFromInt32( pWrtSh->GetScriptType() ) );
- SvtLanguageTable aLangTable;
+ SvtLanguageTable aLanguageTable;
// get keyboard language
String aKeyboardLang;
@@ -548,41 +535,42 @@ bGrammarResults(false)
SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin();
nLang = rEditWin.GetInputLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
- aKeyboardLang = aLangTable.GetString( nLang );
+ aKeyboardLang = aLanguageTable.GetString( nLang );
// get the language that is in use
const String aMultipleLanguages = String::CreateFromAscii("*");
String aCurrentLang = aMultipleLanguages;
nLang = SwLangHelper::GetCurrentLanguage( *pWrtSh );
if (nLang != LANGUAGE_DONTKNOW)
- aCurrentLang = aLangTable.GetString( nLang );
+ aCurrentLang = aLanguageTable.GetString( nLang );
// build sequence for status value
- uno::Sequence< ::rtl::OUString > aSeq( 4 );
+ uno::Sequence< OUString > aSeq( 4 );
aSeq[0] = aCurrentLang;
aSeq[1] = aScriptTypesInUse;
aSeq[2] = aKeyboardLang;
- aSeq[3] = aLangTable.GetString(nGuessLangWord);
+ aSeq[3] = aLanguageTable.GetString(nGuessLangWord);
- pMenu = GetPopupMenu(MN_LANGUAGE_SELECTION);
- nNumLanguageTextEntries = fillLangPopupMenu( pMenu, MN_LANGUAGE_SELECTION_START, aSeq, pWrtSh, 0 );
- EnableItem( MN_LANGUAGE_SELECTION, true );
+ pMenu = GetPopupMenu(MN_SET_LANGUAGE_SELECTION);
+ fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_SELECTION_START, aSeq, pWrtSh, aLangTable_Text );
+ EnableItem( MN_SET_LANGUAGE_SELECTION, true );
- pMenu = GetPopupMenu(MN_LANGUAGE_PARAGRAPH);
- nNumLanguageParaEntries = fillLangPopupMenu( pMenu, MN_LANGUAGE_PARAGRAPH_START, aSeq, pWrtSh, 1 );
- EnableItem( MN_LANGUAGE_PARAGRAPH, true );
+ pMenu = GetPopupMenu(MN_SET_LANGUAGE_PARAGRAPH);
+ fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_PARAGRAPH_START, aSeq, pWrtSh, aLangTable_Paragraph );
+ EnableItem( MN_SET_LANGUAGE_PARAGRAPH, true );
/*
- pMenu = GetPopupMenu(MN_LANGUAGE_ALL_TEXT);
- nNumLanguageDocEntries = fillLangPopupMenu( pMenu, MN_LANGUAGE_ALL_TEXT_START, aSeq, pWrtSh, 2 );
- EnableItem( MN_LANGUAGE_ALL_TEXT, true );
+ pMenu = GetPopupMenu(MN_SET_LANGUAGE_ALL_TEXT);
+ fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_ALL_TEXT_START, aSeq, pWrtSh, aLangTable_Document );
+ EnableItem( MN_SET_LANGUAGE_ALL_TEXT, true );
*/
uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface();
Image rImg = ::GetImage( xFrame,
- ::rtl::OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False,
+ OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False,
Application::GetSettings().GetStyleSettings().GetHighContrastMode() );
- SetItemImage( MN_SPELLING, rImg );
- //////////////////////////////////////////////////////////////////////////////////
+ SetItemImage( MN_SPELLING_DLG, rImg );
+ //////////////////////////////////////////////////////////////////////////////////
+
RemoveDisabledEntries( TRUE, TRUE );
SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS);
}
@@ -595,7 +583,7 @@ SwSpellPopup::SwSpellPopup(
SwWrtShell *pWrtSh,
const linguistic2::ProofreadingResult &rResult,
sal_Int32 nErrorInResult,
- const uno::Sequence< rtl::OUString > &rSuggestions,
+ const uno::Sequence< OUString > &rSuggestions,
const String &rParaText ) :
PopupMenu( SW_RES(MN_SPELL_POPUP) ),
pSh( pWrtSh ),
@@ -605,13 +593,11 @@ aInfo16( SW_RES(IMG_INFO_16) )
{
nCheckedLanguage = SvxLocaleToLanguage( rResult.aLocale );
- sal_Int16 nItemId = 1;
- sal_Int16 nPos = 0;
+ USHORT nPos = 0;
OUString aMessageText( rResult.aErrors[ nErrorInResult ].aShortComment );
InsertSeparator( nPos++ );
- InsertItem( nItemId, aMessageText, MIB_NOSELECT, nPos++ );
- SetItemImage( nItemId, aInfo16 );
- ++nItemId;
+ InsertItem( MN_SHORT_COMMENT, aMessageText, MIB_NOSELECT, nPos++ );
+ SetItemImage( MN_SHORT_COMMENT, aInfo16 );
CreateAutoMnemonics();
@@ -628,12 +614,12 @@ aInfo16( SW_RES(IMG_INFO_16) )
aImage = Image( lcl_GetImageFromPngUrl( aSuggestionImageUrl ) );
}
+ USHORT nItemId = MN_SUGGESTION_START;
for (sal_uInt16 i = 0; i < nStringCount; ++i)
{
const String aEntry = aSuggestions[ i ];
InsertItem( nItemId, aEntry, 0, nPos++ );
SetHelpId( nItemId, HID_LINGU_REPLACE );
-
if (aSuggestionImageUrl.getLength() > 0)
SetItemImage( nItemId, aImage );
@@ -644,8 +630,8 @@ aInfo16( SW_RES(IMG_INFO_16) )
OUString aIgnoreSelection( String( SW_RES( STR_IGNORE_SELECTION ) ) );
OUString aSpellingAndGrammar = RetrieveLabelFromCommand( C2U(".uno:SpellingAndGrammarDialog") );
- SetItemText( MN_SPELLING, aSpellingAndGrammar );
- USHORT nItemPos = GetItemPos( MN_IGNORE );
+ SetItemText( MN_SPELLING_DLG, aSpellingAndGrammar );
+ USHORT nItemPos = GetItemPos( MN_IGNORE_WORD );
InsertItem( MN_IGNORE_SELECTION, aIgnoreSelection, 0, nItemPos );
SetHelpId( MN_IGNORE_SELECTION, HID_LINGU_IGNORE_SELECTION);
@@ -668,13 +654,13 @@ aInfo16( SW_RES(IMG_INFO_16) )
nGuessLangPara = nGuessLangWord;
}
- EnableItem( MN_IGNORE, false );
- EnableItem( MN_INSERT, false );
+ EnableItem( MN_IGNORE_WORD, false );
+ EnableItem( MN_ADD_TO_DIC, false );
//ADD NEW LANGUAGE MENU ITEM
///////////////////////////////////////////////////////////////////////////
String aScriptTypesInUse( String::CreateFromInt32( pWrtSh->GetScriptType() ) );
- SvtLanguageTable aLangTable;
+ SvtLanguageTable aLanguageTable;
// get keyboard language
String aKeyboardLang;
@@ -682,39 +668,39 @@ aInfo16( SW_RES(IMG_INFO_16) )
SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin();
nLang = rEditWin.GetInputLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
- aKeyboardLang = aLangTable.GetString( nLang );
+ aKeyboardLang = aLanguageTable.GetString( nLang );
// get the language that is in use
const String aMultipleLanguages = String::CreateFromAscii("*");
String aCurrentLang = aMultipleLanguages;
nLang = SwLangHelper::GetCurrentLanguage( *pWrtSh );
if (nLang != LANGUAGE_DONTKNOW)
- aCurrentLang = aLangTable.GetString( nLang );
+ aCurrentLang = aLanguageTable.GetString( nLang );
// build sequence for status value
- uno::Sequence< ::rtl::OUString > aSeq( 4 );
+ uno::Sequence< OUString > aSeq( 4 );
aSeq[0] = aCurrentLang;
aSeq[1] = aScriptTypesInUse;
aSeq[2] = aKeyboardLang;
- aSeq[3] = aLangTable.GetString(nGuessLangWord);
+ aSeq[3] = aLanguageTable.GetString(nGuessLangWord);
- PopupMenu *pMenu = GetPopupMenu(MN_LANGUAGE_SELECTION);
- nNumLanguageTextEntries = fillLangPopupMenu( pMenu, MN_LANGUAGE_SELECTION_START, aSeq, pWrtSh, 0 );
- EnableItem( MN_LANGUAGE_SELECTION, true );
+ PopupMenu *pMenu = GetPopupMenu(MN_SET_LANGUAGE_SELECTION);
+ fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_SELECTION_START, aSeq, pWrtSh, aLangTable_Text );
+ EnableItem( MN_SET_LANGUAGE_SELECTION, true );
- pMenu = GetPopupMenu(MN_LANGUAGE_PARAGRAPH);
- nNumLanguageParaEntries = fillLangPopupMenu( pMenu, MN_LANGUAGE_PARAGRAPH_START, aSeq, pWrtSh, 1 );
- EnableItem( MN_LANGUAGE_PARAGRAPH, true );
+ pMenu = GetPopupMenu(MN_SET_LANGUAGE_PARAGRAPH);
+ fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_PARAGRAPH_START, aSeq, pWrtSh, aLangTable_Paragraph );
+ EnableItem( MN_SET_LANGUAGE_PARAGRAPH, true );
/*
- pMenu = GetPopupMenu(MN_LANGUAGE_ALL_TEXT);
- nNumLanguageDocEntries = fillLangPopupMenu( pMenu, MN_LANGUAGE_ALL_TEXT_START, aSeq, pWrtSh, 2 );
- EnableItem( MN_LANGUAGE_ALL_TEXT, true );
+ pMenu = GetPopupMenu(MN_SET_LANGUAGE_ALL_TEXT);
+ fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_ALL_TEXT_START, aSeq, pWrtSh, aLangTable_Document );
+ EnableItem( MN_SET_LANGUAGE_ALL_TEXT, true );
*/
uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface();
Image rImg = ::GetImage( xFrame,
- ::rtl::OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False,
+ OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False,
Application::GetSettings().GetStyleSettings().GetHighContrastMode() );
- SetItemImage( MN_SPELLING, rImg );
+ SetItemImage( MN_SPELLING_DLG, rImg );
//////////////////////////////////////////////////////////////////////////////////
@@ -737,25 +723,23 @@ sal_uInt16 SwSpellPopup::Execute( const Rectangle& rWordPos, Window* pWin )
-----------------------------------------------------------------------*/
void SwSpellPopup::Execute( USHORT nId )
{
- if (bGrammarResults && nId == 1)
- return; // nothing to do since it is the error message (short comment)
+ if (nId == USHRT_MAX)
+ return;
- sal_Bool bAutoCorr = sal_False;
- if( nId > MN_AUTOCORR_START && nId < MN_LANGUAGE_SELECTION_START && nId != USHRT_MAX )
- {
- nId -= MN_AUTOCORR_START;
- bAutoCorr = sal_True;
- }
+ if (/*bGrammarResults && */nId == MN_SHORT_COMMENT)
+ return; // nothing to do since it is the error message (short comment)
- if( nId && nId != USHRT_MAX)
+ if ((MN_SUGGESTION_START <= nId && nId <= MN_SUGGESTION_END) ||
+ (MN_AUTOCORR_START <= nId && nId <= MN_AUTOCORR_END))
{
- int nAltIdx = bGrammarResults ? nId - 2 : nId - 1;
- if ( nAltIdx >= 0 && nAltIdx < aSuggestions.getLength() && (bGrammarResults || xSpellAlt.is()) )
+ sal_Int32 nAltIdx = (MN_SUGGESTION_START <= nId && nId <= MN_SUGGESTION_END) ?
+ nId - MN_SUGGESTION_START : nId - MN_AUTOCORR_START;
+ DBG_ASSERT( 0 <= nAltIdx && nAltIdx < aSuggestions.getLength(), "index out of range" );
+ if (0 <= nAltIdx && nAltIdx < aSuggestions.getLength() && (bGrammarResults || xSpellAlt.is()))
{
sal_Bool bOldIns = pSh->IsInsMode();
pSh->SetInsMode( sal_True );
- DBG_ASSERT( 0 <= nAltIdx && nAltIdx <= aSuggestions.getLength(), "index out of range");
String aTmp( aSuggestions[ nAltIdx ] );
String aOrig( bGrammarResults ? OUString() : xSpellAlt->getWord() );
@@ -774,40 +758,30 @@ void SwSpellPopup::Execute( USHORT nId )
aRewriter.AddRule(UNDO_ARG1, pSh->GetCrsrDescr());
aRewriter.AddRule(UNDO_ARG2, String(SW_RES(STR_YIELDS)));
- {
- String aTmpStr;
-
- aTmpStr += String(SW_RES(STR_START_QUOTE));
- aTmpStr += aTmp;
- aTmpStr += String(SW_RES(STR_END_QUOTE));
- aRewriter.AddRule(UNDO_ARG3, aTmpStr);
- }
+ String aTmpStr( SW_RES(STR_START_QUOTE) );
+ aTmpStr += aTmp;
+ aTmpStr += String(SW_RES(STR_END_QUOTE));
+ aRewriter.AddRule(UNDO_ARG3, aTmpStr);
pSh->StartUndo(UNDO_UI_REPLACE, &aRewriter);
pSh->StartAction();
pSh->DelLeft();
pSh->Insert( aTmp );
+
/* #102505# EndAction/EndUndo moved down since insertion
of temporary auto correction is now undoable two and
must reside in the same undo group.*/
-
// nur aufnehmen, wenn es NICHT schon in der Autokorrektur vorhanden ist
SvxAutoCorrect* pACorr = SvxAutoCorrCfg::Get()->GetAutoCorrect();
String aOrigWord( bGrammarResults ? OUString() : xSpellAlt->getWord() ) ;
- String aNewWord;
- if( nId )
- aNewWord = aSuggestions[ nAltIdx ];
- else
- aNewWord = aOrigWord;
+ String aNewWord( aSuggestions[ nAltIdx ] );
SvxPrepareAutoCorrect( aOrigWord, aNewWord );
- if( bAutoCorr )
- {
+ if (MN_AUTOCORR_START <= nId && nId <= MN_AUTOCORR_END)
pACorr->PutText( aOrigWord, aNewWord, nCheckedLanguage );
- }
/* #102505# EndAction/EndUndo moved down since insertion
of temporary auto correction is now undoable two and
@@ -817,181 +791,141 @@ void SwSpellPopup::Execute( USHORT nId )
pSh->SetInsMode( bOldIns );
}
- else
+ }
+ else if (nId == MN_SPELLING_DLG)
+ {
+ if (bGrammarResults)
+ {
+ SvtLinguConfig().SetProperty( A2OU( UPN_IS_GRAMMAR_INTERACTIVE ), uno::makeAny( sal_True ));
+ }
+ pSh->Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
{
- if (nId < MN_LANGUAGE_SELECTION_START)
+ uno::Reference<linguistic2::XDictionaryList> xDictionaryList( SvxGetDictionaryList() );
+ SvxDicListChgClamp aClamp( xDictionaryList );
+ pSh->GetView().GetViewFrame()->GetDispatcher()->
+ Execute( FN_SPELL_GRAMMAR_DIALOG, SFX_CALLMODE_ASYNCHRON );
+ }
+ }
+ else if (nId == MN_IGNORE_SELECTION)
+ {
+ SwPaM *pPaM = pSh->GetCrsr();
+ if (pPaM)
+ pSh->IgnoreGrammarErrorAt( *pPaM );
+ }
+ else if (nId == MN_IGNORE_WORD)
+ {
+ uno::Reference< linguistic2::XDictionary > xDictionary( SvxGetIgnoreAllList(), uno::UNO_QUERY );
+ linguistic::AddEntryToDic( xDictionary,
+ xSpellAlt->getWord(), sal_False, aEmptyStr, LANGUAGE_NONE );
+ }
+ else if (MN_DICTIONARIES_START <= nId && nId <= MN_DICTIONARIES_END)
+ {
+ OUString aWord( xSpellAlt->getWord() );
+ USHORT nDicIdx = nId - MN_DICTIONARIES_START;
+ DBG_ASSERT( nDicIdx < aDics.getLength(), "dictionary index out of range" );
+
+ if (nDicIdx < aDics.getLength())
{
- switch( nId )
+ uno::Reference< linguistic2::XDictionary > xDic = aDics.getConstArray()[nDicIdx];
+ INT16 nAddRes = linguistic::AddEntryToDic( xDic, aWord, FALSE, aEmptyStr, LANGUAGE_NONE );
+ // save modified user-dictionary if it is persistent
+ uno::Reference< frame::XStorable > xSavDic( xDic, uno::UNO_QUERY );
+ if (xSavDic.is())
+ xSavDic->store();
+
+ if (DIC_ERR_NONE != nAddRes
+ && !xDic->getEntry( aWord ).is())
{
- case MN_SPELLING:
- {
- if (bGrammarResults)
- {
- SvtLinguConfig().SetProperty( A2OU( UPN_IS_GRAMMAR_INTERACTIVE ), uno::makeAny( sal_True ));
- }
- pSh->Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
- {
- uno::Reference<linguistic2::XDictionaryList> xDictionaryList( SvxGetDictionaryList() );
- SvxDicListChgClamp aClamp( xDictionaryList );
- pSh->GetView().GetViewFrame()->GetDispatcher()->
- Execute( FN_SPELL_GRAMMAR_DIALOG, SFX_CALLMODE_ASYNCHRON );
- }
- }
- break;
- case MN_IGNORE_SELECTION :
- {
- SwPaM *pPaM = pSh->GetCrsr();
- if (pPaM)
- pSh->IgnoreGrammarErrorAt( *pPaM );
- }
- break;
- case MN_IGNORE :
- {
- uno::Reference< linguistic2::XDictionary > xDictionary( SvxGetIgnoreAllList(), uno::UNO_QUERY );
- linguistic::AddEntryToDic(
- xDictionary,
- xSpellAlt->getWord(), sal_False,
- aEmptyStr, LANGUAGE_NONE );
- }
- break;
- case MN_INSERT:
- DBG_ERROR("geht noch nicht!");
- break;
- case MN_LANGUAGE_WORD:
- case MN_LANGUAGE_PARA:
- {
- pSh->StartAction();
-
- if( MN_LANGUAGE_PARA == nId )
- {
- if( !pSh->IsSttPara() )
- pSh->MovePara( fnParaCurr, fnParaStart );
- pSh->SwapPam();
- if( !pSh->IsEndPara() )
- pSh->MovePara( fnParaCurr, fnParaEnd );
- }
-
- LanguageType nLangToUse = (MN_LANGUAGE_PARA == nId) ? nGuessLangPara : nGuessLangWord;
- sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nLangToUse );
- USHORT nResId = 0;
- switch (nScriptType)
- {
- case SCRIPTTYPE_COMPLEX : nResId = RES_CHRATR_CTL_LANGUAGE; break;
- case SCRIPTTYPE_ASIAN : nResId = RES_CHRATR_CJK_LANGUAGE; break;
- default /*SCRIPTTYPE_LATIN*/: nResId = RES_CHRATR_LANGUAGE; break;
- }
- SfxItemSet aSet(pSh->GetAttrPool(), nResId, nResId );
- aSet.Put( SvxLanguageItem( nLangToUse, nResId ) );
- pSh->SetAttr( aSet );
-
- pSh->EndAction();
- }
- break;
- default:
- if(nId >= MN_INSERT_START )
- {
- OUString aWord( xSpellAlt->getWord() );
- INT32 nDicIdx = nId - MN_INSERT_START - 1;
- DBG_ASSERT( nDicIdx < aDics.getLength(),
- "dictionary index out of range" );
- uno::Reference< linguistic2::XDictionary > xDic =
- aDics.getConstArray()[nDicIdx];
- INT16 nAddRes = linguistic::AddEntryToDic( xDic,
- aWord, FALSE, aEmptyStr, LANGUAGE_NONE );
- // save modified user-dictionary if it is persistent
- uno::Reference< frame::XStorable > xSavDic( xDic, uno::UNO_QUERY );
- if (xSavDic.is())
- xSavDic->store();
-
- if (DIC_ERR_NONE != nAddRes
- && !xDic->getEntry( aWord ).is())
- {
- SvxDicError(
- &pSh->GetView().GetViewFrame()->GetWindow(),
- nAddRes );
- }
- }
+ SvxDicError(
+ &pSh->GetView().GetViewFrame()->GetWindow(),
+ nAddRes );
}
}
- else
+ }
+ else
+ {
+ // Set language for selection or for paragraph...
+
+ SfxItemSet aCoreSet( pSh->GetView().GetPool(),
+ RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
+ RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CJK_LANGUAGE,
+ RES_CHRATR_CTL_LANGUAGE, RES_CHRATR_CTL_LANGUAGE,
+ 0 );
+ String aNewLangTxt;
+
+ if (MN_SET_LANGUAGE_SELECTION_START <= nId && nId <= MN_SET_LANGUAGE_SELECTION_END)
+ {
+ //Set language for current selection
+ aNewLangTxt = aLangTable_Text[nId];
+ SwLangHelper::SetLanguage( *pSh, aNewLangTxt, true, aCoreSet );
+ }
+ else if (nId == MN_SET_SELECTION_NONE)
+ {
+ //Set Language_None for current selection
+ SwLangHelper::SetLanguage_None( *pSh, true, aCoreSet );
+ }
+ else if (nId == MN_SET_SELECTION_RESET)
+ {
+ //reset languages for current selection
+ SwLangHelper::ResetLanguages( *pSh, true );
+ }
+ else if (nId == MN_SET_SELECTION_MORE)
+ {
+ //Open Format/Character Dialog
+ lcl_CharDialog( *pSh, true, nId, 0, 0 );
+ }
+ else if (MN_SET_LANGUAGE_PARAGRAPH_START <= nId && nId <= MN_SET_LANGUAGE_PARAGRAPH_END)
+ {
+ //Set language for current paragraph
+ aNewLangTxt = aLangTable_Paragraph[nId];
+ pSh->Push(); // save cursor
+ SwLangHelper::SelectCurrentPara( *pSh );
+ SwLangHelper::SetLanguage( *pSh, aNewLangTxt, true, aCoreSet );
+ pSh->Pop( FALSE ); // restore cursor
+ }
+ else if (nId == MN_SET_PARA_NONE)
+ {
+ //Set Language_None for current paragraph
+ pSh->Push(); // save cursor
+ SwLangHelper::SelectCurrentPara( *pSh );
+ SwLangHelper::SetLanguage_None( *pSh, true, aCoreSet );
+ pSh->Pop( FALSE ); // restore cursor
+ }
+ else if (nId == MN_SET_PARA_RESET)
+ {
+ //reset languages for current paragraph
+ pSh->Push(); // save cursor
+ SwLangHelper::SelectCurrentPara( *pSh );
+ SwLangHelper::ResetLanguages( *pSh, true );
+ pSh->Pop( FALSE ); // restore cursor
+ }
+ else if (nId == MN_SET_PARA_MORE)
+ {
+ pSh->Push(); // save cursor
+ SwLangHelper::SelectCurrentPara( *pSh );
+ //Open Format/Character Dialog
+ lcl_CharDialog( *pSh, true, nId, 0, 0 );
+ pSh->Pop( FALSE ); // restore cursor
+ }
+#if 0
+ else if (nId == MN_SET_LANGUAGE_ALL_TEXT_START + nNumLanguageDocEntries - 1)
+ {
+ //Set Language_None as the default language
+ SwLangHelper::SetLanguage_None( *pSh, false, aCoreSet );
+ }
+ else if (nId == MN_SET_LANGUAGE_ALL_TEXT_START + nNumLanguageDocEntries)
+ {
+ // open the dialog "Tools/Options/Language Settings - Language"
+ SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
+ if (pFact)
{
- SfxItemSet aCoreSet( pSh->GetView().GetPool(),
- RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
- RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CJK_LANGUAGE,
- RES_CHRATR_CTL_LANGUAGE, RES_CHRATR_CTL_LANGUAGE,
- 0 );
- String aNewLangTxt;
-
-// pSh->StartAction();
-
- if (nId >= MN_LANGUAGE_SELECTION_START && nId < MN_LANGUAGE_SELECTION_START + nNumLanguageTextEntries - 1)
- {
- //Set language for current selection
- aNewLangTxt=aLangTable_Text[nId];
- SwLangHelper::SetLanguage( *pSh, aNewLangTxt, true, aCoreSet );
- }
- else if (nId == MN_LANGUAGE_SELECTION_START + nNumLanguageTextEntries - 1)
- {
- //Set Language_None for current selection
- SwLangHelper::SetLanguage_None( *pSh, true, aCoreSet );
- }
- else if (nId == MN_LANGUAGE_SELECTION_START + nNumLanguageTextEntries)
- {
- //Open Format/Character Dialog
- lcl_CharDialog( *pSh, true, nId, 0, 0 );
- }
- else if (nId >= MN_LANGUAGE_PARAGRAPH_START && nId < MN_LANGUAGE_PARAGRAPH_START + nNumLanguageParaEntries - 1)
- {
- //Set language for current paragraph
- aNewLangTxt=aLangTable_Paragraph[nId];
- pSh->Push(); // save cursor
- SwLangHelper::SelectCurrentPara( *pSh );
- SwLangHelper::SetLanguage( *pSh, aNewLangTxt, true, aCoreSet );
- pSh->Pop( FALSE ); // restore cursor
- }
- else if (nId == MN_LANGUAGE_PARAGRAPH_START + nNumLanguageParaEntries - 1)
- {
- //Set Language_None for current paragraph
- pSh->Push(); // save cursor
- SwLangHelper::SelectCurrentPara( *pSh );
- SwLangHelper::SetLanguage_None( *pSh, true, aCoreSet );
- pSh->Pop( FALSE ); // restore cursor
- }
- else if (nId == MN_LANGUAGE_PARAGRAPH_START + nNumLanguageParaEntries)
- {
- pSh->Push(); // save cursor
- SwLangHelper::SelectCurrentPara( *pSh );
- //Open Format/Character Dialog
- lcl_CharDialog( *pSh, true, nId, 0, 0 );
- pSh->Pop( FALSE ); // restore cursor
- }
- else if (nId >= MN_LANGUAGE_ALL_TEXT_START && nId < MN_LANGUAGE_ALL_TEXT_START + nNumLanguageDocEntries - 1)
- {
- //Set selected language as the default language
- aNewLangTxt=aLangTable_Document[nId];
- SwLangHelper::SetLanguage( *pSh, aNewLangTxt, false, aCoreSet );
- }
- else if (nId == MN_LANGUAGE_ALL_TEXT_START + nNumLanguageDocEntries - 1)
- {
- //Set Language_None as the default language
- SwLangHelper::SetLanguage_None( *pSh, false, aCoreSet );
- }
- else if (nId == MN_LANGUAGE_ALL_TEXT_START + nNumLanguageDocEntries)
- {
- // open the dialog "Tools/Options/Language Settings - Language"
- SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- if (pFact)
- {
- VclAbstractDialog* pDlg = pFact->CreateVclDialog( pSh->GetView().GetWindow(), SID_LANGUAGE_OPTIONS );
- pDlg->Execute();
- delete pDlg;
- }
- }
-
-// pSh->EndAction();
+ VclAbstractDialog* pDlg = pFact->CreateVclDialog( pSh->GetView().GetWindow(), SID_LANGUAGE_OPTIONS );
+ pDlg->Execute();
+ delete pDlg;
}
}
- }
+#endif
+ }
pSh->EnterStdMode();
}
diff --git a/sw/source/ui/lingu/olmenu.hrc b/sw/source/ui/lingu/olmenu.hrc
index 900c470545..6afce9516b 100644
--- a/sw/source/ui/lingu/olmenu.hrc
+++ b/sw/source/ui/lingu/olmenu.hrc
@@ -30,35 +30,65 @@
#include "rcid.hrc"
-#define MN_SPELL_POPUP (RC_LINGU_BEGIN + 1)
-#define STR_SPELL_OK (RC_LINGU_BEGIN + 2)
-#define STR_HYP_OK (RC_LINGU_BEGIN + 3)
-#define STR_WORD (RC_LINGU_BEGIN + 4)
-#define STR_PARAGRAPH (RC_LINGU_BEGIN + 5)
-#define STR_LANGSTATUS_NONE (RC_LINGU_BEGIN + 6)
-#define STR_LANGSTATUS_MORE (RC_LINGU_BEGIN + 7)
-#define STR_IGNORE_SELECTION (RC_LINGU_BEGIN + 8)
+#define MN_SPELL_POPUP (RC_LINGU_BEGIN + 1)
+#define STR_SPELL_OK (RC_LINGU_BEGIN + 2)
+#define STR_HYP_OK (RC_LINGU_BEGIN + 3)
+#define STR_WORD (RC_LINGU_BEGIN + 4)
+#define STR_PARAGRAPH (RC_LINGU_BEGIN + 5)
+#define STR_LANGSTATUS_NONE (RC_LINGU_BEGIN + 6)
+#define STR_LANGSTATUS_MORE (RC_LINGU_BEGIN + 7)
+#define STR_IGNORE_SELECTION (RC_LINGU_BEGIN + 8)
+#define STR_RESET_TO_DEFAULT_LANGUAGE (RC_LINGU_BEGIN + 9)
-#define IMG_INFO_16 (RC_LINGU_BEGIN + 8)
+#define IMG_INFO_16 (RC_LINGU_BEGIN + 100)
//! Don't change these values. You may break context menu modifying extensions!
-#define MN_SPELLING 100
-#define MN_IGNORE_SELECTION 101
-#define MN_IGNORE 102
-#define MN_INSERT 103
-#define MN_AUTOCORR 104
-#define MN_LANGUAGE_WORD 105
-#define MN_LANGUAGE_PARA 106
-#define MN_LANGUAGE_SELECTION 107
-#define MN_LANGUAGE_PARAGRAPH 108
-#define MN_LANGUAGE_ALL_TEXT 109
-
-#define MN_INSERT_START 500
-#define MN_AUTOCORR_START 900
-
-#define MN_LANGUAGE_SELECTION_START 1170
-#define MN_LANGUAGE_PARAGRAPH_START 1270
-#define MN_LANGUAGE_ALL_TEXT_START 1370
+#define MN_SPELLING_DLG 200
+#define MN_IGNORE_SELECTION 201
+#define MN_IGNORE_WORD 202
+#define MN_ADD_TO_DIC 203
+#define MN_AUTOCORR 204
+#define MN_SET_LANGUAGE_SELECTION 205
+#define MN_SET_LANGUAGE_PARAGRAPH 206
+#define MN_SET_LANGUAGE_ALL_TEXT 207
+#define MN_SHORT_COMMENT 208
+
+// id range for dictionaries sub menu
+#define MN_DICTIONARIES_START 300
+#define MN_DICTIONARIES_END (MN_DICTIONARIES_START + 99)
+
+// id range for suggestions from spell and grammar checker
+#define MN_SUGGESTION_START 500
+#define MN_SUGGESTION_END (MN_SUGGESTION_START + MN_MAX_NUM_LANG)
+
+// id range for auto correction sub menu entries
+#define MN_AUTOCORR_START 700
+#define MN_AUTOCORR_END (MN_AUTOCORR_START + MN_MAX_NUM_LANG)
+
+// max number of language entries sub menus
+#define MN_MAX_NUM_LANG 99
+
+#define MN_NONE_OFFSET (MN_MAX_NUM_LANG + 1)
+#define MN_RESET_OFFSET (MN_MAX_NUM_LANG + 2)
+#define MN_MORE_OFFSET (MN_MAX_NUM_LANG + 3)
+
+// id range for 'set language for selection' sub menu entries
+#define MN_SET_LANGUAGE_SELECTION_START 900
+#define MN_SET_LANGUAGE_SELECTION_END (MN_SET_LANGUAGE_SELECTION_START + MN_MAX_NUM_LANG)
+#define MN_SET_SELECTION_NONE (MN_SET_LANGUAGE_SELECTION_START + MN_NONE_OFFSET)
+#define MN_SET_SELECTION_RESET (MN_SET_LANGUAGE_SELECTION_START + MN_RESET_OFFSET)
+#define MN_SET_SELECTION_MORE (MN_SET_LANGUAGE_SELECTION_START + MN_MORE_OFFSET)
+
+// id range for 'set language for paragraph' sub menu entries
+#define MN_SET_LANGUAGE_PARAGRAPH_START 1100
+#define MN_SET_LANGUAGE_PARAGRAPH_END (MN_SET_LANGUAGE_PARAGRAPH_START + MN_MAX_NUM_LANG)
+#define MN_SET_PARA_NONE (MN_SET_LANGUAGE_PARAGRAPH_START + MN_NONE_OFFSET)
+#define MN_SET_PARA_RESET (MN_SET_LANGUAGE_PARAGRAPH_START + MN_RESET_OFFSET)
+#define MN_SET_PARA_MORE (MN_SET_LANGUAGE_PARAGRAPH_START + MN_MORE_OFFSET)
+
+// id range for 'set language for all text' sub menu entries
+#define MN_SET_LANGUAGE_ALL_TEXT_START 1300
+#define MN_SET_LANGUAGE_ALL_TEXT_END (MN_SET_LANGUAGE_ALL_TEXT_START + MN_MAX_NUM_LANG)
#endif
diff --git a/sw/source/ui/lingu/olmenu.src b/sw/source/ui/lingu/olmenu.src
index 3910c13201..9173509a69 100644
--- a/sw/source/ui/lingu/olmenu.src
+++ b/sw/source/ui/lingu/olmenu.src
@@ -38,13 +38,13 @@ Menu MN_SPELL_POPUP
{
MenuItem
{
- Identifier = MN_IGNORE ;
+ Identifier = MN_IGNORE_WORD ;
HelpID = HID_LINGU_IGNORE_WORD ;
Text [ en-US ] = "Ignore All" ;
};
MenuItem
{
- Identifier = MN_INSERT ;
+ Identifier = MN_ADD_TO_DIC ;
HelpID = HID_LINGU_ADD_WORD ;
SubMenu = Menu
{
@@ -62,14 +62,14 @@ Menu MN_SPELL_POPUP
};
MenuItem
{
- Identifier = MN_SPELLING ;
+ Identifier = MN_SPELLING_DLG ;
HelpID = HID_LINGU_SPELLING_DLG ;
Text [ en-US ] = "~Spellcheck..." ;
};
SEPARATOR
MenuItem
{
- Identifier = MN_LANGUAGE_SELECTION ;
+ Identifier = MN_SET_LANGUAGE_SELECTION ;
SubMenu = Menu
{
};
@@ -77,7 +77,7 @@ Menu MN_SPELL_POPUP
};
MenuItem
{
- Identifier = MN_LANGUAGE_PARAGRAPH ;
+ Identifier = MN_SET_LANGUAGE_PARAGRAPH ;
SubMenu = Menu
{
};
@@ -86,7 +86,7 @@ Menu MN_SPELL_POPUP
/*
MenuItem
{
- Identifier = MN_LANGUAGE_ALL_TEXT ;
+ Identifier = MN_SET_LANGUAGE_ALL_TEXT ;
SubMenu = Menu
{
};
@@ -115,6 +115,11 @@ String STR_LANGSTATUS_NONE
{
Text [ en-US ] = "None (Do not check spelling)" ;
};
+String STR_RESET_TO_DEFAULT_LANGUAGE
+{
+ Text [ en-US ] = "Reset to Default Language" ;
+ Text [ x-comment ] = " ";
+};
String STR_LANGSTATUS_MORE
{
Text [ en-US ] = "More..." ;
diff --git a/sw/source/ui/makefile.mk b/sw/source/ui/makefile.mk
index fa1dea2bac..b331a2a007 100644
--- a/sw/source/ui/makefile.mk
+++ b/sw/source/ui/makefile.mk
@@ -58,8 +58,8 @@ SUBLIBS1= \
$(SLB)$/dbui.lib \
$(SLB)$/dialog.lib \
$(SLB)$/dochdl.lib \
- $(SLB)$/docvw.lib \
- $(SLB)$/envelp.lib \
+ $(SLB)$/docvw.lib \
+ $(SLB)$/envelp.lib \
$(SLB)$/fldui.lib \
$(SLB)$/frmdlg.lib \
$(SLB)$/globdoc.lib
diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx
index 6d2f209148..3486fd06a8 100755
--- a/sw/source/ui/shells/annotsh.cxx
+++ b/sw/source/ui/shells/annotsh.cxx
@@ -27,13 +27,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <hintids.hxx>
-#include <tools/shl.hxx>
#include <com/sun/star/i18n/TransliterationModules.hpp>
+#include <com/sun/star/i18n/TransliterationModulesExtra.hpp>
#include <com/sun/star/i18n/TextConversionOption.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
+
+#include <tools/shl.hxx>
+#include <i18npool/mslangid.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/bindings.hxx>
@@ -96,8 +100,8 @@
#include <breakit.hxx>
#include "annotsh.hxx"
#include "view.hxx"
-#include "PostItMgr.hxx"
-#include "postit.hxx"
+#include <PostItMgr.hxx>
+#include <SidebarWin.hxx>
#include "swtypes.hxx"
@@ -117,8 +121,8 @@
#include <docsh.hxx>
#include <svl/undo.hxx>
-#include "swabstdlg.hxx" //CHINA001
-#include "chrdlg.hrc" //CHINA001
+#include "swabstdlg.hxx"
+#include "chrdlg.hrc"
#include "misc.hrc"
#include <app.hrc>
@@ -160,22 +164,23 @@ SwAnnotationShell::~SwAnnotationShell()
SfxUndoManager* SwAnnotationShell::GetUndoManager()
{
SwPostItMgr* pPostItMgr = rView.GetPostItMgr();
- if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() )
+ if ( !pPostItMgr ||
+ !pPostItMgr->HasActiveSidebarWin() )
{
DBG_ASSERT(pPostItMgr,"PostItMgr::Layout(): We are looping forever");
return 0;
}
- return &pPostItMgr->GetActivePostIt()->Engine()->GetUndoManager();
+ return &pPostItMgr->GetActiveSidebarWin()->GetOutlinerView()->GetOutliner()->GetUndoManager();
}
void SwAnnotationShell::Exec( SfxRequest &rReq )
{
//TODO: clean this up!!!!
SwPostItMgr* pPostItMgr = rView.GetPostItMgr();
- if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() )
+ if ( !pPostItMgr || !pPostItMgr->HasActiveSidebarWin() )
return;
- OutlinerView* pOLV = pPostItMgr->GetActivePostIt()->View();
+ OutlinerView* pOLV = pPostItMgr->GetActiveSidebarWin()->GetOutlinerView();
SfxItemSet aEditAttr(pOLV->GetAttribs());
SfxItemSet aNewAttr(*aEditAttr.GetPool(), aEditAttr.GetRanges());
@@ -269,7 +274,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
}
case FN_FORMAT_RESET:
{
- pPostItMgr->GetActivePostIt()->ResetAttributes();
+ pPostItMgr->GetActiveSidebarWin()->ResetAttributes();
rReq.Done();
break;
}
@@ -320,7 +325,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
aSel.nEndPos++;
pOLV->SetSelection(aSel);
}
- if (pPostItMgr->GetActivePostIt()->GetStatus()!=SwPostItHelper::DELETED)
+ if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED)
pOLV->InsertField(SvxFieldItem(aFld, EE_FEATURE_FIELD));
}
break;
@@ -350,7 +355,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
}
case SID_CHARMAP:
{
- if (pPostItMgr->GetActivePostIt()->GetStatus()!=SwPostItHelper::DELETED)
+ if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED)
InsertSymbol(rReq);
break;
}
@@ -359,7 +364,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
const SfxPoolItem* pItem = 0;
if(pNewAttrs)
pNewAttrs->GetItemState(nSlot, FALSE, &pItem );
- if (pPostItMgr->GetActivePostIt()->GetStatus()!=SwPostItHelper::DELETED)
+ if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED)
pOLV->InsertText(((const SfxStringItem *)pItem)->GetValue());
break;
}
@@ -577,10 +582,10 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
//SID_ATTR_PARA_ADJUST_BLOCK
SwPostItMgr* pPostItMgr = rView.GetPostItMgr();
- if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() )
+ if ( !pPostItMgr || !pPostItMgr->HasActiveSidebarWin() )
return;
- OutlinerView* pOLV = pPostItMgr->GetActivePostIt()->View();
+ OutlinerView* pOLV = pPostItMgr->GetActiveSidebarWin()->GetOutlinerView();
SfxItemSet aEditAttr(pOLV->GetAttribs());
SfxWhichIter aIter(rSet);
@@ -764,7 +769,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
if(nEEWhich)
rSet.Put(aEditAttr.Get(nEEWhich, sal_True), nWhich);
- if (pPostItMgr->GetActivePostIt()->GetStatus()==SwPostItHelper::DELETED)
+ if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()==SwPostItHelper::DELETED)
rSet.DisableItem( nWhich );
nWhich = aIter.NextWhich();
@@ -784,19 +789,19 @@ void SwAnnotationShell::StateSearch(SfxItemSet &rSet)
void SwAnnotationShell::ExecClpbrd(SfxRequest &rReq)
{
SwPostItMgr* pPostItMgr = rView.GetPostItMgr();
- if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() )
+ if ( !pPostItMgr || !pPostItMgr->HasActiveSidebarWin() )
return;
- OutlinerView* pOLV = pPostItMgr->GetActivePostIt()->View();
+ OutlinerView* pOLV = pPostItMgr->GetActiveSidebarWin()->GetOutlinerView();
SfxItemSet aEditAttr(pOLV->GetAttribs());
SfxItemSet aNewAttr(*aEditAttr.GetPool(), aEditAttr.GetRanges());
- long aOldHeight = pPostItMgr->GetActivePostIt()->GetPostItTextHeight();
+ long aOldHeight = pPostItMgr->GetActiveSidebarWin()->GetPostItTextHeight();
sal_uInt16 nSlot = rReq.GetSlot();
switch (nSlot)
{
case SID_CUT:
- if ( (pPostItMgr->GetActivePostIt()->GetStatus()!=SwPostItHelper::DELETED) && pOLV->HasSelection() )
+ if ( (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED) && pOLV->HasSelection() )
pOLV->Cut();
break;
case SID_COPY:
@@ -804,12 +809,12 @@ void SwAnnotationShell::ExecClpbrd(SfxRequest &rReq)
pOLV->Copy();
break;
case SID_PASTE:
- if (pPostItMgr->GetActivePostIt()->GetStatus()!=SwPostItHelper::DELETED)
+ if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED)
pOLV->Paste();
break;
case SID_PASTE_SPECIAL:
{
- if (pPostItMgr->GetActivePostIt()->GetStatus()!=SwPostItHelper::DELETED)
+ if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED)
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAbstractPasteDialog* pDlg = pFact->CreatePasteDialog( &rView.GetEditWin() );
@@ -852,19 +857,19 @@ void SwAnnotationShell::ExecClpbrd(SfxRequest &rReq)
break;
}
}
- pPostItMgr->GetActivePostIt()->ResizeIfNeccessary(aOldHeight,pPostItMgr->GetActivePostIt()->GetPostItTextHeight());
+ pPostItMgr->GetActiveSidebarWin()->ResizeIfNeccessary(aOldHeight,pPostItMgr->GetActiveSidebarWin()->GetPostItTextHeight());
}
void SwAnnotationShell::StateClpbrd(SfxItemSet &rSet)
{
SwPostItMgr* pPostItMgr = rView.GetPostItMgr();
- if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() )
+ if ( !pPostItMgr || !pPostItMgr->HasActiveSidebarWin() )
return;
- OutlinerView* pOLV = pPostItMgr->GetActivePostIt()->View();
+ OutlinerView* pOLV = pPostItMgr->GetActiveSidebarWin()->GetOutlinerView();
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( &rView.GetEditWin() ) );
bool bPastePossible = ( aDataHelper.HasFormat( SOT_FORMAT_STRING ) || aDataHelper.HasFormat( SOT_FORMAT_RTF ) );
- bPastePossible = bPastePossible && (pPostItMgr->GetActivePostIt()->GetStatus()!=SwPostItHelper::DELETED);
+ bPastePossible = bPastePossible && (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED);
SfxWhichIter aIter(rSet);
sal_uInt16 nWhich = aIter.FirstWhich();
@@ -875,7 +880,7 @@ void SwAnnotationShell::StateClpbrd(SfxItemSet &rSet)
{
case SID_CUT:
{
- if ( (pPostItMgr->GetActivePostIt()->GetStatus()==SwPostItHelper::DELETED) || !pOLV->HasSelection() )
+ if ( (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()==SwPostItHelper::DELETED) || !pOLV->HasSelection() )
rSet.DisableItem( nWhich );
}
case SID_COPY:
@@ -939,10 +944,10 @@ void SwAnnotationShell::StateStatusLine(SfxItemSet &rSet)
void SwAnnotationShell::StateInsert(SfxItemSet &rSet)
{
SwPostItMgr* pPostItMgr = rView.GetPostItMgr();
- if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() )
+ if ( !pPostItMgr || !pPostItMgr->HasActiveSidebarWin() )
return;
- OutlinerView* pOLV = pPostItMgr->GetActivePostIt()->View();
+ OutlinerView* pOLV = pPostItMgr->GetActiveSidebarWin()->GetOutlinerView();
SfxWhichIter aIter(rSet);
sal_uInt16 nWhich = aIter.FirstWhich();
@@ -985,7 +990,7 @@ void SwAnnotationShell::StateInsert(SfxItemSet &rSet)
break;
}
- if (pPostItMgr->GetActivePostIt()->GetStatus()==SwPostItHelper::DELETED)
+ if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()==SwPostItHelper::DELETED)
rSet.DisableItem( nWhich );
nWhich = aIter.NextWhich();
@@ -1006,8 +1011,8 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq)
case FN_POSTIT:
case FN_DELETE_COMMENT:
case FN_DELETE_NOTE:
- if ( pPostItMgr->GetActivePostIt() )
- pPostItMgr->GetActivePostIt()->ExecuteCommand(nSlot);
+ if ( pPostItMgr->HasActiveSidebarWin() )
+ pPostItMgr->GetActiveSidebarWin()->ExecuteCommand(nSlot);
break;
case FN_DELETE_ALL_NOTES:
pPostItMgr->Delete();
@@ -1021,7 +1026,7 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq)
}
case FN_HIDE_NOTE:
/*
- if ( Mgr()->GetActivePostIt() == this )
+ if ( Mgr()->GetActiveSidebarWin() == this )
{
Mgr()->SetActivePostIt(0);
// put the cursor back into the document
@@ -1060,20 +1065,29 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet)
case FN_HIDE_NOTE_AUTHOR:
case FN_HIDE_ALL_NOTES:
{
- if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() || !pPostItMgr->GetActivePostIt()->ISA(SwPostIt))
+ if ( !pPostItMgr ||
+ !pPostItMgr->HasActiveAnnotationWin() )
+ {
rSet.DisableItem(nWhich);
+ }
break;
}
case FN_DELETE_COMMENT:
{
- if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() ) //|| !pPostItMgr->GetActivePostIt()->ISA(SwRedComment))
+ if ( !pPostItMgr ||
+ !pPostItMgr->HasActiveSidebarWin() /*HasActiveRedCommentWin()*/ )
+ {
rSet.DisableItem(nWhich);
+ }
break;
}
case FN_REPLY:
{
- if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() || !pPostItMgr->GetActivePostIt()->ISA(SwPostIt))
+ if ( !pPostItMgr ||
+ !pPostItMgr->HasActiveAnnotationWin() )
+ {
rSet.DisableItem(nWhich);
+ }
else
{
SvtUserOptions aUserOpt;
@@ -1081,7 +1095,7 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet)
if( !(sAuthor = aUserOpt.GetFullName()).Len())
if( !(sAuthor = aUserOpt.GetID()).Len() )
sAuthor = String( SW_RES( STR_REDLINE_UNKNOWN_AUTHOR ));
- if (sAuthor == pPostItMgr->GetActivePostIt()->GetAuthor())
+ if (sAuthor == pPostItMgr->GetActiveSidebarWin()->GetAuthor())
rSet.DisableItem(nWhich);
}
break;
@@ -1091,9 +1105,9 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet)
break;
}
- if (pPostItMgr->GetActivePostIt())
+ if (pPostItMgr->HasActiveSidebarWin())
{
- if ( (pPostItMgr->GetActivePostIt()->IsProtected()) &&
+ if ( (pPostItMgr->GetActiveSidebarWin()->IsProtected()) &&
( (nSlotId==FN_DELETE_NOTE) || (nSlotId==FN_REPLY) ) )
rSet.DisableItem( nWhich );
}
@@ -1104,10 +1118,10 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet)
void SwAnnotationShell::ExecLingu(SfxRequest &rReq)
{
SwPostItMgr* pPostItMgr = rView.GetPostItMgr();
- if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() )
+ if ( !pPostItMgr || !pPostItMgr->HasActiveSidebarWin() )
return;
- OutlinerView* pOLV = pPostItMgr->GetActivePostIt()->View();
+ OutlinerView* pOLV = pPostItMgr->GetActiveSidebarWin()->GetOutlinerView();
SfxItemSet aEditAttr(pOLV->GetAttribs());
sal_uInt16 nSlot = rReq.GetSlot();
SwWrtShell &rSh = rView.GetWrtShell();
@@ -1128,7 +1142,17 @@ void SwAnnotationShell::ExecLingu(SfxRequest &rReq)
bRestoreSelection = SwLangHelper::SetLanguageStatus(pOLV,rReq,rView,rSh);
break;
}
- case FN_THESAURUS_DLG:
+ case SID_THES:
+ {
+ String aReplaceText;
+ SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES, sal_False );
+ if (pItem2)
+ aReplaceText = pItem2->GetValue();
+ if (aReplaceText.Len() > 0)
+ ReplaceTextWithSynonym( pOLV->GetEditView(), aReplaceText );
+ break;
+ }
+ case SID_THESAURUS:
{
pOLV->StartThesaurus();
break;
@@ -1219,10 +1243,10 @@ void SwAnnotationShell::ExecLingu(SfxRequest &rReq)
void SwAnnotationShell::GetLinguState(SfxItemSet &rSet)
{
SwPostItMgr* pPostItMgr = rView.GetPostItMgr();
- if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() )
+ if ( !pPostItMgr || !pPostItMgr->HasActiveSidebarWin() )
return;
- OutlinerView* pOLV = pPostItMgr->GetActivePostIt()->View();
+ OutlinerView* pOLV = pPostItMgr->GetActiveSidebarWin()->GetOutlinerView();
SfxItemSet aEditAttr(pOLV->GetAttribs());
SfxWhichIter aIter(rSet);
@@ -1236,8 +1260,25 @@ void SwAnnotationShell::GetLinguState(SfxItemSet &rSet)
SwLangHelper::GetLanguageStatus(pOLV,rSet);
break;
}
+
+ case SID_THES:
+ {
+ String aStatusVal;
+ LanguageType nLang = LANGUAGE_NONE;
+ bool bIsLookUpWord = GetStatusValueForThesaurusFromContext( aStatusVal, nLang, pOLV->GetEditView() );
+ rSet.Put( SfxStringItem( SID_THES, aStatusVal ) );
+
+ // disable "Thesaurus" context menu entry if there is nothing to look up
+ uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() );
+ lang::Locale aLocale( SvxCreateLocale( nLang ) );
+ if (!bIsLookUpWord ||
+ !xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( aLocale ))
+ rSet.DisableItem( SID_THES );
+ break;
+ }
+
// disable "Thesaurus" if the language is not supported
- case FN_THESAURUS_DLG:
+ case SID_THESAURUS:
{
const SfxPoolItem &rItem = rView.GetWrtShell().GetDoc()->GetDefault(
GetWhichOfScript( RES_CHRATR_LANGUAGE,
@@ -1247,7 +1288,7 @@ void SwAnnotationShell::GetLinguState(SfxItemSet &rSet)
uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() );
if (!xThes.is() || nLang == LANGUAGE_NONE ||
!xThes->hasLocale( SvxCreateLocale( nLang ) ))
- rSet.DisableItem( FN_THESAURUS_DLG );
+ rSet.DisableItem( SID_THESAURUS );
}
break;
case SID_HANGUL_HANJA_CONVERSION:
@@ -1264,7 +1305,7 @@ void SwAnnotationShell::GetLinguState(SfxItemSet &rSet)
break;
}
- if (pPostItMgr->GetActivePostIt()->GetStatus()==SwPostItHelper::DELETED)
+ if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()==SwPostItHelper::DELETED)
rSet.DisableItem( nWhich );
nWhich = aIter.NextWhich();
@@ -1274,10 +1315,10 @@ void SwAnnotationShell::GetLinguState(SfxItemSet &rSet)
void SwAnnotationShell::ExecTransliteration(SfxRequest &rReq)
{
SwPostItMgr* pPostItMgr = rView.GetPostItMgr();
- if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() )
+ if ( !pPostItMgr || !pPostItMgr->HasActiveSidebarWin() )
return;
- OutlinerView* pOLV = pPostItMgr->GetActivePostIt()->View();
+ OutlinerView* pOLV = pPostItMgr->GetActiveSidebarWin()->GetOutlinerView();
using namespace ::com::sun::star::i18n;
{
@@ -1285,6 +1326,15 @@ void SwAnnotationShell::ExecTransliteration(SfxRequest &rReq)
switch( rReq.GetSlot() )
{
+ case SID_TRANSLITERATE_SENTENCE_CASE:
+ nMode = TransliterationModulesExtra::SENTENCE_CASE;
+ break;
+ case SID_TRANSLITERATE_TITLE_CASE:
+ nMode = TransliterationModulesExtra::TITLE_CASE;
+ break;
+ case SID_TRANSLITERATE_TOGGLE_CASE:
+ nMode = TransliterationModulesExtra::TOGGLE_CASE;
+ break;
case SID_TRANSLITERATE_UPPER:
nMode = TransliterationModules_LOWERCASE_UPPERCASE;
break;
@@ -1321,7 +1371,9 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq)
SfxUndoManager* pUndoManager = GetUndoManager();
SwWrtShell &rSh = rView.GetWrtShell();
- long aOldHeight = rView.GetPostItMgr()->GetActivePostIt() ? rView.GetPostItMgr()->GetActivePostIt()->GetPostItTextHeight() : 0;
+ long aOldHeight = rView.GetPostItMgr()->HasActiveSidebarWin()
+ ? rView.GetPostItMgr()->GetActiveSidebarWin()->GetPostItTextHeight()
+ : 0;
USHORT nId = rReq.GetSlot();
sal_uInt16 nCnt = 1;
@@ -1381,14 +1433,14 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq)
rView.GetViewFrame()->GetBindings().InvalidateAll(sal_False);
- if (rView.GetPostItMgr()->GetActivePostIt())
- rView.GetPostItMgr()->GetActivePostIt()->ResizeIfNeccessary(aOldHeight,rView.GetPostItMgr()->GetActivePostIt()->GetPostItTextHeight());
+ if (rView.GetPostItMgr()->HasActiveSidebarWin())
+ rView.GetPostItMgr()->GetActiveSidebarWin()->ResizeIfNeccessary(aOldHeight,rView.GetPostItMgr()->GetActiveSidebarWin()->GetPostItTextHeight());
}
void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
{
SwPostItMgr* pPostItMgr = rView.GetPostItMgr();
- if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() )
+ if ( !pPostItMgr || !pPostItMgr->HasActiveSidebarWin() )
return;
SfxWhichIter aIter(rSet);
@@ -1477,7 +1529,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
}
- if (pPostItMgr->GetActivePostIt()->GetStatus()==SwPostItHelper::DELETED)
+ if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()==SwPostItHelper::DELETED)
rSet.DisableItem( nWhich );
nWhich = aIter.NextWhich();
@@ -1498,10 +1550,10 @@ void SwAnnotationShell::StateDisableItems( SfxItemSet &rSet )
void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
{
SwPostItMgr* pPostItMgr = rView.GetPostItMgr();
- if ( !pPostItMgr || !pPostItMgr->GetActivePostIt() )
+ if ( !pPostItMgr || !pPostItMgr->HasActiveSidebarWin() )
return;
- OutlinerView* pOLV = pPostItMgr->GetActivePostIt()->View();
+ OutlinerView* pOLV = pPostItMgr->GetActiveSidebarWin()->GetOutlinerView();
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index 19b149c20d..025403cc08 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -703,8 +703,9 @@ void SwBaseShell::Execute(SfxRequest &rReq)
rSh.EndSelect();
}
BOOL bRet = rSh.MoveFldType(pFldType, nSlot == FN_GOTO_NEXT_MARK);
- if (bRet)
- rSh.ClickToField(*rSh.GetCurFld());
+ SwField* pCurField = bRet ? rSh.GetCurFld() : 0;
+ if (pCurField)
+ rSh.ClickToField(*pCurField);
rReq.SetReturnValue(SfxBoolItem( nSlot, bRet));
}
}
diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx
index e1e0c3b9da..3004ebd4d4 100644
--- a/sw/source/ui/shells/drwtxtex.cxx
+++ b/sw/source/ui/shells/drwtxtex.cxx
@@ -27,8 +27,14 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#include <hintids.hxx>
+#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+
+#include <comphelper/processfactory.hxx>
+#include <i18npool/mslangid.hxx>
+#include <sfx2/bindings.hxx>
+#include <sfx2/dispatch.hxx>
+#include <sfx2/request.hxx>
#include <tools/shl.hxx>
#include <svx/svdview.hxx>
#include <editeng/spltitem.hxx>
@@ -37,9 +43,7 @@
#include <editeng/widwitem.hxx>
#include <editeng/kernitem.hxx>
#include <editeng/escpitem.hxx>
-#ifndef _SVX_PARAITEM_HXX //autogen
#include <editeng/lspcitem.hxx>
-#endif
#include <editeng/adjitem.hxx>
#include <editeng/crsditem.hxx>
#include <editeng/shdditem.hxx>
@@ -49,9 +53,7 @@
#include <editeng/fhgtitem.hxx>
#include <editeng/colritem.hxx>
#include <editeng/wghtitem.hxx>
-#ifndef _SVX_CNTRITEM_HXX //autogen
#include <editeng/cntritem.hxx>
-#endif
#include <editeng/postitem.hxx>
#include <editeng/frmdiritem.hxx>
#include <svx/svdoutl.hxx>
@@ -59,6 +61,8 @@
#include <svl/whiter.hxx>
#include <svl/cjkoptions.hxx>
#include <svl/ctloptions.hxx>
+#include <svtools/langtab.hxx>
+#include <svl/languageoptions.hxx>
#include <sfx2/bindings.hxx>
#include <vcl/msgbox.hxx>
#include <sfx2/dispatch.hxx>
@@ -67,48 +71,66 @@
#include <editeng/editstat.hxx>
#include <svx/hlnkitem.hxx>
#include <svx/htmlmode.hxx>
+#include <svl/languageoptions.hxx>
+#include <svl/slstitm.hxx>
#include <editeng/langitem.hxx>
+#include <svtools/langtab.hxx>
#include <editeng/unolingu.hxx>
#include <editeng/scripttypeitem.hxx>
#include <editeng/writingmodeitem.hxx>
+#include <editeng/eeitem.hxx>
+#include <editeng/editeng.hxx>
+#include <editeng/editdata.hxx>
+#include <editeng/outliner.hxx>
+#include <vcl/window.hxx>
+#include <editeng/editview.hxx>
+#include <vcl/outdev.hxx>
+#include <editeng/hyznitem.hxx>
+#include <editeng/kernitem.hxx>
+#include <editeng/langitem.hxx>
+#include <editeng/lspcitem.hxx>
+#include <editeng/orphitem.hxx>
+#include <editeng/outliner.hxx>
+#include <editeng/postitem.hxx>
+#include <editeng/scripttypeitem.hxx>
+#include <editeng/shdditem.hxx>
+#include <editeng/spltitem.hxx>
+#include <svx/svdoutl.hxx>
+#include <svx/svdview.hxx>
+#include <editeng/udlnitem.hxx>
+#include <editeng/unolingu.hxx>
+#include <editeng/wghtitem.hxx>
+#include <editeng/widwitem.hxx>
+#include <editeng/writingmodeitem.hxx>
+#include <tools/shl.hxx>
+#include <vcl/msgbox.hxx>
+#include <vcl/outdev.hxx>
+#include <vcl/window.hxx>
+
+#include <cmdid.h>
#include <doc.hxx>
-#include <wview.hxx>
-#include <viewopt.hxx>
-#include <wrtsh.hxx>
-#include <uitool.hxx>
+#include <docstat.hxx>
+#include <drwtxtsh.hxx>
+#include <edtwin.hxx>
+#include <globals.hrc>
+#include <hintids.hxx>
+#include <initui.hxx> // fuer SpellPointer
+#include <langhelper.hxx>
#include <pardlg.hxx>
+#include <shells.hrc>
+#include <string.h>
#include <swdtflvr.hxx>
-#include <drwtxtsh.hxx>
#include <swmodule.hxx>
-#include <initui.hxx> // fuer SpellPointer
-#include <edtwin.hxx>
#include <swwait.hxx>
-#include <docstat.hxx>
-
-#include <comphelper/processfactory.hxx>
-#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+#include <uitool.hxx>
+#include <viewopt.hxx>
+#include <wrtsh.hxx>
+#include <wview.hxx>
-#include <cmdid.h>
-#include <globals.hrc>
-#include <shells.hrc>
#include "swabstdlg.hxx"
#include "chrdlg.hrc"
#include "misc.hrc"
-//modified on Jul. 30th
-#include <svl/languageoptions.hxx>
-#include <editeng/langitem.hxx>
-#include <svtools/langtab.hxx>
-#include <svl/slstitm.hxx>
-#include <string.h>
-
-#include <editeng/eeitem.hxx>
-#include <editeng/editeng.hxx>
-#include <editeng/editdata.hxx>
-#include <editeng/outliner.hxx>
-#include <vcl/window.hxx>
-#include <editeng/editview.hxx>
-#include <vcl/outdev.hxx>
#include <langhelper.hxx>
@@ -148,6 +170,18 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
bRestoreSelection = SwLangHelper::SetLanguageStatus(pOLV,rReq,GetView(),rSh);
break;
}
+
+ case SID_THES:
+ {
+ String aReplaceText;
+ SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES, sal_False );
+ if (pItem2)
+ aReplaceText = pItem2->GetValue();
+ if (aReplaceText.Len() > 0)
+ ReplaceTextWithSynonym( pOLV->GetEditView(), aReplaceText );
+ break;
+ }
+
case SID_ATTR_CHAR_FONT:
case SID_ATTR_CHAR_FONTHEIGHT:
case SID_ATTR_CHAR_WEIGHT:
@@ -569,7 +603,27 @@ void SwDrawTextShell::GetState(SfxItemSet& rSet)
nSlotId = SwLangHelper::GetLanguageStatus(pOLV,rSet);;
break;
}
- case SID_ATTR_PARA_ADJUST_LEFT: eAdjust = SVX_ADJUST_LEFT; goto ASK_ADJUST;
+
+ case SID_THES:
+ {
+ String aStatusVal;
+ LanguageType nLang = LANGUAGE_NONE;
+ bool bIsLookUpWord = GetStatusValueForThesaurusFromContext( aStatusVal, nLang, pOLV->GetEditView() );
+ rSet.Put( SfxStringItem( SID_THES, aStatusVal ) );
+
+ // disable "Thesaurus" context menu entry if there is nothing to look up
+ uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() );
+ lang::Locale aLocale( SvxCreateLocale( nLang ) );
+ if (!bIsLookUpWord ||
+ !xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( aLocale ))
+ rSet.DisableItem( SID_THES );
+
+ //! avoid puting the same item as SfxBoolItem at the end of this function
+ nSlotId = 0;
+ break;
+ }
+
+ case SID_ATTR_PARA_ADJUST_LEFT: eAdjust = SVX_ADJUST_LEFT; goto ASK_ADJUST;
case SID_ATTR_PARA_ADJUST_RIGHT: eAdjust = SVX_ADJUST_RIGHT; goto ASK_ADJUST;
case SID_ATTR_PARA_ADJUST_CENTER: eAdjust = SVX_ADJUST_CENTER; goto ASK_ADJUST;
case SID_ATTR_PARA_ADJUST_BLOCK: eAdjust = SVX_ADJUST_BLOCK; goto ASK_ADJUST;
@@ -620,19 +674,17 @@ ASK_ESCAPE:
}
break;
- case FN_THESAURUS_DLG:
+ case SID_THESAURUS:
{
// disable "Thesaurus" if the language is not supported
const SfxPoolItem &rItem = GetShell().GetDoc()->GetDefault(
GetWhichOfScript( RES_CHRATR_LANGUAGE,
GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage())) );
- LanguageType nLang = ((const SvxLanguageItem &)
- rItem).GetLanguage();
- //
+ LanguageType nLang = ((const SvxLanguageItem &) rItem).GetLanguage();
+
uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() );
- if (!xThes.is() || nLang == LANGUAGE_NONE ||
- !xThes->hasLocale( SvxCreateLocale( nLang ) ))
- rSet.DisableItem( FN_THESAURUS_DLG );
+ if (!xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( SvxCreateLocale( nLang ) ))
+ rSet.DisableItem( SID_THESAURUS );
nSlotId = 0;
}
break;
diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx
index e780143cb8..a46210639a 100644
--- a/sw/source/ui/shells/drwtxtsh.cxx
+++ b/sw/source/ui/shells/drwtxtsh.cxx
@@ -52,6 +52,7 @@
#include <editeng/editstat.hxx>
#include <svx/svdoutl.hxx>
#include <com/sun/star/i18n/TransliterationModules.hpp>
+#include <com/sun/star/i18n/TransliterationModulesExtra.hpp>
#include <com/sun/star/i18n/TextConversionOption.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
@@ -392,7 +393,7 @@ void SwDrawTextShell::ExecDrawLingu(SfxRequest &rReq)
{
switch(rReq.GetSlot())
{
- case FN_THESAURUS_DLG:
+ case SID_THESAURUS:
pOLV->StartThesaurus();
break;
@@ -717,6 +718,15 @@ void SwDrawTextShell::ExecTransliteration( SfxRequest & rReq )
switch( rReq.GetSlot() )
{
+ case SID_TRANSLITERATE_SENTENCE_CASE:
+ nMode = TransliterationModulesExtra::SENTENCE_CASE;
+ break;
+ case SID_TRANSLITERATE_TITLE_CASE:
+ nMode = TransliterationModulesExtra::TITLE_CASE;
+ break;
+ case SID_TRANSLITERATE_TOGGLE_CASE:
+ nMode = TransliterationModulesExtra::TOGGLE_CASE;
+ break;
case SID_TRANSLITERATE_UPPER:
nMode = TransliterationModules_LOWERCASE_UPPERCASE;
break;
diff --git a/sw/source/ui/shells/langhelper.cxx b/sw/source/ui/shells/langhelper.cxx
index e32a959850..878d18fc42 100755..100644
--- a/sw/source/ui/shells/langhelper.cxx
+++ b/sw/source/ui/shells/langhelper.cxx
@@ -66,7 +66,8 @@ using namespace ::com::sun::star;
namespace SwLangHelper
{
- USHORT GetLanguageStatus(OutlinerView* pOLV,SfxItemSet& rSet)
+
+ USHORT GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet )
{
ESelection aSelection = pOLV->GetSelection();
EditView& rEditView=pOLV->GetEditView();
@@ -110,7 +111,7 @@ namespace SwLangHelper
return 0;
}
- bool SetLanguageStatus(OutlinerView* pOLV,SfxRequest &rReq,SwView &rView,SwWrtShell &rSh)
+ bool SetLanguageStatus( OutlinerView* pOLV, SfxRequest &rReq, SwView &rView, SwWrtShell &rSh )
{
bool bRestoreSelection = false;
SfxItemSet aEditAttr(pOLV->GetAttribs());
@@ -130,126 +131,132 @@ namespace SwLangHelper
//!! SwTextShell got destroyed meanwhile.)
SfxViewFrame *pViewFrame = rView.GetViewFrame();
- if (aNewLangTxt.EqualsAscii( "*" ))
- {
- // open the dialog "Tools/Options/Language Settings - Language"
- SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- if (pFact)
- {
- VclAbstractDialog* pDlg = pFact->CreateVclDialog( rView.GetWindow(), SID_LANGUAGE_OPTIONS );
- pDlg->Execute();
- delete pDlg;
- }
+ if (aNewLangTxt.EqualsAscii( "*" ))
+ {
+ // open the dialog "Tools/Options/Language Settings - Language"
+ SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
+ if (pFact)
+ {
+ VclAbstractDialog* pDlg = pFact->CreateVclDialog( rView.GetWindow(), SID_LANGUAGE_OPTIONS );
+ pDlg->Execute();
+ delete pDlg;
}
- else
+ }
+ else
+ {
+ // setting the new language...
+ if (aNewLangTxt.Len() > 0)
{
- // setting the new language...
- if (aNewLangTxt.Len() > 0)
+ const String aSelectionLangPrefix( String::CreateFromAscii("Current_") );
+ const String aParagraphLangPrefix( String::CreateFromAscii("Paragraph_") );
+ const String aDocumentLangPrefix( String::CreateFromAscii("Default_") );
+ const String aStrNone( String::CreateFromAscii("LANGUAGE_NONE") );
+ const String aStrResetLangs( String::CreateFromAscii("RESET_LANGUAGES") );
+
+ xub_StrLen nPos = 0;
+ bool bForSelection = true;
+ bool bForParagraph = false;
+ if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aSelectionLangPrefix, 0 )))
{
- const String aSelectionLangPrefix( String::CreateFromAscii("Current_") );
- const String aParagraphLangPrefix( String::CreateFromAscii("Paragraph_") );
- const String aDocumentLangPrefix( String::CreateFromAscii("Default_") );
- const String aStrNone( String::CreateFromAscii("LANGUAGE_NONE") );
-
- xub_StrLen nPos = 0;
- bool bForSelection = true;
- bool bForParagraph = false;
- if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aSelectionLangPrefix, 0 )))
- {
- // ... for the current selection
- aNewLangTxt = aNewLangTxt.Erase( nPos, aSelectionLangPrefix.Len() );
- bForSelection = true;
- }
- else if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aParagraphLangPrefix , 0 )))
- {
- // ... for the current paragraph language
- aNewLangTxt = aNewLangTxt.Erase( nPos, aParagraphLangPrefix.Len() );
- bForSelection = true;
- bForParagraph = true;
- }
- else if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aDocumentLangPrefix , 0 )))
- {
- // ... as default document language
- aNewLangTxt = aNewLangTxt.Erase( nPos, aDocumentLangPrefix.Len() );
- bForSelection = false;
- }
+ // ... for the current selection
+ aNewLangTxt = aNewLangTxt.Erase( nPos, aSelectionLangPrefix.Len() );
+ bForSelection = true;
+ }
+ else if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aParagraphLangPrefix , 0 )))
+ {
+ // ... for the current paragraph language
+ aNewLangTxt = aNewLangTxt.Erase( nPos, aParagraphLangPrefix.Len() );
+ bForSelection = true;
+ bForParagraph = true;
+ }
+ else if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aDocumentLangPrefix , 0 )))
+ {
+ // ... as default document language
+ aNewLangTxt = aNewLangTxt.Erase( nPos, aDocumentLangPrefix.Len() );
+ bForSelection = false;
+ }
- if (bForParagraph)
- {
- bRestoreSelection = true;
- SwLangHelper::SelectPara( rEditView, aSelection );
- aSelection = pOLV->GetSelection();
- }
- if (!bForSelection) // document language to be changed...
- {
- rSh.StartAction();
- rSh.LockView( TRUE );
- rSh.Push();
-
- // prepare to apply new language to all text in document
- rSh.SelAll();
- rSh.ExtendedSelectAll();
- }
+ if (bForParagraph)
+ {
+ bRestoreSelection = true;
+ SwLangHelper::SelectPara( rEditView, aSelection );
+ aSelection = pOLV->GetSelection();
+ }
+ if (!bForSelection) // document language to be changed...
+ {
+ rSh.StartAction();
+ rSh.LockView( TRUE );
+ rSh.Push();
- if (aNewLangTxt != aStrNone)
- SwLangHelper::SetLanguage( rSh, pEditEngine, aSelection, aNewLangTxt, bForSelection, aEditAttr );
+ // prepare to apply new language to all text in document
+ rSh.SelAll();
+ rSh.ExtendedSelectAll();
+ }
+
+ if (aNewLangTxt == aStrNone)
+ SwLangHelper::SetLanguage_None( rSh, pOLV, aSelection, bForSelection, aEditAttr );
+ else if (aNewLangTxt == aStrResetLangs)
+ SwLangHelper::ResetLanguages( rSh, pOLV, aSelection, bForSelection );
+ else
+ SwLangHelper::SetLanguage( rSh, pOLV, aSelection, aNewLangTxt, bForSelection, aEditAttr );
+
+ // ugly hack, as it seems that EditView/EditEngine does not update their spellchecking marks
+ // when setting a new language attribute
+ if (bForSelection)
+ {
+ const SwViewOption* pVOpt = rView.GetWrtShellPtr()->GetViewOptions();
+ ULONG nCntrl = pEditEngine->GetControlWord();
+ // turn off
+ if (!pVOpt->IsOnlineSpell())
+ nCntrl &= ~EE_CNTRL_ONLINESPELLING;
else
- SwLangHelper::SetLanguage_None( rSh, pEditEngine, aSelection, bForSelection, aEditAttr );
-
- // ugly hack, as it seems that EditView/EditEngine does not update their spellchecking marks
- // when setting a new language attribute
- if (bForSelection)
- {
- const SwViewOption* pVOpt = rView.GetWrtShellPtr()->GetViewOptions();
- ULONG nCntrl = pEditEngine->GetControlWord();
- // turn off
- if (!pVOpt->IsOnlineSpell())
- nCntrl &= ~EE_CNTRL_ONLINESPELLING;
- else
- nCntrl &= ~EE_CNTRL_ONLINESPELLING;
- pEditEngine->SetControlWord(nCntrl);
-
- //turn back on
- if (pVOpt->IsOnlineSpell())
- nCntrl |= EE_CNTRL_ONLINESPELLING;
- else
- nCntrl &= ~EE_CNTRL_ONLINESPELLING;
- pEditEngine->SetControlWord(nCntrl);
-
- pEditEngine->CompleteOnlineSpelling();
- rEditView.Invalidate();
- }
+ nCntrl &= ~EE_CNTRL_ONLINESPELLING;
+ pEditEngine->SetControlWord(nCntrl);
- if (!bForSelection)
- {
- // need to release view and restore selection...
- rSh.Pop( FALSE );
- rSh.LockView( FALSE );
- rSh.EndAction();
- }
+ //turn back on
+ if (pVOpt->IsOnlineSpell())
+ nCntrl |= EE_CNTRL_ONLINESPELLING;
+ else
+ nCntrl &= ~EE_CNTRL_ONLINESPELLING;
+ pEditEngine->SetControlWord(nCntrl);
+
+ pEditEngine->CompleteOnlineSpelling();
+ rEditView.Invalidate();
+ }
+
+ if (!bForSelection)
+ {
+ // need to release view and restore selection...
+ rSh.Pop( FALSE );
+ rSh.LockView( FALSE );
+ rSh.EndAction();
}
}
-
- // invalidate slot to get the new language displayed
- pViewFrame->GetBindings().Invalidate( rReq.GetSlot() );
-
- rReq.Done();
- return bRestoreSelection;
+ }
+
+ // invalidate slot to get the new language displayed
+ pViewFrame->GetBindings().Invalidate( rReq.GetSlot() );
+
+ rReq.Done();
+ return bRestoreSelection;
}
- void SetLanguage(SwWrtShell &rWrtSh, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet)
+ void SetLanguage( SwWrtShell &rWrtSh, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet )
{
- SetLanguage(rWrtSh,0,ESelection(),rLangText,bIsForSelection,rCoreSet);
+ SetLanguage( rWrtSh, 0 , ESelection(), rLangText, bIsForSelection, rCoreSet );
}
- void SetLanguage(SwWrtShell &rWrtSh, EditEngine* pEditEngine,ESelection aSelection, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet)
+ void SetLanguage( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet )
{
const LanguageType nLang = SvtLanguageTable().GetType( rLangText );
if (nLang != LANGUAGE_DONTKNOW)
{
USHORT nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nLang );
+ EditEngine* pEditEngine = pOLV ? pOLV->GetEditView().GetEditEngine() : NULL;
+ DBG_ASSERT( !pOLV || pEditEngine, "OutlinerView without EditEngine???" );
+
//get ScriptType
USHORT nLangWhichId = 0;
bool bIsSingleScriptType = true;
@@ -264,6 +271,9 @@ namespace SwLangHelper
}
if (bIsSingleScriptType)
{
+ // change language for selection or paragraph
+ // (for paragraph is handled by previosuly having set the selection to the
+ // whole paragraph)
if (bIsForSelection)
{
// apply language to current selection
@@ -279,7 +289,7 @@ namespace SwLangHelper
rWrtSh.SetAttr( rCoreSet );
}
}
- else // change document language
+ else // change language for all text
{
// set document default language
switch (nLangWhichId)
@@ -300,12 +310,12 @@ namespace SwLangHelper
}
}
- void SetLanguage_None(SwWrtShell &rWrtSh,bool bIsForSelection, SfxItemSet &rCoreSet )
+ void SetLanguage_None( SwWrtShell &rWrtSh, bool bIsForSelection, SfxItemSet &rCoreSet )
{
- SetLanguage_None(rWrtSh,0,ESelection(),bIsForSelection,rCoreSet);
+ SetLanguage_None( rWrtSh,0,ESelection(),bIsForSelection,rCoreSet );
}
- void SetLanguage_None(SwWrtShell &rWrtSh, EditEngine* pEditEngine,ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet )
+ void SetLanguage_None( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet )
{
// EditEngine IDs
const USHORT aLangWhichId_EE[3] =
@@ -322,10 +332,15 @@ namespace SwLangHelper
RES_CHRATR_CJK_LANGUAGE,
RES_CHRATR_CTL_LANGUAGE
};
-
+
if (bIsForSelection)
{
- // apply language to current selection
+ // change language for selection or paragraph
+ // (for paragraph is handled by previosuly having set the selection to the
+ // whole paragraph)
+
+ EditEngine* pEditEngine = pOLV ? pOLV->GetEditView().GetEditEngine() : NULL;
+ DBG_ASSERT( !pOLV || pEditEngine, "OutlinerView without EditEngine???" );
if (pEditEngine)
{
for (sal_uInt16 i = 0; i < 3; ++i)
@@ -340,7 +355,7 @@ namespace SwLangHelper
rWrtSh.SetAttr( rCoreSet );
}
}
- else // change document language
+ else // change language for all text
{
SvUShortsSort aAttribs;
for (sal_uInt16 i = 0; i < 3; ++i)
@@ -355,6 +370,39 @@ namespace SwLangHelper
}
}
+ void ResetLanguages( SwWrtShell &rWrtSh, bool bIsForSelection )
+ {
+ ResetLanguages( rWrtSh, 0 , ESelection(), bIsForSelection );
+ }
+
+ void ResetLanguages( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection )
+ {
+ (void) bIsForSelection;
+ (void) aSelection;
+
+ // reset language for current selection.
+ // The selection should already have been expanded to the whole paragraph or
+ // to all text in the document if those are the ranges where to reset
+ // the language attributes
+
+ if (pOLV)
+ {
+ EditView &rEditView = pOLV->GetEditView();
+ rEditView.RemoveAttribs( true, EE_CHAR_LANGUAGE );
+ rEditView.RemoveAttribs( true, EE_CHAR_LANGUAGE_CJK );
+ rEditView.RemoveAttribs( true, EE_CHAR_LANGUAGE_CTL );
+ }
+ else
+ {
+ SvUShortsSort aAttribs;
+ aAttribs.Insert( RES_CHRATR_LANGUAGE );
+ aAttribs.Insert( RES_CHRATR_CJK_LANGUAGE );
+ aAttribs.Insert( RES_CHRATR_CTL_LANGUAGE );
+ rWrtSh.ResetAttr( &aAttribs );
+ }
+ }
+
+
/// @returns : the language for the selected text that is set for the
/// specified attribute (script type).
/// If there are more than one languages used LANGUAGE_DONTKNOW will be returned.
@@ -450,7 +498,7 @@ namespace SwLangHelper
/// 'In use' means the language(s) matching the script type(s) of the
/// selected text. Or in other words, the language a spell checker would use.
/// If there is more than one language LANGUAGE_DONTKNOW will be returned.
- LanguageType GetCurrentLanguage(SfxItemSet aSet,USHORT nScriptType )
+ LanguageType GetCurrentLanguage( SfxItemSet aSet, USHORT nScriptType )
{
//set language attribute to use according to the script type
USHORT nLangWhichId = 0;
@@ -517,7 +565,7 @@ namespace SwLangHelper
return aText;
}
- String GetTextForLanguageGuessing(EditEngine* rEditEngine, ESelection aDocSelection )
+ String GetTextForLanguageGuessing( EditEngine* rEditEngine, ESelection aDocSelection )
{
// string for guessing language
String aText;
diff --git a/sw/source/ui/shells/textdrw.cxx b/sw/source/ui/shells/textdrw.cxx
index 95f6710cc8..e4d1bc8179 100644
--- a/sw/source/ui/shells/textdrw.cxx
+++ b/sw/source/ui/shells/textdrw.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -133,7 +133,6 @@ void SwBaseShell::InsertURLButton(const String& rURL, const String& rTarget, con
if (rSh.IsObjSelected())
{
-// rSh.ChgAnchor(FLY_AT_CNTNT);
rSh.UnSelectFrm();
}
}
diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx
index 03e0ce7aea..7bef6d5265 100644
--- a/sw/source/ui/shells/textfld.cxx
+++ b/sw/source/ui/shells/textfld.cxx
@@ -1,7 +1,7 @@
/************ *************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -80,8 +80,7 @@
#include <app.hrc>
-#include "PostItMgr.hxx"
-#include "postit.hxx"
+#include <PostItMgr.hxx>
using namespace nsSwDocInfoSubType;
@@ -315,8 +314,11 @@ void SwTextShell::ExecField(SfxRequest &rReq)
}
break;
case FN_DELETE_NOTE:
- if ( GetView().GetPostItMgr() && GetView().GetPostItMgr()->GetActivePostIt() )
- GetView().GetPostItMgr()->GetActivePostIt()->Delete();
+ if ( GetView().GetPostItMgr() &&
+ GetView().GetPostItMgr()->HasActiveSidebarWin() )
+ {
+ GetView().GetPostItMgr()->DeleteActiveSidebarWin();
+ }
break;
case FN_DELETE_ALL_NOTES:
if ( GetView().GetPostItMgr() )
@@ -330,8 +332,11 @@ void SwTextShell::ExecField(SfxRequest &rReq)
}
break;
case FN_HIDE_NOTE:
- if ( GetView().GetPostItMgr() && GetView().GetPostItMgr()->GetActivePostIt() )
- GetView().GetPostItMgr()->GetActivePostIt()->Hide();
+ if ( GetView().GetPostItMgr() &&
+ GetView().GetPostItMgr()->HasActiveSidebarWin() )
+ {
+ GetView().GetPostItMgr()->HideActiveSidebarWin();
+ }
break;
case FN_HIDE_ALL_NOTES:
if ( GetView().GetPostItMgr() )
@@ -627,7 +632,7 @@ void SwTextShell::StateField( SfxItemSet &rSet )
SwPostItMgr* pPostItMgr = GetView().GetPostItMgr();
if ( !pPostItMgr )
rSet.InvalidateItem( nWhich );
- else if ( !pPostItMgr->GetActivePostIt() )
+ else if ( !pPostItMgr->HasActiveSidebarWin() )
{
rSet.InvalidateItem( FN_DELETE_NOTE );
rSet.InvalidateItem( FN_HIDE_NOTE );
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index 60c02e5f0b..e437de58d4 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -62,7 +62,8 @@
#include <svx/htmlmode.hxx>
#include <svx/pfiledlg.hxx>
#include <svtools/htmlcfg.hxx>
-#include <com/sun/star/i18n/TransliterationModules.hdl>
+#include <com/sun/star/i18n/TransliterationModules.hpp>
+#include <com/sun/star/i18n/TransliterationModulesExtra.hpp>
#include <sot/clsids.hxx>
#include <editeng/acorrcfg.hxx>
@@ -1027,6 +1028,15 @@ void SwTextShell::ExecTransliteration( SfxRequest & rReq )
switch( rReq.GetSlot() )
{
+ case SID_TRANSLITERATE_SENTENCE_CASE:
+ nMode = TransliterationModulesExtra::SENTENCE_CASE;
+ break;
+ case SID_TRANSLITERATE_TITLE_CASE:
+ nMode = TransliterationModulesExtra::TITLE_CASE;
+ break;
+ case SID_TRANSLITERATE_TOGGLE_CASE:
+ nMode = TransliterationModulesExtra::TOGGLE_CASE;
+ break;
case SID_TRANSLITERATE_UPPER:
nMode = TransliterationModules_LOWERCASE_UPPERCASE;
break;
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index 195f8228f9..8a02ce6395 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -27,7 +27,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
+#include <com/sun/star/i18n/WordType.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+
#include <comphelper/processfactory.hxx>
#include <svx/dialogs.hrc>
#include <hintids.hxx>
@@ -338,6 +341,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
const String aParagraphLangPrefix( String::CreateFromAscii("Paragraph_") );
const String aDocumentLangPrefix( String::CreateFromAscii("Default_") );
const String aStrNone( String::CreateFromAscii("LANGUAGE_NONE") );
+ const String aStrResetLangs( String::CreateFromAscii("RESET_LANGUAGES") );
SfxItemSet aCoreSet( GetPool(),
RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
@@ -376,10 +380,12 @@ void SwTextShell::Execute(SfxRequest &rReq)
rWrtSh.SelAll();
rWrtSh.ExtendedSelectAll();
}
- if (aNewLangTxt != aStrNone)
- SwLangHelper::SetLanguage( rWrtSh, aNewLangTxt, bForSelection, aCoreSet );
- else
+ if (aNewLangTxt == aStrNone)
SwLangHelper::SetLanguage_None( rWrtSh, bForSelection, aCoreSet );
+ else if (aNewLangTxt == aStrResetLangs)
+ SwLangHelper::ResetLanguages( rWrtSh, bForSelection );
+ else
+ SwLangHelper::SetLanguage( rWrtSh, aNewLangTxt, bForSelection, aCoreSet );
}
// restore selection...
@@ -396,6 +402,23 @@ void SwTextShell::Execute(SfxRequest &rReq)
break;
}
+ case SID_THES:
+ {
+ // replace word/selection with text from selected sub menu entry
+ String aReplaceText;
+ SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES , sal_False );
+ if (pItem2)
+ aReplaceText = pItem2->GetValue();
+ if (aReplaceText.Len() > 0)
+ {
+ SwView &rView2 = rWrtSh.GetView();
+ const bool bSelection = rWrtSh.HasSelection();
+ const String aLookUpText = rView2.GetThesaurusLookUpText( bSelection );
+ rView2.InsertThesaurusSynonym( aReplaceText, aLookUpText, bSelection );
+ }
+ }
+ break;
+
case SID_CHARMAP:
{
InsertSymbol( rReq );
@@ -1375,6 +1398,38 @@ void SwTextShell::GetState( SfxItemSet &rSet )
}
break;
+ case SID_THES:
+ {
+ // is there a valid selection to get text from?
+ String aText;
+ sal_Bool bValid = !rSh.HasSelection() ||
+ (rSh.IsSelOnePara() && !rSh.IsMultiSelection());
+ // prevent context menu from showing when cursor is not in or at the end of a word
+ // (GetCurWord will return the next word if there is none at the current position...)
+ const sal_Int16 nWordType = ::i18n::WordType::DICTIONARY_WORD;
+ bool bWord = rSh.IsInWord( nWordType ) || rSh.IsStartWord( nWordType ) || rSh.IsEndWord( nWordType );
+ if (bValid && bWord)
+ aText = rSh.HasSelection()? rSh.GetSelTxt() : rSh.GetCurWord();
+
+ LanguageType nLang = rSh.GetCurLang();
+ lang::Locale aLocale = SvxCreateLocale( nLang );
+ String aLangText( MsLangId::convertLanguageToIsoString( nLang ) );
+
+ // set word and locale to look up as status value
+ String aStatusVal( aText );
+ aStatusVal.AppendAscii( "#" );
+ aStatusVal += aLangText;
+
+ rSet.Put( SfxStringItem( SID_THES, aStatusVal ) );
+
+ // disable "Thesaurus" context menu entry if there is nothing to look up
+ uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() );
+ if (aText.Len() == 0 ||
+ !xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( aLocale ))
+ rSet.DisableItem( SID_THES );
+ }
+ break;
+
case FN_NUMBER_NEWSTART :
if(!rSh.GetCurNumRule())
rSet.DisableItem(nWhich);
diff --git a/sw/source/ui/shells/txtcrsr.cxx b/sw/source/ui/shells/txtcrsr.cxx
index 08d5f1be56..cf0a5f99ac 100644
--- a/sw/source/ui/shells/txtcrsr.cxx
+++ b/sw/source/ui/shells/txtcrsr.cxx
@@ -47,6 +47,8 @@
#include <num.hxx>
#include <edtwin.hxx>
#include <crsskip.hxx>
+#include <doc.hxx>
+#include <docsh.hxx>
#ifndef _CMDID_H
#include <cmdid.h>
@@ -56,6 +58,10 @@
#include <globals.hrc>
#endif
+#include <svx/svdouno.hxx>
+#include <svx/fmshell.hxx>
+#include <svx/sdrobjectfilter.hxx>
+
using namespace ::com::sun::star;
void SwTextShell::ExecBasicMove(SfxRequest &rReq)
@@ -246,6 +252,36 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
BOOL bSetRetVal = TRUE, bRet = TRUE;
switch ( nSlot )
{
+ case SID_FM_TOGGLECONTROLFOCUS:
+ {
+ const SwDoc* pDoc = rSh.GetDoc();
+ const SwDocShell* pDocShell = pDoc ? pDoc->GetDocShell() : NULL;
+ const SwView* pView = pDocShell ? pDocShell->GetView() : NULL;
+ const FmFormShell* pFormShell = pView ? pView->GetFormShell() : NULL;
+ SdrView* pDrawView = pView ? pView->GetDrawView() : NULL;
+ Window* pWindow = pView ? pView->GetWrtShell().GetWin() : NULL;
+
+ OSL_ENSURE( pFormShell && pDrawView && pWindow, "SwXTextView::ExecMoveMisc: no chance!" );
+ if ( !pFormShell || !pDrawView || !pWindow )
+ break;
+
+ ::std::auto_ptr< ::svx::ISdrObjectFilter > pFilter( pFormShell->CreateFocusableControlFilter(
+ *pDrawView, *pWindow ) );
+ if ( !pFilter.get() )
+ break;
+
+ const SdrObject* pNearestControl = rSh.GetBestObject( TRUE, GOTOOBJ_DRAW_CONTROL, FALSE, pFilter.get() );
+ if ( !pNearestControl )
+ break;
+
+ const SdrUnoObj* pUnoObject = dynamic_cast< const SdrUnoObj* >( pNearestControl );
+ OSL_ENSURE( pUnoObject, "SwTextShell::ExecMoveMisc: GetBestObject returned nonsense!" );
+ if ( !pUnoObject )
+ break;
+
+ pFormShell->ToggleControlFocus( *pUnoObject, *pDrawView, *pWindow );
+ }
+ break;
case FN_CNTNT_TO_NEXT_FRAME:
bRet = rSh.GotoObj(TRUE, GOTOOBJ_GOTO_ANY);
if(bRet)
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index 2d1ed91ef7..6f10283478 100644
--- a/sw/source/ui/uiview/pview.cxx
+++ b/sw/source/ui/uiview/pview.cxx
@@ -1055,7 +1055,7 @@ void SwPagePreViewWin::Command( const CommandEvent& rCEvt )
if( pData )
{
const CommandWheelData aDataNew(pData->GetDelta(),pData->GetNotchDelta(),COMMAND_WHEEL_PAGESCROLL,
- pData->GetMode(),pData->GetModifier(),pData->IsHorz());
+ pData->GetMode(),pData->GetModifier(),pData->IsHorz(), pData->IsDeltaPixel());
const CommandEvent aEvent( rCEvt.GetMousePosPixel(),rCEvt.GetCommand(),rCEvt.IsMouseEvent(),&aDataNew);
bCallBase = !mrView.HandleWheelCommands( aEvent );
}
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index 76b2ed5f50..10b3c58bd8 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -212,7 +212,7 @@ void SwView::GotFocus() const
SwAnnotationShell* pAsAnnotationShell = PTR_CAST( SwAnnotationShell, pTopShell );
if ( pAsAnnotationShell )
{
- mpPostItMgr->SetActivePostIt(0);
+ mpPostItMgr->SetActiveSidebarWin(0);
const_cast< SwView* >( this )->AttrChangedNotify( pWrtShell );
}
}
@@ -1399,11 +1399,6 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >
pValue->Value >>= bSelectedFrame;
bGotIsSelectedFrame = sal_True;
}
- else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsSelectedFrame" ) ) )
- {
- pValue->Value >>= bSelectedFrame;
- bGotIsSelectedFrame = sal_True;
- }
pValue++;
}
if (bGotVisibleBottom)
diff --git a/sw/source/ui/uiview/view.src b/sw/source/ui/uiview/view.src
index 0667bf5c35..233664b509 100644
--- a/sw/source/ui/uiview/view.src
+++ b/sw/source/ui/uiview/view.src
@@ -299,8 +299,8 @@ ToolBox RID_TOOLS_TOOLBOX
};
ToolBoxItem
{
- Identifier = FN_THESAURUS_DLG;
- HelpID = FN_THESAURUS_DLG;
+ Identifier = SID_THESAURUS;
+ HelpID = SID_THESAURUS;
Hide = TRUE;
};
ToolBoxItem
diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx
index 568fab8cd6..f3e1253572 100644
--- a/sw/source/ui/uiview/view0.cxx
+++ b/sw/source/ui/uiview/view0.cxx
@@ -117,6 +117,7 @@ SFX_IMPL_VIEWFACTORY(SwView, SW_RES(STR_NONAME))
SFX_IMPL_INTERFACE( SwView, SfxViewShell, SW_RES(RID_TOOLS_TOOLBOX) )
{
SFX_CHILDWINDOW_CONTEXT_REGISTRATION(SID_NAVIGATOR);
+ SFX_CHILDWINDOW_REGISTRATION(SID_TASKPANE);
SFX_CHILDWINDOW_REGISTRATION(SfxTemplateDialogWrapper::GetChildWindowId());
SFX_CHILDWINDOW_REGISTRATION(SvxSearchDialogWrapper::GetChildWindowId());
SFX_CHILDWINDOW_REGISTRATION(SwSpellDialogChildWindow::GetChildWindowId());
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 4ec0f71c82..6bba1778e8 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -125,7 +125,6 @@
#include <dbmgr.hxx>
#include <PostItMgr.hxx>
-#include <postit.hxx>
#include <ndtxt.hxx> //#outline level,added by zhaojianwei
@@ -1369,12 +1368,12 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
{
ASSERT( !this,
"was ist das fuer ein Verzeichnis?" );
- sStr = pCurrSect->GetName();
+ sStr = pCurrSect->GetSectionName();
}
}
break;
default:
- sStr = pCurrSect->GetName();
+ sStr = pCurrSect->GetSectionName();
break;
}
}
@@ -1760,8 +1759,10 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
break;
case SID_ATTR_INSERT:
SwPostItMgr* pMgr = GetPostItMgr();
- if (pMgr && pMgr->GetActivePostIt())
- pMgr->GetActivePostIt()->ToggleInsMode();
+ if ( pMgr && pMgr->HasActiveSidebarWin() )
+ {
+ pMgr->ToggleInsModeOnActiveSidebarWin();
+ }
else
rSh.ToggleInsMode();
bUp = TRUE;
@@ -1776,9 +1777,6 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
}
}
-
-
-
void SwView::InsFrmMode(USHORT nCols)
{
if ( pWrtShell->HasWholeTabSelection() )
diff --git a/sw/source/ui/uiview/viewdraw.cxx b/sw/source/ui/uiview/viewdraw.cxx
index f35e5570f1..49889a3daf 100644
--- a/sw/source/ui/uiview/viewdraw.cxx
+++ b/sw/source/ui/uiview/viewdraw.cxx
@@ -520,7 +520,8 @@ sal_Bool SwView::EnterDrawTextMode(const Point& aDocPos)
/******************************************************************************
* Beschreibung: DrawTextEditMode einschalten
******************************************************************************/
-sal_Bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, Window* pWin, sal_Bool bIsNewObj)
+sal_Bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, Window* pWin,
+ bool bIsNewObj, bool bSetSelectionToStart)
{
SwWrtShell *pSh = &GetWrtShell();
SdrView *pSdrView = pSh->GetDrawView();
@@ -606,7 +607,11 @@ sal_Bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, Window* pWin,
Color aBackground(pSh->GetShapeBackgrd());
pView->SetBackgroundColor(aBackground);
}
+
+ // editing should start at the end of text, spell checking at the beginning ...
ESelection aNewSelection(EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND, EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND);
+ if (bSetSelectionToStart)
+ aNewSelection = ESelection();
pView->SetSelection(aNewSelection);
}
diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx
index 5ccb5f8093..25daf5609a 100644..100755
--- a/sw/source/ui/uiview/viewling.cxx
+++ b/sw/source/ui/uiview/viewling.cxx
@@ -120,7 +120,7 @@ void SwView::ExecLingu(SfxRequest &rReq)
{
switch(rReq.GetSlot())
{
- case FN_THESAURUS_DLG:
+ case SID_THESAURUS:
StartThesaurus();
rReq.Ignore();
break;
@@ -252,64 +252,31 @@ void SwView::StartTextConversion(
// do not do text conversion if it is active elsewhere
if (GetWrtShell().HasConvIter())
{
-// MessBox( 0, WB_OK, String( SW_RES( STR_SPELL_TITLE ) ),
-// String( SW_RES( STR_MULT_INTERACT_SPELL_WARN ) ) ).Execute();
return;
}
-/*
- SfxErrorContext aContext( ERRCTX_SVX_LINGU_SPELLING, aEmptyStr, pEditWin,
- RID_SVXERRCTX, DIALOG_MGR() );
-
- Reference< XSpellChecker1 > xSpell = ::GetSpellChecker();
- if(!xSpell.is())
- { // keine Arme keine Kekse
- ErrorHandler::HandleError( ERRCODE_SVX_LINGU_LINGUNOTEXISTS );
- return;
- }
-*/
+
SpellKontext(sal_True);
- SwViewOption* pVOpt = (SwViewOption*)pWrtShell->GetViewOptions();
- sal_Bool bOldIdle = pVOpt->IsIdle();
+ const SwViewOption* pVOpt = pWrtShell->GetViewOptions();
+ const sal_Bool bOldIdle = pVOpt->IsIdle();
pVOpt->SetIdle( sal_False );
sal_Bool bOldIns = pWrtShell->IsInsMode();
pWrtShell->SetInsMode( sal_True );
+ sal_Bool bSelection = ((SwCrsrShell*)pWrtShell)->HasSelection() ||
+ pWrtShell->GetCrsr() != pWrtShell->GetCrsr()->GetNext();
- {
- sal_Bool bSelection = ((SwCrsrShell*)pWrtShell)->HasSelection() ||
- pWrtShell->GetCrsr() != pWrtShell->GetCrsr()->GetNext();
-
-// sal_Bool bIsSpellSpecial = sal_True;
+ sal_Bool bStart = bSelection || pWrtShell->IsStartOfDoc();
+ sal_Bool bOther = !bSelection && !(pWrtShell->GetFrmType(0,sal_True) & FRMTYPE_BODY);
- sal_Bool bStart = bSelection || pWrtShell->IsStartOfDoc();
- sal_Bool bOther = !bSelection && !(pWrtShell->GetFrmType(0,sal_True) & FRMTYPE_BODY);
-
-/*
- if( bOther && !bIsSpellSpecial )
- // kein Sonderbereich eingeschaltet
- {
- // Ich will auch in Sonderbereichen trennen
- QueryBox aBox( &GetEditWin(), SW_RES( DLG_SPECIAL_FORCED ) );
- if( aBox.Execute() == RET_YES && xProp.is())
- {
- sal_Bool bTrue = sal_True;
- Any aTmp(&bTrue, ::getBooleanCppuType());
- xProp->setPropertyValue( C2U(UPN_IS_SPELL_SPECIAL), aTmp );
- }
- else
- return; // Nein Es wird nicht gespellt
- }
-*/
- {
- const uno::Reference< lang::XMultiServiceFactory > xMgr(
- comphelper::getProcessServiceFactory() );
- SwHHCWrapper aWrap( this, xMgr, nSourceLang, nTargetLang, pTargetFont,
- nOptions, bIsInteractive,
- bStart, bOther, bSelection );
- aWrap.Convert();
- }
+ {
+ const uno::Reference< lang::XMultiServiceFactory > xMgr(
+ comphelper::getProcessServiceFactory() );
+ SwHHCWrapper aWrap( this, xMgr, nSourceLang, nTargetLang, pTargetFont,
+ nOptions, bIsInteractive,
+ bStart, bOther, bSelection );
+ aWrap.Convert();
}
pWrtShell->SetInsMode( bOldIns );
@@ -557,16 +524,77 @@ void SwView::HyphenateDocument()
}
/*--------------------------------------------------------------------
+ --------------------------------------------------------------------*/
+
+bool SwView::IsValidSelectionForThesaurus() const
+{
+ // must not be a multi-selection, and if it is a selection it needs
+ // to be within a single paragraph
+
+ const bool bMultiSel = pWrtShell->GetCrsr() != pWrtShell->GetCrsr()->GetNext();
+ const sal_Bool bSelection = ((SwCrsrShell*)pWrtShell)->HasSelection();
+ return !bMultiSel && (!bSelection || pWrtShell->IsSelOnePara() );
+}
+
+
+String SwView::GetThesaurusLookUpText( bool bSelection ) const
+{
+ return bSelection ? pWrtShell->GetSelTxt() : pWrtShell->GetCurWord();
+}
+
+
+void SwView::InsertThesaurusSynonym( const String &rSynonmText, const String &rLookUpText, bool bSelection )
+{
+ sal_Bool bOldIns = pWrtShell->IsInsMode();
+ pWrtShell->SetInsMode( sal_True );
+
+ pWrtShell->StartAllAction();
+ pWrtShell->StartUndo(UNDO_DELETE);
+
+ if( !bSelection )
+ {
+ if(pWrtShell->IsEndWrd())
+ pWrtShell->Left(CRSR_SKIP_CELLS, FALSE, 1, FALSE );
+
+ pWrtShell->SelWrd();
+
+ // make sure the selection build later from the
+ // data below does not include footnotes and other
+ // "in word" character to the left and right in order
+ // to preserve those. Therefore count those "in words"
+ // in order to modify the selection accordingly.
+ const sal_Unicode* pChar = rLookUpText.GetBuffer();
+ xub_StrLen nLeft = 0;
+ while (pChar && *pChar++ == CH_TXTATR_INWORD)
+ ++nLeft;
+ pChar = rLookUpText.Len() ? rLookUpText.GetBuffer() + rLookUpText.Len() - 1 : 0;
+ xub_StrLen nRight = 0;
+ while (pChar && *pChar-- == CH_TXTATR_INWORD)
+ ++nRight;
+
+ // adjust existing selection
+ SwPaM *pCrsr = pWrtShell->GetCrsr();
+ pCrsr->GetPoint()->nContent/*.nIndex*/ -= nRight;
+ pCrsr->GetMark()->nContent/*.nIndex*/ += nLeft;
+ }
+
+ pWrtShell->Insert( rSynonmText );
+
+ pWrtShell->EndUndo(UNDO_DELETE);
+ pWrtShell->EndAllAction();
+
+ pWrtShell->SetInsMode( bOldIns );
+}
+
+
+/*--------------------------------------------------------------------
Beschreibung: Thesaurus starten
--------------------------------------------------------------------*/
void SwView::StartThesaurus()
{
- if( pWrtShell->GetCrsr() != pWrtShell->GetCrsr()->GetNext() )
- return;
- sal_Bool bSelection = ((SwCrsrShell*)pWrtShell)->HasSelection();
- if( bSelection && !pWrtShell->IsSelOnePara() )
+ if (!IsValidSelectionForThesaurus())
return;
SfxErrorContext aContext( ERRCTX_SVX_LINGU_THESAURUS, aEmptyStr, pEditWin,
@@ -589,114 +617,32 @@ void SwView::StartThesaurus()
sal_Bool bOldIdle = pVOpt->IsIdle();
pVOpt->SetIdle( sal_False );
-#ifdef TL_NEVER
-//!!! hier mu� noch was getan werden... (Umsetzung der Funktionalitaet)
- // ErrorLink setzen, alten merken
- Link aOldLnk = pSpell->ChgErrorLink(LINK(this, SwView, SpellError));
-#endif
-
-
// get initial LookUp text
- String aTmp = bSelection ?
- pWrtShell->GetSelTxt() : pWrtShell->GetCurWord();
+ const sal_Bool bSelection = ((SwCrsrShell*)pWrtShell)->HasSelection();
+ String aTmp = GetThesaurusLookUpText( bSelection );
Reference< XThesaurus > xThes( ::GetThesaurus() );
AbstractThesaurusDialog *pDlg = NULL;
if ( !xThes.is() || !xThes->hasLocale( SvxCreateLocale( eLang ) ) )
- {
SpellError( &eLang );
- }
else
{
// create dialog
{ //Scope for SwWait-Object
SwWait aWait( *GetDocShell(), sal_True );
+ // load library with dialog only on demand ...
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- pDlg = pFact->CreateThesaurusDialog( &GetEditWin(),
- xThes, aTmp, eLang );
- }
-
- {
- // Hier wird der Thesaurus-Dialog im Applikationsfenster zentriert,
- // und zwar oberhalb oder unterhalb der Cursorposition, je nachdem,
- // wo mehr Platz ist.
-
- // Current Word:
- SwRect aRect( pWrtShell->GetCharRect() );
- Point aTopPos = aRect.Pos();
- Point aBtmPos( aTopPos.X(), aRect.Bottom() );
- aTopPos = GetEditWin().LogicToPixel( aTopPos );
- aTopPos = GetEditWin().OutputToScreenPixel( aTopPos );
- aBtmPos = GetEditWin().LogicToPixel( aBtmPos );
- aBtmPos = GetEditWin().OutputToScreenPixel( aBtmPos );
- // ::frame::Desktop:
- Rectangle aRct = GetEditWin().GetDesktopRectPixel();
- Point aWinTop( aRct.TopLeft() );
- Point aWinBtm( aRct.BottomRight() );
- if ( aTopPos.Y() - aWinTop.Y() > aWinBtm.Y() - aBtmPos.Y() )
- aWinBtm.Y() = aTopPos.Y();
- else
- aWinTop.Y() = aBtmPos.Y();
-
- Size aSz = pDlg->GetWindow()->GetSizePixel();
- if ( aWinBtm.Y() - aWinTop.Y() > aSz.Height() )
- {
- aWinTop.X() = ( aWinTop.X() + aWinBtm.X() - aSz.Width() ) / 2;
- aWinTop.Y() = ( aWinTop.Y() + aWinBtm.Y() - aSz.Height() ) / 2;
- pDlg->GetWindow()->SetPosPixel( aWinTop );
- }
+ pDlg = pFact->CreateThesaurusDialog( &GetEditWin(), xThes, aTmp, eLang );
}
if ( pDlg->Execute()== RET_OK )
- {
- sal_Bool bOldIns = pWrtShell->IsInsMode();
- pWrtShell->SetInsMode( sal_True );
-
- pWrtShell->StartAllAction();
- pWrtShell->StartUndo(UNDO_DELETE);
-
- if( !bSelection )
- {
- if(pWrtShell->IsEndWrd())
- pWrtShell->Left(CRSR_SKIP_CELLS, FALSE, 1, FALSE );
-
- pWrtShell->SelWrd();
-
- // make sure the selection build later from the
- // data below does not include footnotes and other
- // "in word" character to the left and right in order
- // to preserve those. Therefore count those "in words"
- // in order to modify the selection accordingly.
- const sal_Unicode* pChar = aTmp.GetBuffer();
- xub_StrLen nLeft = 0;
- while (pChar && *pChar++ == CH_TXTATR_INWORD)
- ++nLeft;
- pChar = aTmp.Len() ? aTmp.GetBuffer() + aTmp.Len() - 1 : 0;
- xub_StrLen nRight = 0;
- while (pChar && *pChar-- == CH_TXTATR_INWORD)
- ++nRight;
-
- // adjust existing selection
- SwPaM *pCrsr = pWrtShell->GetCrsr();
- pCrsr->GetPoint()->nContent/*.nIndex*/ -= nRight;
- pCrsr->GetMark()->nContent/*.nIndex*/ += nLeft;
- }
-
- pWrtShell->Insert( pDlg->GetWord() );
-
- pWrtShell->EndUndo(UNDO_DELETE);
- pWrtShell->EndAllAction();
-
- pWrtShell->SetInsMode( bOldIns );
-
- }
+ InsertThesaurusSynonym( pDlg->GetWord(), aTmp, bSelection );
}
delete pDlg;
pVOpt->SetIdle( bOldIdle );
-
}
/*--------------------------------------------------------------------
diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx
index 5bc918e377..f8212d8724 100644
--- a/sw/source/ui/uiview/viewmdi.cxx
+++ b/sw/source/ui/uiview/viewmdi.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -82,7 +82,6 @@
#include <IDocumentSettingAccess.hxx>
#include <PostItMgr.hxx>
-#include <postit.hxx>
USHORT SwView::nMoveType = NID_PGE;
sal_Int32 SwView::nActMark = 0;
@@ -131,7 +130,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
SwPostItMgr* pPostItMgr = GetPostItMgr();
if (pPostItMgr->HasNotes() && pPostItMgr->ShowNotes())
aPageSize.Width() += pPostItMgr->GetSidebarWidth() + pPostItMgr->GetSidebarBorderWidth();
-
+
const MapMode aTmpMap( MAP_TWIP );
const Size aWindowSize( GetEditWin().PixelToLogic( rEditSize, aTmpMap ) );
@@ -166,7 +165,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
{
long nVisPercent = aWindowSize.Height() * 100 / aPageSize.Height();
nFac = Min( nFac, nVisPercent );
- }
+ }
}
else /*if( SVX_ZOOM_PAGEWIDTH_NOBORDER == eZoomType )*/
{
@@ -240,13 +239,13 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
pWrtShell->UnlockPaint();
if( bUnLockView )
pWrtShell->LockView( FALSE );
-
- if ( mpPostItMgr )
- {
- mpPostItMgr->Rescale();
- mpPostItMgr->CalcRects();
- mpPostItMgr->LayoutPostIts();
- }
+
+// if ( mpPostItMgr )
+// {
+// mpPostItMgr->Rescale();
+// mpPostItMgr->CalcRects();
+// mpPostItMgr->LayoutPostIts();
+// }
// eZoom = eZoomType;
}
@@ -453,10 +452,10 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext )
break;
case NID_MARK:
{
- // unselect
+ // unselect
rSh.MoveCrsr();
rSh.EnterStdMode();
-
+
// collect navigator reminders
IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess();
::std::vector< const ::sw::mark::IMark* > vNavMarks;
@@ -489,15 +488,15 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext )
break;
case NID_POSTIT:
{
- SwMarginWin* pPostIt = pThis->GetPostItMgr()->GetActivePostIt();
+ sw::sidebarwindows::SwSidebarWin* pPostIt = pThis->GetPostItMgr()->GetActiveSidebarWin();
if (pPostIt)
- pThis->GetPostItMgr()->SetActivePostIt(0);
+ pThis->GetPostItMgr()->SetActiveSidebarWin(0);
SwFieldType* pFldType = rSh.GetFldType(0, RES_POSTITFLD);
if (rSh.MoveFldType(pFldType, bNext))
pThis->GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT);
else
//first/last item
- pThis->GetPostItMgr()->SetActivePostIt(pPostIt);
+ pThis->GetPostItMgr()->SetActiveSidebarWin(pPostIt);
}
break;
case NID_SRCH_REP:
diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx
index 5362dfe376..238202e0b9 100644
--- a/sw/source/ui/uiview/viewsrch.cxx
+++ b/sw/source/ui/uiview/viewsrch.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -602,7 +602,7 @@ void SwView::Replace()
}
else
{
- if (GetPostItMgr()->GetActivePostIt())
+ if (GetPostItMgr()->HasActiveSidebarWin())
GetPostItMgr()->Replace(pSrchItem);
sal_Bool bReplaced = pWrtShell->SwEditShell::Replace( pSrchItem->GetReplaceString(),
pSrchItem->GetRegExp());
diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx
index 4022042cf9..ff452ef209 100644
--- a/sw/source/ui/uiview/viewstat.cxx
+++ b/sw/source/ui/uiview/viewstat.cxx
@@ -303,7 +303,7 @@ void SwView::GetState(SfxItemSet &rSet)
rSet.DisableItem( nWhich );
}
break;
- case FN_THESAURUS_DLG:
+ case SID_THESAURUS:
{
SwWrtShell &rSh = GetWrtShell();
if (2 <= rSh.GetCrsrCnt()) // multi selection?
diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx
index e4b7d7406a..d80233ef3e 100644
--- a/sw/source/ui/uiview/viewtab.cxx
+++ b/sw/source/ui/uiview/viewtab.cxx
@@ -422,7 +422,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
::ResizeFrameCols(aCols, aSectRect.Width(), aSectRect.Width() - nDiffWidth, nLeftDiff );
aSet.Put( aCols );
}
- rSh.ChgSection( rSh.GetSectionFmtPos(*pSectFmt), *pCurrSect, &aSet );
+ SwSectionData aData(*pCurrSect);
+ rSh.UpdateSection(rSh.GetSectionFmtPos(*pSectFmt), aData, &aSet);
}
else
{ // Seitenraender einstellen
@@ -511,8 +512,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
::ResizeFrameCols(aCols, aSectRect.Height(), aSectRect.Height() - nDiffWidth, nLeftDiff );
aSet.Put( aCols );
}
- rSh.ChgSection( rSh.GetSectionFmtPos(*pSectFmt), *pCurrSect, &aSet );
-
+ SwSectionData aData(*pCurrSect);
+ rSh.UpdateSection(rSh.GetSectionFmtPos(*pSectFmt), aData, &aSet);
}
else
{ SwPageDesc aDesc( rDesc );
diff --git a/sw/source/ui/uno/makefile.mk b/sw/source/ui/uno/makefile.mk
index 32210b2162..0023fd52f5 100644
--- a/sw/source/ui/uno/makefile.mk
+++ b/sw/source/ui/uno/makefile.mk
@@ -59,8 +59,7 @@ SLO1FILES = \
$(SLO)$/SwXFilterOptions.obj\
$(SLO)$/RefreshListenerContainer.obj \
$(SLO)$/unomodule.obj \
- $(SLO)$/unodoc.obj \
- $(SLO)$/warnpassword.obj
+ $(SLO)$/unodoc.obj
SLO2FILES = \
$(SLO)$/swdetect.obj \
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index afc7581f78..e3f1322bed 100755..100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -114,6 +114,8 @@
#include <drawdoc.hxx>
#include <SwStyleNameMapper.hxx>
#include <osl/file.hxx>
+#include <comphelper/storagehelper.hxx>
+
// --> FME 2004-06-08 #i12836# enhanced pdf export
#include <EnhancedPDFExportHelper.hxx>
@@ -3152,16 +3154,13 @@ uno::Reference< util::XCloneable > SwXTextDocument::createClone( ) throw (uno::
if(!IsValid())
throw RuntimeException();
//create a new document - hidden - copy the storage and return it
- SwDoc* pCopyDoc = pDocShell->GetDoc()->CreateCopy();
- SfxObjectShell* pShell = new SwDocShell( pCopyDoc, SFX_CREATE_MODE_STANDARD );
- pShell->DoInitNew();
-
- uno::Reference< embed::XStorage > xSourceStorage = getDocumentStorage();
+ SfxObjectShell* pShell = pDocShell->GetDoc()->CreateCopy(false);
uno::Reference< frame::XModel > xNewModel = pShell->GetModel();
- //copy this storage
+ uno::Reference< embed::XStorage > xNewStorage = ::comphelper::OStorageHelper::GetTemporaryStorage( );
+ uno::Sequence< beans::PropertyValue > aTempMediaDescriptor;
+ storeToStorage( xNewStorage, aTempMediaDescriptor );
uno::Reference< document::XStorageBasedDocument > xStorageDoc( xNewModel, uno::UNO_QUERY );
- uno::Reference< embed::XStorage > xNewStorage = xStorageDoc->getDocumentStorage();
- xSourceStorage->copyToStorage( xNewStorage );
+ xStorageDoc->loadFromStorage( xNewStorage, aTempMediaDescriptor );
return uno::Reference< util::XCloneable >( xNewModel, UNO_QUERY );
}
/* -----------------------------20.06.00 09:54--------------------------------
diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx
index ef73263663..8ba286f926 100644
--- a/sw/source/ui/uno/unotxvw.cxx
+++ b/sw/source/ui/uno/unotxvw.cxx
@@ -710,7 +710,7 @@ uno::Reference< form::runtime::XFormController > SAL_CALL SwXTextView::getFormCo
FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : NULL;
SdrView* pDrawView = pView2 ? pView2->GetDrawView() : NULL;
Window* pWindow = pView2 ? pView2->GetWrtShell().GetWin() : NULL;
- DBG_ASSERT( pFormShell && pDrawView && pWindow, "SwXTextView::GetControl: how could I?" );
+ DBG_ASSERT( pFormShell && pDrawView && pWindow, "SwXTextView::getFormController: how could I?" );
uno::Reference< form::runtime::XFormController > xController;
if ( pFormShell && pDrawView && pWindow )
@@ -905,12 +905,12 @@ void SAL_CALL SwXTextView::setRubyList(
-----------------------------------------------------------------------*/
SfxObjectShellRef SwXTextView::BuildTmpSelectionDoc( SfxObjectShellRef& /*rRef*/ )
{
- SwWrtShell* pOldSh = &m_pView->GetWrtShell();
- SfxPrinter *pPrt = pOldSh->getIDocumentDeviceAccess()->getPrinter( false );
+ SwWrtShell& rOldSh = m_pView->GetWrtShell();
+ SfxPrinter *pPrt = rOldSh.getIDocumentDeviceAccess()->getPrinter( false );
SwDocShell* pDocSh;
SfxObjectShellRef xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SFX_CREATE_MODE_STANDARD ) );
xDocSh->DoInitNew( 0 );
- pOldSh->FillPrtDoc(pDocSh->GetDoc(), pPrt);
+ rOldSh.FillPrtDoc(pDocSh->GetDoc(), pPrt);
SfxViewFrame* pDocFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 );
SwView* pDocView = (SwView*) pDocFrame->GetViewShell();
pDocView->AttrChangedNotify( &pDocView->GetWrtShell() );//Damit SelectShell gerufen wird.
@@ -919,22 +919,19 @@ SfxObjectShellRef SwXTextView::BuildTmpSelectionDoc( SfxObjectShellRef& /*rRef*/
IDocumentDeviceAccess* pIDDA = pSh->getIDocumentDeviceAccess();
SfxPrinter* pTempPrinter = pIDDA->getPrinter( true );
- if( pOldSh )
- {
- const SwPageDesc& rCurPageDesc = pOldSh->GetPageDesc(pOldSh->GetCurPageDesc());
+ const SwPageDesc& rCurPageDesc = rOldSh.GetPageDesc(rOldSh.GetCurPageDesc());
- IDocumentDeviceAccess* pIDDA_old = pOldSh->getIDocumentDeviceAccess();
+ IDocumentDeviceAccess* pIDDA_old = rOldSh.getIDocumentDeviceAccess();
- if( pIDDA_old->getPrinter( false ) )
- {
- pIDDA->setJobsetup( *pIDDA_old->getJobsetup() );
- //#69563# if it isn't the same printer then the pointer has been invalidated!
- pTempPrinter = pIDDA->getPrinter( true );
- }
-
- pTempPrinter->SetPaperBin(rCurPageDesc.GetMaster().GetPaperBin().GetValue());
+ if( pIDDA_old->getPrinter( false ) )
+ {
+ pIDDA->setJobsetup( *pIDDA_old->getJobsetup() );
+ //#69563# if it isn't the same printer then the pointer has been invalidated!
+ pTempPrinter = pIDDA->getPrinter( true );
}
+ pTempPrinter->SetPaperBin(rCurPageDesc.GetMaster().GetPaperBin().GetValue());
+
return xDocSh;
}
diff --git a/sw/source/ui/uno/warnpassword.cxx b/sw/source/ui/uno/warnpassword.cxx
deleted file mode 100644
index 5eefdc23a1..0000000000
--- a/sw/source/ui/uno/warnpassword.cxx
+++ /dev/null
@@ -1,86 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General 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 "warnpassword.hxx"
-#include <com/sun/star/task/XInteractionHandler.hpp>
-#include <svl/itemset.hxx>
-#include <sfx2/docfile.hxx>
-#include <sfx2/sfxsids.hrc>
-#include <ucbhelper/simpleinteractionrequest.hxx>
-#include <com/sun/star/ucb/InteractiveAppException.hpp>
-#include <svx/svxerr.hxx>
-
-using ::rtl::OUString;
-
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::ucb;
-using namespace ::com::sun::star::task;
-
-bool SwWarnPassword::WarningOnPassword( SfxMedium& rMedium )
-{
- bool bReturn = true;
- uno::Reference< task::XInteractionHandler > xHandler( rMedium.GetInteractionHandler());
- if( xHandler.is() )
- {
-
- OUString empty;
- uno::Any xException( makeAny(InteractiveAppException(empty,
- uno::Reference <XInterface> (),
- InteractionClassification_QUERY,
- ERRCODE_SVX_EXPORT_FILTER_CRYPT)));
-
- uno::Reference< ucbhelper::SimpleInteractionRequest > xRequest
- = new ucbhelper::SimpleInteractionRequest(
- xException,
- ucbhelper::CONTINUATION_APPROVE
- | ucbhelper::CONTINUATION_DISAPPROVE );
-
- xHandler->handle( xRequest.get() );
-
- const sal_Int32 nResp = xRequest->getResponse();
-
- switch ( nResp )
- {
- case ucbhelper::CONTINUATION_UNKNOWN:
- break;
-
- case ucbhelper::CONTINUATION_APPROVE:
- // Continue
- break;
-
- case ucbhelper::CONTINUATION_DISAPPROVE:
- bReturn = false;
- break;
- }
- }
- return bReturn;
-}
-
diff --git a/sw/source/ui/utlui/attrdesc.cxx b/sw/source/ui/utlui/attrdesc.cxx
index cbbad815cb..98e0a4e07b 100644
--- a/sw/source/ui/utlui/attrdesc.cxx
+++ b/sw/source/ui/utlui/attrdesc.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -683,13 +683,13 @@ SfxItemPresentation SwFmtAnchor::GetPresentation
switch ( GetAnchorId() )
{
case FLY_AT_PARA:
- nId = STR_FLY_AT_CNTNT;
+ nId = STR_FLY_AT_PARA;
break;
case FLY_AS_CHAR:
- nId = STR_FLY_IN_CNTNT;
+ nId = STR_FLY_AS_CHAR;
break;
case FLY_AT_PAGE:
- nId = STR_FLY_PAGE;
+ nId = STR_FLY_AT_PAGE;
break;
default:;//prevent warning
}
diff --git a/sw/source/ui/utlui/attrdesc.hrc b/sw/source/ui/utlui/attrdesc.hrc
index 08c6f7ec26..972f13c278 100644
--- a/sw/source/ui/utlui/attrdesc.hrc
+++ b/sw/source/ui/utlui/attrdesc.hrc
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -55,9 +55,9 @@
#define STR_FRM_WIDTH (RC_ATTR_BEGIN + 23)
#define STR_FRM_FIXEDHEIGHT (RC_ATTR_BEGIN + 24)
#define STR_FRM_MINHEIGHT (RC_ATTR_BEGIN + 25)
-#define STR_FLY_AT_CNTNT (RC_ATTR_BEGIN + 26)
-#define STR_FLY_IN_CNTNT (RC_ATTR_BEGIN + 27)
-#define STR_FLY_PAGE (RC_ATTR_BEGIN + 28)
+#define STR_FLY_AT_PARA (RC_ATTR_BEGIN + 26)
+#define STR_FLY_AS_CHAR (RC_ATTR_BEGIN + 27)
+#define STR_FLY_AT_PAGE (RC_ATTR_BEGIN + 28)
#define STR_POS_X (RC_ATTR_BEGIN + 29)
#define STR_POS_Y (RC_ATTR_BEGIN + 30)
#define STR_VERT_TOP (RC_ATTR_BEGIN + 31)
diff --git a/sw/source/ui/utlui/attrdesc.src b/sw/source/ui/utlui/attrdesc.src
index 3317cdbccf..809af110da 100644
--- a/sw/source/ui/utlui/attrdesc.src
+++ b/sw/source/ui/utlui/attrdesc.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -148,15 +148,15 @@ String STR_FRM_MINHEIGHT
/* ### ACHTUNG: Neuer Text in Resource? min. Höhe: : min. H÷he: */
Text [ en-US ] = "Min. height:" ;
};
-String STR_FLY_AT_CNTNT
+String STR_FLY_AT_PARA
{
Text [ en-US ] = "to paragraph" ;
};
-String STR_FLY_IN_CNTNT
+String STR_FLY_AS_CHAR
{
Text [ en-US ] = "to character" ;
};
-String STR_FLY_PAGE
+String STR_FLY_AT_PAGE
{
Text [ en-US ] = "to page" ;
};
diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx
index c417c21c47..418d9ace33 100644
--- a/sw/source/ui/utlui/content.cxx
+++ b/sw/source/ui/utlui/content.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -106,7 +106,6 @@
#include <swundo.hxx>
#include <ndtxt.hxx>
#include <PostItMgr.hxx>
-#include <postit.hxx>
#include <postithelper.hxx>
#include <redline.hxx>
#include <docary.hxx>
@@ -335,7 +334,8 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow)
(eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION
&& TOX_HEADER_SECTION != eTmpType )
{
- const String& rSectionName = pFmt->GetSection()->GetName();
+ const String& rSectionName =
+ pFmt->GetSection()->GetSectionName();
BYTE nLevel = 0;
SwSectionFmt* pParentFmt = pFmt->GetParent();
while(pParentFmt)
@@ -433,7 +433,7 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow)
if ( (*i)->GetBroadCaster()->ISA(SwFmtFld)) // SwPostit
{
SwFmtFld* aFmtFld = static_cast<SwFmtFld*>((*i)->GetBroadCaster());
- if (aFmtFld->GetTxtFld() && aFmtFld->IsFldInDoc() &&
+ if (aFmtFld->GetTxtFld() && aFmtFld->IsFldInDoc() &&
(*i)->mLayoutStatus!=SwPostItHelper::INVISIBLE )
{
String sEntry = aFmtFld->GetFld()->GetPar2();
@@ -697,7 +697,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
(eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION
&& TOX_HEADER_SECTION != eTmpType )
{
- String sSectionName = pFmt->GetSection()->GetName();
+ String sSectionName = pFmt->GetSection()->GetSectionName();
BYTE nLevel = 0;
SwSectionFmt* pParentFmt = pFmt->GetParent();
@@ -800,7 +800,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
if ( (*i)->GetBroadCaster()->ISA(SwFmtFld)) // SwPostit
{
SwFmtFld* aFmtFld = static_cast<SwFmtFld*>((*i)->GetBroadCaster());
- if (aFmtFld->GetTxtFld() && aFmtFld->IsFldInDoc() &&
+ if (aFmtFld->GetTxtFld() && aFmtFld->IsFldInDoc() &&
(*i)->mLayoutStatus!=SwPostItHelper::INVISIBLE )
{
String sEntry = aFmtFld->GetFld()->GetPar2();
@@ -2670,7 +2670,7 @@ void SwContentTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
break;
case 602:
{
- pActiveShell->GetView().GetPostItMgr()->SetActivePostIt(0);
+ pActiveShell->GetView().GetPostItMgr()->SetActiveSidebarWin(0);
pActiveShell->GetView().GetPostItMgr()->Delete();
break;
}
@@ -2932,7 +2932,7 @@ void SwContentTree::EditEntry(SvLBoxEntry* pEntry, sal_uInt8 nMode)
{
if (((SwPostItContent*)pCnt)->IsPostIt())
{
- pActiveShell->GetView().GetPostItMgr()->SetActivePostIt(0);
+ pActiveShell->GetView().GetPostItMgr()->SetActiveSidebarWin(0);
pActiveShell->DelRight();
}
/*
@@ -3100,7 +3100,7 @@ void SwContentTree::GotoContent(SwContent* pCnt)
if (((SwPostItContent*)pCnt)->IsPostIt())
pActiveShell->GotoFld(*((SwPostItContent*)pCnt)->GetPostIt());
else
- pActiveShell->GetView().GetDocShell()->GetWrtShell()->GotoRedline(
+ pActiveShell->GetView().GetDocShell()->GetWrtShell()->GotoRedline(
pActiveShell->GetView().GetDocShell()->GetWrtShell()->FindRedlineOfData(((SwPostItContent*)pCnt)->GetRedline()->GetRedlineData()));
break;
@@ -3140,7 +3140,7 @@ void SwContentTree::GotoContent(SwContent* pCnt)
}
SwView& rView = pActiveShell->GetView();
rView.StopShellTimer();
- rView.GetPostItMgr()->SetActivePostIt(0);
+ rView.GetPostItMgr()->SetActiveSidebarWin(0);
rView.GetEditWin().GrabFocus();
}
/*-----------------06.02.97 19.14-------------------
diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx
index 5dbb52eef3..31789382ec 100644
--- a/sw/source/ui/utlui/glbltree.cxx
+++ b/sw/source/ui/utlui/glbltree.cxx
@@ -32,18 +32,14 @@
#define _SVSTDARR_STRINGSDTOR
#include <svl/svstdarr.hxx>
#endif
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <svl/stritem.hxx>
#include <sfx2/fcontnr.hxx>
#include <sfx2/linkmgr.hxx>
#include <sfx2/dispatch.hxx>
#include <svl/urihelper.hxx>
#include <sfx2/docfile.hxx>
-#ifndef _HELP_HXX //autogen
#include <vcl/help.hxx>
-#endif
#include <sot/filelist.hxx>
#include <svl/eitem.hxx>
#include <svl/urlbmk.hxx>
@@ -54,13 +50,9 @@
#include <sfx2/app.hxx>
#include <swmodule.hxx>
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <errhdl.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <content.hxx>
#include <edglbldc.hxx>
#include <section.hxx>
@@ -72,12 +64,8 @@
#include <edtwin.hxx>
#include <uitool.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
#ifndef _NAVIPI_HRC
#include <navipi.hrc>
#endif
@@ -779,7 +767,7 @@ void SwGlobalTree::Display(BOOL bOnlyUpdateUserData)
case GLBLDOC_SECTION:
{
const SwSection* pSect = pCont->GetSection();
- sEntry = pSect->GetName();
+ sEntry = pSect->GetSectionName();
aImage = aEntryImages.GetImage(SID_SW_START + CONTENT_TYPE_REGION);
}
break;
@@ -947,7 +935,8 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
case CTX_EDIT_LINK:
{
DBG_ASSERT(pCont, "Edit ohne Entry ? " );
- SfxStringItem aName(FN_EDIT_REGION, pCont->GetSection()->GetName());
+ SfxStringItem aName(FN_EDIT_REGION,
+ pCont->GetSection()->GetSectionName());
rDispatch.Execute(FN_EDIT_REGION, SFX_CALLMODE_ASYNCHRON, &aName, 0L);
}
break;
@@ -1254,7 +1243,7 @@ BOOL SwGlobalTree::Update(BOOL bHard)
String sTemp = GetEntryText(pEntry);
if(eType != pRight->GetType() ||
eType == GLBLDOC_SECTION &&
- pLeft->GetSection()->GetName() != sTemp ||
+ (pLeft->GetSection()->GetSectionName() != sTemp) ||
eType == GLBLDOC_TOXBASE && pLeft->GetTOX()->GetTitle() != sTemp)
bCopy = bRet = TRUE;
}
@@ -1456,7 +1445,8 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
while ( nCount < nSectCount )
{
const SwSectionFmt& rFmt = rSh.GetSectionFmt(nCount);
- if ( rFmt.GetSection()->GetName() == sTempSectionName && rFmt.IsInNodesArr() )
+ if ((rFmt.GetSection()->GetSectionName() == sTempSectionName)
+ && rFmt.IsInNodesArr())
{
nCount = 0;
nAddNumber++;
@@ -1471,15 +1461,15 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
if ( nAddNumber )
sSectionName = sTempSectionName;
- SwSection aSection(CONTENT_SECTION, sSectionName);
- aSection.SetProtect(TRUE);
- aSection.SetHidden(FALSE);
+ SwSectionData aSectionData(CONTENT_SECTION, sSectionName);
+ aSectionData.SetProtectFlag(true);
+ aSectionData.SetHidden(false);
- aSection.SetLinkFileName(sFileName);
- aSection.SetType( FILE_LINK_SECTION);
- aSection.SetLinkFilePassWd( sFilePassword );
+ aSectionData.SetLinkFileName(sFileName);
+ aSectionData.SetType(FILE_LINK_SECTION);
+ aSectionData.SetLinkFilePassword( sFilePassword );
- rSh.InsertGlobalDocContent( *pAnchorContent, aSection );
+ rSh.InsertGlobalDocContent( *pAnchorContent, aSectionData );
}
if ( bMove )
{
diff --git a/sw/source/ui/vba/vbafind.cxx b/sw/source/ui/vba/vbafind.cxx
index 56c0e6a446..1af48f7c1e 100644
--- a/sw/source/ui/vba/vbafind.cxx
+++ b/sw/source/ui/vba/vbafind.cxx
@@ -80,13 +80,13 @@ void SwVbaFind::SetReplace( sal_Int32 type )
mnReplaceType = type;
mbReplace = sal_True;
}
-
+#ifdef TOMORROW
rtl::OUString SwVbaFind::ReplaceWildcards( const rtl::OUString& /*rText*/ ) throw ( uno::RuntimeException )
{
// TODO:
return rtl::OUString();
}
-
+#endif
uno::Reference< text::XTextRange > SwVbaFind::FindOneElement() throw ( uno::RuntimeException )
{
uno::Reference< text::XTextRange > xFoundOne;
diff --git a/sw/source/ui/vba/vbafind.hxx b/sw/source/ui/vba/vbafind.hxx
index 292d9292a7..c624a5aa7a 100644
--- a/sw/source/ui/vba/vbafind.hxx
+++ b/sw/source/ui/vba/vbafind.hxx
@@ -58,7 +58,9 @@ private:
void SetReplace( sal_Int32 type );
void SetReplaceWith( const rtl::OUString& rText ) throw ( css::uno::RuntimeException );
rtl::OUString GetReplaceWith() throw ( css::uno::RuntimeException );
+#ifdef TOMORROW
rtl::OUString ReplaceWildcards( const rtl::OUString& rText ) throw ( css::uno::RuntimeException );
+#endif
css::uno::Reference< css::text::XTextRange > FindOneElement() throw ( css::uno::RuntimeException );
sal_Bool SearchReplace() throw ( css::uno::RuntimeException );
diff --git a/sw/source/ui/vba/vbaheaderfooterhelper.cxx b/sw/source/ui/vba/vbaheaderfooterhelper.cxx
index 80ecd25123..d91f37a20d 100644
--- a/sw/source/ui/vba/vbaheaderfooterhelper.cxx
+++ b/sw/source/ui/vba/vbaheaderfooterhelper.cxx
@@ -155,7 +155,7 @@ sal_Bool HeaderFooterHelper::isEvenPagesFooter( const uno::Reference< frame::XMo
}
return sal_False;
}
-
+#ifdef TOMORROW
sal_Bool HeaderFooterHelper::isPrimaryHeader( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XText >& xCurrentText ) throw (uno::RuntimeException)
{
if( isHeader( xModel, xCurrentText ) )
@@ -173,3 +173,4 @@ sal_Bool HeaderFooterHelper::isPrimaryFooter( const uno::Reference< frame::XMode
}
return sal_False;
}
+#endif
diff --git a/sw/source/ui/vba/vbaheaderfooterhelper.hxx b/sw/source/ui/vba/vbaheaderfooterhelper.hxx
index b1bcfab09e..0e5fd4c450 100644
--- a/sw/source/ui/vba/vbaheaderfooterhelper.hxx
+++ b/sw/source/ui/vba/vbaheaderfooterhelper.hxx
@@ -42,8 +42,10 @@ public:
static sal_Bool isFooter( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException);
static sal_Bool isFirstPageFooter( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException);
static sal_Bool isEvenPagesFooter( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException);
+#ifdef TOMORROW
static sal_Bool isPrimaryHeader( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException);
static sal_Bool isPrimaryFooter( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException);
+#endif
};
#endif
diff --git a/sw/source/ui/vba/vbarange.cxx b/sw/source/ui/vba/vbarange.cxx
index 02427c984e..d6f719dd0b 100644
--- a/sw/source/ui/vba/vbarange.cxx
+++ b/sw/source/ui/vba/vbarange.cxx
@@ -84,13 +84,13 @@ SwVbaRange::getXTextRange() throw (uno::RuntimeException)
uno::Reference< text::XTextRange > xTextRange( mxTextCursor, uno::UNO_QUERY_THROW );
return xTextRange;
}
-
+#ifdef TOMORROW
void SwVbaRange::setXTextRange( const uno::Reference< text::XTextRange >& xRange ) throw (uno::RuntimeException)
{
mxTextCursor->gotoRange( xRange->getStart(), sal_False );
mxTextCursor->gotoRange( xRange->getEnd(), sal_True );
}
-
+#endif
/**
* The complexity in this method is because we need to workaround
* an issue that the last paragraph in a document does not have a trailing CRLF.
diff --git a/sw/source/ui/vba/vbarange.hxx b/sw/source/ui/vba/vbarange.hxx
index cbb9941100..ca3a4ea21b 100644
--- a/sw/source/ui/vba/vbarange.hxx
+++ b/sw/source/ui/vba/vbarange.hxx
@@ -56,7 +56,9 @@ public:
css::uno::Reference< css::text::XTextDocument > getDocument() { return mxTextDocument; }
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getXTextRange() throw (css::uno::RuntimeException);
+#ifdef TOMORROW
void setXTextRange( const css::uno::Reference< css::text::XTextRange >& xRange ) throw (css::uno::RuntimeException);
+#endif
css::uno::Reference< css::text::XText > getXText() { return mxText; }
void setXTextCursor( const css::uno::Reference< css::text::XTextCursor >& xTextCursor ) { mxTextCursor = xTextCursor; }
diff --git a/sw/source/ui/vba/vbasystem.cxx b/sw/source/ui/vba/vbasystem.cxx
index 1a03c99b84..66e5d1fd4c 100644
--- a/sw/source/ui/vba/vbasystem.cxx
+++ b/sw/source/ui/vba/vbasystem.cxx
@@ -37,11 +37,6 @@
using namespace ::ooo::vba;
using namespace ::com::sun::star;
-PrivateProfileStringListener::PrivateProfileStringListener( const rtl::OUString& rFileName, const ByteString& rGroupName, const ByteString& rKey )
- :maFileName( rFileName ), maGroupName( rGroupName ), maKey( rKey )
-{
-}
-
PrivateProfileStringListener::~PrivateProfileStringListener()
{
}
diff --git a/sw/source/ui/vba/vbasystem.hxx b/sw/source/ui/vba/vbasystem.hxx
index 3745bf96eb..df548a76a5 100644
--- a/sw/source/ui/vba/vbasystem.hxx
+++ b/sw/source/ui/vba/vbasystem.hxx
@@ -42,7 +42,6 @@ private:
ByteString maKey;
public:
PrivateProfileStringListener(){};
- PrivateProfileStringListener( const rtl::OUString& rFileName, const ByteString& rGroupName, const ByteString& rKey );
virtual ~PrivateProfileStringListener();
void Initialize( const rtl::OUString& rFileName, const ByteString& rGroupName, const ByteString& rKey );
diff --git a/sw/source/ui/vba/vbawindow.cxx b/sw/source/ui/vba/vbawindow.cxx
index 255df83b4e..dc5913aaa1 100644
--- a/sw/source/ui/vba/vbawindow.cxx
+++ b/sw/source/ui/vba/vbawindow.cxx
@@ -39,11 +39,6 @@ SwVbaWindow::SwVbaWindow( const uno::Reference< XHelperInterface >& xParent, con
{
}
-SwVbaWindow::SwVbaWindow( uno::Sequence< uno::Any > const & args, uno::Reference< uno::XComponentContext > const & xContext )
- : WindowImpl_BASE( args, xContext )
-{
-}
-
void
SwVbaWindow::Activate() throw (css::uno::RuntimeException)
{
diff --git a/sw/source/ui/vba/vbawindow.hxx b/sw/source/ui/vba/vbawindow.hxx
index a32dbcab4a..1ef1ff9141 100644
--- a/sw/source/ui/vba/vbawindow.hxx
+++ b/sw/source/ui/vba/vbawindow.hxx
@@ -39,7 +39,6 @@ class SwVbaWindow : public WindowImpl_BASE
{
public:
SwVbaWindow( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::frame::XModel >& xModel );
- SwVbaWindow( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext > const& xContext );
// Attributes
diff --git a/sw/source/ui/vba/vbawrapformat.cxx b/sw/source/ui/vba/vbawrapformat.cxx
index 4b711f1b2b..84cef6c251 100644
--- a/sw/source/ui/vba/vbawrapformat.cxx
+++ b/sw/source/ui/vba/vbawrapformat.cxx
@@ -34,11 +34,6 @@
using namespace ooo::vba;
using namespace com::sun::star;
-SwVbaWrapFormat::SwVbaWrapFormat( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape > xShape ) : SwVbaWrapFormat_BASE( xParent, xContext ), m_xShape( xShape ), mnWrapFormatType( 0 ), mnSide( word::WdWrapSideType::wdWrapBoth )
-{
- m_xPropertySet.set( xShape, uno::UNO_QUERY_THROW );
-}
-
SwVbaWrapFormat::SwVbaWrapFormat( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& xContext ) : SwVbaWrapFormat_BASE( getXSomethingFromArgs< XHelperInterface >( aArgs, 0 ), xContext ), m_xShape( getXSomethingFromArgs< drawing::XShape >( aArgs, 1, false ) ), mnWrapFormatType( 0 ), mnSide( word::WdWrapSideType::wdWrapBoth )
{
m_xPropertySet.set( m_xShape, uno::UNO_QUERY_THROW );
diff --git a/sw/source/ui/vba/vbawrapformat.hxx b/sw/source/ui/vba/vbawrapformat.hxx
index 9980d4999c..1ee8eb7a4c 100644
--- a/sw/source/ui/vba/vbawrapformat.hxx
+++ b/sw/source/ui/vba/vbawrapformat.hxx
@@ -47,7 +47,6 @@ private:
void setDistance( const rtl::OUString& sName, float _distance ) throw (css::uno::RuntimeException);
public:
- SwVbaWrapFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape > xShape );
SwVbaWrapFormat( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext );
virtual ::sal_Int32 SAL_CALL getType() throw (css::uno::RuntimeException);
diff --git a/sw/source/ui/web/web.src b/sw/source/ui/web/web.src
index 8485ae0e80..08b6707962 100644
--- a/sw/source/ui/web/web.src
+++ b/sw/source/ui/web/web.src
@@ -138,8 +138,8 @@ ToolBox RID_WEBTOOLS_TOOLBOX
};
ToolBoxItem
{
- Identifier = FN_THESAURUS_DLG;
- HelpID = FN_THESAURUS_DLG;
+ Identifier = SID_THESAURUS;
+ HelpID = SID_THESAURUS;
Hide = TRUE;
};
ToolBoxItem
diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx
index e86845f348..b3087f78fb 100644
--- a/sw/source/ui/wrtsh/wrtsh1.cxx
+++ b/sw/source/ui/wrtsh/wrtsh1.cxx
@@ -1387,7 +1387,20 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
// <--
if ( ( nTxtNodeIndent + nWidthOfTabs ) != 0 )
{
- const SwTwips nIndentChange = nTxtNodeIndent + nWidthOfTabs;
+ // --> OD 2010-05-05 #i111172#
+ // If text node is already inside a list, assure that the indents
+ // are the same. Thus, adjust the indent change value by subtracting
+ // indents of to be applied list style.
+ SwTwips nIndentChange = nTxtNodeIndent + nWidthOfTabs;
+ if ( pTxtNode->GetNumRule() )
+ {
+ const SwNumFmt aFmt( aNumRule.Get( 0 ) );
+ if ( aFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
+ {
+ nIndentChange -= aFmt.GetIndentAt() + aFmt.GetFirstLineIndent();
+ }
+ }
+ // <--
aNumRule.ChangeIndent( nIndentChange );
}
}
@@ -1476,7 +1489,7 @@ SelectionType SwWrtShell::GetSelectionType() const
// return nsSelectionType::SEL_TBL | nsSelectionType::SEL_TBL_CELLS;
SwView &_rView = ((SwView&)GetView());
- if (_rView.GetPostItMgr() && _rView.GetPostItMgr()->GetActivePostIt() )
+ if (_rView.GetPostItMgr() && _rView.GetPostItMgr()->HasActiveSidebarWin() )
return nsSelectionType::SEL_POSTIT;
int nCnt;
@@ -1808,7 +1821,7 @@ BOOL SwWrtShell::Pop( BOOL bOldCrsr )
--------------------------------------------------------------------*/
BOOL SwWrtShell::CanInsert()
{
- return (!(IsSelFrmMode() | IsObjSelected() | (GetView().GetDrawFuncPtr() != NULL) | (GetView().GetPostItMgr()->GetActivePostIt()!= NULL)));
+ return (!(IsSelFrmMode() | IsObjSelected() | (GetView().GetDrawFuncPtr() != NULL) | (GetView().GetPostItMgr()->GetActiveSidebarWin()!= NULL)));
}
// die Core erzeugt eine Selektion, das SttSelect muss gerufen werden
diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx
index e3752b9c36..ac874a9791 100644
--- a/sw/source/ui/wrtsh/wrtsh2.cxx
+++ b/sw/source/ui/wrtsh/wrtsh2.cxx
@@ -468,20 +468,20 @@ void SwWrtShell::NavigatorPaste( const NaviContentBookmark& rBkmk,
}
else
{
- SwSection aSection( FILE_LINK_SECTION, GetUniqueSectionName( 0 ) );
+ SwSectionData aSection( FILE_LINK_SECTION, GetUniqueSectionName( 0 ) );
String aLinkFile( rBkmk.GetURL().GetToken(0, '#') );
aLinkFile += sfx2::cTokenSeperator;
aLinkFile += sfx2::cTokenSeperator;
aLinkFile += rBkmk.GetURL().GetToken(1, '#');
aSection.SetLinkFileName( aLinkFile );
- aSection.SetProtect( TRUE );
+ aSection.SetProtectFlag( true );
const SwSection* pIns = InsertSection( aSection );
if( EXCHG_IN_ACTION_MOVE == nAction && pIns )
{
- aSection = *pIns;
+ aSection = SwSectionData(*pIns);
aSection.SetLinkFileName( aEmptyStr );
aSection.SetType( CONTENT_SECTION );
- aSection.SetProtect( FALSE );
+ aSection.SetProtectFlag( false );
// the update of content from linked section at time delete
// the undostack. Then the change of the section dont create
@@ -489,7 +489,7 @@ void SwWrtShell::NavigatorPaste( const NaviContentBookmark& rBkmk,
BOOL bDoesUndo = DoesUndo();
if( UNDO_INSSECTION != GetUndoIds() )
DoUndo( FALSE );
- ChgSection( GetSectionFmtPos( *pIns->GetFmt() ), aSection );
+ UpdateSection( GetSectionFmtPos( *pIns->GetFmt() ), aSection );
DoUndo( bDoesUndo );
}
}
diff --git a/sw/uiconfig/sglobal/accelerator/de/default.xml b/sw/uiconfig/sglobal/accelerator/de/default.xml
deleted file mode 100644
index b134a2a41a..0000000000
--- a/sw/uiconfig/sglobal/accelerator/de/default.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_K" accel:shift="true" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_U" accel:shift="true" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_B" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_G" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_H" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_T" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/sglobal/accelerator/en-GB/default.xml b/sw/uiconfig/sglobal/accelerator/en-GB/default.xml
deleted file mode 100644
index c07ff3fcf0..0000000000
--- a/sw/uiconfig/sglobal/accelerator/en-GB/default.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_I" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_B" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_U" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_X" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveDirectCharFormats"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_C" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/sglobal/accelerator/en-US/default.xml b/sw/uiconfig/sglobal/accelerator/en-US/default.xml
deleted file mode 100644
index c07ff3fcf0..0000000000
--- a/sw/uiconfig/sglobal/accelerator/en-US/default.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_I" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_B" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_U" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_X" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveDirectCharFormats"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_C" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/sglobal/accelerator/es/default.xml b/sw/uiconfig/sglobal/accelerator/es/default.xml
deleted file mode 100644
index 42b11d834e..0000000000
--- a/sw/uiconfig/sglobal/accelerator/es/default.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_K" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_S" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_T" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/sglobal/accelerator/fr/default.xml b/sw/uiconfig/sglobal/accelerator/fr/default.xml
deleted file mode 100644
index 4ee8b9e2a1..0000000000
--- a/sw/uiconfig/sglobal/accelerator/fr/default.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_I" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_G" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_U" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/sglobal/menubar/menubar.xml b/sw/uiconfig/sglobal/menubar/menubar.xml
index 4b46f4d46a..c3bef67c8c 100644
--- a/sw/uiconfig/sglobal/menubar/menubar.xml
+++ b/sw/uiconfig/sglobal/menubar/menubar.xml
@@ -1,457 +1,461 @@
<?xml version="1.0" encoding="UTF-8"?>
<menu:menubar xmlns:menu="http://openoffice.org/2001/menu" menu:id="menubar">
- <menu:menu menu:id=".uno:PickList">
+ <menu:menu menu:id=".uno:PickList">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:AddDirect"/>
+ <menu:menuitem menu:id=".uno:Open"/>
+ <menu:menuitem menu:id=".uno:RecentFileList"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AutoPilotMenu"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:CloseDoc"/>
+ <menu:menuitem menu:id=".uno:Save"/>
+ <menu:menuitem menu:id=".uno:SaveAs"/>
+ <menu:menuitem menu:id=".uno:SaveAll"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Reload"/>
+ <menu:menuitem menu:id=".uno:VersionDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ExportTo"/>
+ <menu:menuitem menu:id=".uno:ExportToPDF"/>
+ <menu:menu menu:id=".uno:SendToMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:AddDirect"/>
- <menu:menuitem menu:id=".uno:Open"/>
- <menu:menuitem menu:id=".uno:RecentFileList"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AutoPilotMenu"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:CloseDoc"/>
- <menu:menuitem menu:id=".uno:Save"/>
- <menu:menuitem menu:id=".uno:SaveAs"/>
- <menu:menuitem menu:id=".uno:SaveAll"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Reload"/>
- <menu:menuitem menu:id=".uno:VersionDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ExportTo"/>
- <menu:menuitem menu:id=".uno:ExportToPDF"/>
- <menu:menu menu:id=".uno:SendToMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SendMail"/>
- <menu:menuitem menu:id=".uno:SendMailDocAsPDF"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:NewGlobalDoc"/>
- <menu:menuitem menu:id=".uno:NewHtmlDoc"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SendOutlineToStarImpress"/>
- <menu:menuitem menu:id=".uno:SendOutlineToClipboard"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:CreateAbstract"/>
- <menu:menuitem menu:id=".uno:SendAbstractToStarImpress"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SetDocumentProperties"/>
- <menu:menu menu:id=".uno:TemplateMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:Organizer"/>
- <menu:menuitem menu:id=".uno:AddressBookSource"/>
- <menu:menuitem menu:id=".uno:SaveAsTemplate"/>
- <menu:menuitem menu:id=".uno:OpenTemplate"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:WebHtml"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:PrintPreview"/>
- <menu:menuitem menu:id=".uno:Print"/>
- <menu:menuitem menu:id=".uno:PrinterSetup"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Quit"/>
+ <menu:menuitem menu:id=".uno:SendMail"/>
+ <menu:menuitem menu:id=".uno:SendMailDocAsPDF"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:NewGlobalDoc"/>
+ <menu:menuitem menu:id=".uno:NewHtmlDoc"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SendOutlineToStarImpress"/>
+ <menu:menuitem menu:id=".uno:SendOutlineToClipboard"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:CreateAbstract"/>
+ <menu:menuitem menu:id=".uno:SendAbstractToStarImpress"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:EditMenu">
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SetDocumentProperties"/>
+ <menu:menu menu:id=".uno:TemplateMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:Undo"/>
- <menu:menuitem menu:id=".uno:Redo"/>
- <menu:menuitem menu:id=".uno:Repeat"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Cut"/>
- <menu:menuitem menu:id=".uno:Copy"/>
- <menu:menuitem menu:id=".uno:Paste"/>
- <menu:menuitem menu:id=".uno:PasteSpecial"/>
- <menu:menu menu:id=".uno:SelectionModeMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SelectionModeDefault"/>
- <menu:menuitem menu:id=".uno:SelectionModeBlock"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:SelectTextMode"/>
- <menu:menuitem menu:id=".uno:SelectAll"/>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:ChangesMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:TrackChanges"/>
- <menu:menuitem menu:id=".uno:ProtectTraceChangeMode"/>
- <menu:menuitem menu:id=".uno:ShowTrackedChanges"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AcceptTrackedChanges"/>
- <menu:menuitem menu:id=".uno:CommentChangeTracking"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MergeDocuments"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:CompareDocuments"/>
- <menu:menuitem menu:id=".uno:SearchDialog"/>
- <menu:menuitem menu:id=".uno:EditGlossary"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ChangeDatabaseField"/>
- <menu:menuitem menu:id=".uno:FieldDialog"/>
- <menu:menuitem menu:id=".uno:EditFootnote"/>
- <menu:menuitem menu:id=".uno:IndexEntryDialog"/>
- <menu:menuitem menu:id=".uno:AuthoritiesEntryDialog"/>
- <menu:menuitem menu:id=".uno:EditHyperlink"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:LinkDialog"/>
- <menu:menuitem menu:id=".uno:PlugInsActive"/>
- <menu:menuitem menu:id=".uno:ImageMapDialog"/>
- <menu:menuitem menu:id=".uno:ObjectMenue"/>
+ <menu:menuitem menu:id=".uno:Organizer"/>
+ <menu:menuitem menu:id=".uno:AddressBookSource"/>
+ <menu:menuitem menu:id=".uno:SaveAsTemplate"/>
+ <menu:menuitem menu:id=".uno:OpenTemplate"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ViewMenu">
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:WebHtml"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:PrintPreview"/>
+ <menu:menuitem menu:id=".uno:Print"/>
+ <menu:menuitem menu:id=".uno:PrinterSetup"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Quit"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:EditMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:Undo"/>
+ <menu:menuitem menu:id=".uno:Redo"/>
+ <menu:menuitem menu:id=".uno:Repeat"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Cut"/>
+ <menu:menuitem menu:id=".uno:Copy"/>
+ <menu:menuitem menu:id=".uno:Paste"/>
+ <menu:menuitem menu:id=".uno:PasteSpecial"/>
+ <menu:menu menu:id=".uno:SelectionModeMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:PrintLayout"/>
- <menu:menuitem menu:id=".uno:BrowseView"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AvailableToolbars"/>
- <menu:menuitem menu:id=".uno:StatusBarVisible"/>
- <menu:menuitem menu:id=".uno:ShowImeStatusWindow"/>
- <menu:menuitem menu:id=".uno:Ruler"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ViewBounds"/>
- <menu:menuitem menu:id=".uno:Marks"/>
- <menu:menuitem menu:id=".uno:Fieldnames"/>
- <menu:menuitem menu:id=".uno:ControlCodes"/>
- <menu:menuitem menu:id=".uno:ShowHiddenParagraphs"/>
- <menu:menuitem menu:id=".uno:ShowAnnotations"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ViewDataSourceBrowser"/>
- <menu:menuitem menu:id=".uno:Navigator"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:FullScreen"/>
- <menu:menuitem menu:id=".uno:Zoom"/>
+ <menu:menuitem menu:id=".uno:SelectionModeDefault" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SelectionModeBlock" menu:style="radio"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:InsertMenu">
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:SelectTextMode"/>
+ <menu:menuitem menu:id=".uno:SelectAll"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:ChangesMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertBreak"/>
- <menu:menu menu:id=".uno:FieldMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertDateField"/>
- <menu:menuitem menu:id=".uno:InsertTimeField"/>
- <menu:menuitem menu:id=".uno:InsertPageNumberField"/>
- <menu:menuitem menu:id=".uno:InsertPageCountField"/>
- <menu:menuitem menu:id=".uno:InsertTopicField"/>
- <menu:menuitem menu:id=".uno:InsertTitleField"/>
- <menu:menuitem menu:id=".uno:InsertAuthorField"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertField"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:InsertSymbol"/>
- <menu:menu menu:id=".uno:FormattingMarkMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertNonBreakingSpace"/>
- <menu:menuitem menu:id=".uno:InsertHardHyphen"/>
- <menu:menuitem menu:id=".uno:InsertSoftHyphen"/>
- <menu:menuitem menu:id=".uno:InsertZWSP"/>
- <menu:menuitem menu:id=".uno:InsertZWNBSP"/>
- <menu:menuitem menu:id=".uno:InsertLRM"/>
- <menu:menuitem menu:id=".uno:InsertRLM"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertSection"/>
- <menu:menuitem menu:id=".uno:HyperlinkDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertPageHeader"/>
- <menu:menuitem menu:id=".uno:InsertPageFooter"/>
- <menu:menuitem menu:id=".uno:InsertFootnoteDialog"/>
- <menu:menuitem menu:id=".uno:InsertCaptionDialog"/>
- <menu:menuitem menu:id=".uno:InsertBookmark"/>
- <menu:menuitem menu:id=".uno:InsertReferenceField"/>
- <menu:menuitem menu:id=".uno:InsertAnnotation"/>
- <menu:menuitem menu:id=".uno:InsertScript"/>
- <menu:menu menu:id=".uno:IndexesMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertIndexesEntry"/>
- <menu:menuitem menu:id=".uno:InsertMultiIndex"/>
- <menu:menuitem menu:id=".uno:InsertAuthoritiesEntry"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertEnvelope"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertFrame"/>
- <menu:menuitem menu:id=".uno:InsertTable"/>
- <menu:menuitem menu:id=".uno:InsertGraphicRuler"/>
- <menu:menu menu:id=".uno:GraphicMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertGraphic"/>
- <menu:menu menu:id=".uno:Scan">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:TwainSelect"/>
- <menu:menuitem menu:id=".uno:TwainTransfer"/>
- </menu:menupopup>
- </menu:menu>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:InsertAVMedia"/>
- <menu:menu menu:id=".uno:ObjectMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertObject"/>
- <menu:menuitem menu:id=".uno:InsertPlugin"/>
- <menu:menuitem menu:id=".uno:InsertSound"/>
- <menu:menuitem menu:id=".uno:InsertVideo"/>
- <menu:menuitem menu:id=".uno:InsertObjectStarMath"/>
- <menu:menuitem menu:id=".uno:InsertObjectChart"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:InsertObjectFloatingFrame"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertDoc"/>
+ <menu:menuitem menu:id=".uno:TrackChanges"/>
+ <menu:menuitem menu:id=".uno:ProtectTraceChangeMode"/>
+ <menu:menuitem menu:id=".uno:ShowTrackedChanges"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AcceptTrackedChanges"/>
+ <menu:menuitem menu:id=".uno:CommentChangeTracking"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MergeDocuments"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:FormatMenu">
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:CompareDocuments"/>
+ <menu:menuitem menu:id=".uno:SearchDialog"/>
+ <menu:menuitem menu:id=".uno:EditGlossary"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ChangeDatabaseField"/>
+ <menu:menuitem menu:id=".uno:FieldDialog"/>
+ <menu:menuitem menu:id=".uno:EditFootnote"/>
+ <menu:menuitem menu:id=".uno:IndexEntryDialog"/>
+ <menu:menuitem menu:id=".uno:AuthoritiesEntryDialog"/>
+ <menu:menuitem menu:id=".uno:EditHyperlink"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:LinkDialog"/>
+ <menu:menuitem menu:id=".uno:PlugInsActive"/>
+ <menu:menuitem menu:id=".uno:ImageMapDialog"/>
+ <menu:menuitem menu:id=".uno:ObjectMenue"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ViewMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:PrintLayout"/>
+ <menu:menuitem menu:id=".uno:BrowseView"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AvailableToolbars"/>
+ <menu:menuitem menu:id=".uno:StatusBarVisible"/>
+ <menu:menuitem menu:id=".uno:ShowImeStatusWindow"/>
+ <menu:menuitem menu:id=".uno:Ruler"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ViewBounds"/>
+ <menu:menuitem menu:id=".uno:Marks"/>
+ <menu:menuitem menu:id=".uno:Fieldnames"/>
+ <menu:menuitem menu:id=".uno:ControlCodes"/>
+ <menu:menuitem menu:id=".uno:ShowHiddenParagraphs"/>
+ <menu:menuitem menu:id=".uno:ShowAnnotations"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ViewDataSourceBrowser"/>
+ <menu:menuitem menu:id=".uno:Navigator"/>
+ <menu:menuitem menu:id=".uno:TaskPane"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FullScreen"/>
+ <menu:menuitem menu:id=".uno:Zoom"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:InsertMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:InsertBreak"/>
+ <menu:menu menu:id=".uno:FieldMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:ResetAttributes"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:FontDialog"/>
- <menu:menuitem menu:id=".uno:ParagraphDialog"/>
- <menu:menuitem menu:id=".uno:BulletsAndNumberingDialog"/>
- <menu:menuitem menu:id=".uno:PageDialog"/>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:TransliterateMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:RubyDialog"/>
- <menu:menuitem menu:id=".uno:FormatColumns"/>
- <menu:menuitem menu:id=".uno:EditRegion"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:DesignerDialog"/>
- <menu:menu menu:id=".uno:AutoFormatMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:OnlineAutoFormat"/>
- <menu:menuitem menu:id=".uno:AutoFormatApply"/>
- <menu:menuitem menu:id=".uno:AutoFormatRedlineApply"/>
- <menu:menuitem menu:id=".uno:AutoCorrectDlg"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:AnchorMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SetAnchorToPage"/>
- <menu:menuitem menu:id=".uno:SetAnchorToPara"/>
- <menu:menuitem menu:id=".uno:SetAnchorAtChar"/>
- <menu:menuitem menu:id=".uno:SetAnchorToChar"/>
- <menu:menuitem menu:id=".uno:SetAnchorToFrame"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:WrapMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:WrapOff"/>
- <menu:menuitem menu:id=".uno:WrapOn"/>
- <menu:menuitem menu:id=".uno:WrapIdeal"/>
- <menu:menuitem menu:id=".uno:WrapThrough"/>
- <menu:menuitem menu:id=".uno:WrapThroughTransparent"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:WrapContour"/>
- <menu:menuitem menu:id=".uno:ContourDialog"/>
- <menu:menuitem menu:id=".uno:WrapAnchorOnly"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:TextWrap"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ObjectAlign">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:CommonAlignLeft"/>
- <menu:menuitem menu:id=".uno:CommonAlignHorizontalCenter"/>
- <menu:menuitem menu:id=".uno:CommonAlignRight"/>
- <menu:menuitem menu:id=".uno:CommonAlignJustified"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:CommonAlignTop"/>
- <menu:menuitem menu:id=".uno:CommonAlignVerticalCenter"/>
- <menu:menuitem menu:id=".uno:CommonAlignBottom"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ArrangeMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:BringToFront"/>
- <menu:menuitem menu:id=".uno:ObjectForwardOne"/>
- <menu:menuitem menu:id=".uno:ObjectBackOne"/>
- <menu:menuitem menu:id=".uno:SendToBack"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SetObjectToForeground"/>
- <menu:menuitem menu:id=".uno:SetObjectToBackground"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:FlipMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:FlipHorizontal"/>
- <menu:menuitem menu:id=".uno:FlipVertical"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:GroupMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:FormatGroup"/>
- <menu:menuitem menu:id=".uno:FormatUngroup"/>
- <menu:menuitem menu:id=".uno:EnterGroup"/>
- <menu:menuitem menu:id=".uno:LeaveGroup"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:ObjectMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:TransformDialog"/>
- <menu:menuitem menu:id=".uno:FormatLine"/>
- <menu:menuitem menu:id=".uno:FormatArea"/>
- <menu:menuitem menu:id=".uno:TextAttributes"/>
- <menu:menuitem menu:id=".uno:FontWork"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ObjectTitleDescription"/>
- <menu:menuitem menu:id=".uno:NameGroup"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:FrameDialog"/>
- <menu:menuitem menu:id=".uno:GraphicDialog"/>
+ <menu:menuitem menu:id=".uno:InsertDateField"/>
+ <menu:menuitem menu:id=".uno:InsertTimeField"/>
+ <menu:menuitem menu:id=".uno:InsertPageNumberField"/>
+ <menu:menuitem menu:id=".uno:InsertPageCountField"/>
+ <menu:menuitem menu:id=".uno:InsertTopicField"/>
+ <menu:menuitem menu:id=".uno:InsertTitleField"/>
+ <menu:menuitem menu:id=".uno:InsertAuthorField"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertField"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:TableMenu">
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:InsertSymbol"/>
+ <menu:menu menu:id=".uno:FormattingMarkMenu">
<menu:menupopup>
- <menu:menu menu:id=".uno:TableInsertMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertTable"/>
- <menu:menuitem menu:id=".uno:InsertRowDialog"/>
- <menu:menuitem menu:id=".uno:InsertColumnDialog"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:TableDeleteMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:DeleteTable"/>
- <menu:menuitem menu:id=".uno:DeleteRows"/>
- <menu:menuitem menu:id=".uno:DeleteColumns"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:TableSelectMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SelectTable"/>
- <menu:menuitem menu:id=".uno:EntireRow"/>
- <menu:menuitem menu:id=".uno:EntireColumn"/>
- <menu:menuitem menu:id=".uno:EntireCell"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:MergeCells"/>
- <menu:menuitem menu:id=".uno:SplitCell"/>
- <menu:menuitem menu:id=".uno:Protect"/>
- <menu:menuitem menu:id=".uno:MergeTable"/>
- <menu:menuitem menu:id=".uno:SplitTable"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AutoFormat"/>
- <menu:menu menu:id=".uno:TableAutoFitMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SetColumnWidth"/>
- <menu:menuitem menu:id=".uno:SetOptimalColumnWidth"/>
- <menu:menuitem menu:id=".uno:DistributeColumns"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SetRowHeight"/>
- <menu:menuitem menu:id=".uno:SetOptimalRowHeight"/>
- <menu:menuitem menu:id=".uno:DistributeRows"/>
- <menu:menuitem menu:id=".uno:RowSplit"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:HeadingRowsRepeat"/>
- <menu:menu menu:id=".uno:TableConvertMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:ConvertTextToTable"/>
- <menu:menuitem menu:id=".uno:ConvertTableToText"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:TableSort"/>
- <menu:menuitem menu:id=".uno:InsertFormula"/>
- <menu:menuitem menu:id=".uno:TableNumberFormatDialog"/>
- <menu:menuitem menu:id=".uno:TableBoundaries"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:TableDialog"/>
+ <menu:menuitem menu:id=".uno:InsertNonBreakingSpace"/>
+ <menu:menuitem menu:id=".uno:InsertHardHyphen"/>
+ <menu:menuitem menu:id=".uno:InsertSoftHyphen"/>
+ <menu:menuitem menu:id=".uno:InsertZWSP"/>
+ <menu:menuitem menu:id=".uno:InsertZWNBSP"/>
+ <menu:menuitem menu:id=".uno:InsertLRM"/>
+ <menu:menuitem menu:id=".uno:InsertRLM"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ToolsMenu">
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertSection"/>
+ <menu:menuitem menu:id=".uno:HyperlinkDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertPageHeader"/>
+ <menu:menuitem menu:id=".uno:InsertPageFooter"/>
+ <menu:menuitem menu:id=".uno:InsertFootnoteDialog"/>
+ <menu:menuitem menu:id=".uno:InsertCaptionDialog"/>
+ <menu:menuitem menu:id=".uno:InsertBookmark"/>
+ <menu:menuitem menu:id=".uno:InsertReferenceField"/>
+ <menu:menuitem menu:id=".uno:InsertAnnotation"/>
+ <menu:menuitem menu:id=".uno:InsertScript"/>
+ <menu:menu menu:id=".uno:IndexesMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:SpellingAndGrammarDialog"/>
- <menu:menu menu:id=".uno:LanguageMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SetLanguageSelectionMenu"/>
- <menu:menuitem menu:id=".uno:SetLanguageParagraphMenu"/>
- <menu:menuitem menu:id=".uno:SetLanguageAllTextMenu"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HangulHanjaConversion"/>
- <menu:menuitem menu:id=".uno:ChineseConversion"/>
- <menu:menuitem menu:id=".uno:ThesaurusDialog"/>
- <menu:menuitem menu:id=".uno:Hyphenate"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MoreDictionaries"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:WordCountDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ChapterNumberingDialog"/>
- <menu:menuitem menu:id=".uno:LineNumberingDialog"/>
- <menu:menuitem menu:id=".uno:FootnoteDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Gallery"/>
- <menu:menuitem menu:id=".uno:AVMediaPlayer"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:BibliographyComponent"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MergeDocuments"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SortDialog"/>
- <menu:menuitem menu:id=".uno:CalculateSel"/>
- <menu:menu menu:id=".uno:UpdateMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:UpdateAll"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:UpdateFields"/>
- <menu:menuitem menu:id=".uno:UpdateAllLinks"/>
- <menu:menuitem menu:id=".uno:UpdateCharts"/>
- <menu:menuitem menu:id=".uno:UpdateCurIndex"/>
- <menu:menuitem menu:id=".uno:UpdateAllIndexes"/>
- <menu:menuitem menu:id=".uno:Repaginate"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:MacrosMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:MacroRecorder"/>
- <menu:menuitem menu:id=".uno:RunMacro"/>
- <menu:menu menu:id=".uno:ScriptOrganizer"/>
- <menu:menuitem menu:id=".uno:MacroSignature"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MacroOrganizer?TabId:short=1"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id="service:com.sun.star.deployment.ui.PackageManagerDialog"/>
- <menu:menuitem menu:id=".uno:OpenXMLFilterSettings"/>
- <menu:menuitem menu:id=".uno:AutoCorrectDlg"/>
- <menu:menuitem menu:id=".uno:ConfigureDialog"/>
- <menu:menuitem menu:id=".uno:OptionsTreeDialog"/>
+ <menu:menuitem menu:id=".uno:InsertIndexesEntry"/>
+ <menu:menuitem menu:id=".uno:InsertMultiIndex"/>
+ <menu:menuitem menu:id=".uno:InsertAuthoritiesEntry"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:WindowList">
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertEnvelope"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertFrame"/>
+ <menu:menuitem menu:id=".uno:InsertTable"/>
+ <menu:menuitem menu:id=".uno:InsertGraphicRuler"/>
+ <menu:menu menu:id=".uno:GraphicMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:NewWindow"/>
- <menu:menuitem menu:id=".uno:CloseWin"/>
- <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertGraphic"/>
+ <menu:menu menu:id=".uno:Scan">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:TwainSelect"/>
+ <menu:menuitem menu:id=".uno:TwainTransfer"/>
+ </menu:menupopup>
+ </menu:menu>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:HelpMenu">
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:InsertAVMedia"/>
+ <menu:menu menu:id=".uno:ObjectMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:HelpIndex"/>
- <menu:menuitem menu:id=".uno:ExtendedHelp"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HelpSupport"/>
- <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:About"/>
+ <menu:menuitem menu:id=".uno:InsertObject"/>
+ <menu:menuitem menu:id=".uno:InsertPlugin"/>
+ <menu:menuitem menu:id=".uno:InsertSound"/>
+ <menu:menuitem menu:id=".uno:InsertVideo"/>
+ <menu:menuitem menu:id=".uno:InsertObjectStarMath"/>
+ <menu:menuitem menu:id=".uno:InsertObjectChart"/>
</menu:menupopup>
- </menu:menu>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:InsertObjectFloatingFrame"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertDoc"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:FormatMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:ResetAttributes"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FontDialog"/>
+ <menu:menuitem menu:id=".uno:ParagraphDialog"/>
+ <menu:menuitem menu:id=".uno:BulletsAndNumberingDialog"/>
+ <menu:menuitem menu:id=".uno:PageDialog"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:TransliterateMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:ChangeCaseToSentenceCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToTitleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToToggleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:RubyDialog"/>
+ <menu:menuitem menu:id=".uno:FormatColumns"/>
+ <menu:menuitem menu:id=".uno:EditRegion"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:DesignerDialog"/>
+ <menu:menu menu:id=".uno:AutoFormatMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:OnlineAutoFormat"/>
+ <menu:menuitem menu:id=".uno:AutoFormatApply"/>
+ <menu:menuitem menu:id=".uno:AutoFormatRedlineApply"/>
+ <menu:menuitem menu:id=".uno:AutoCorrectDlg"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:AnchorMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SetAnchorToPage" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetAnchorToPara" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetAnchorAtChar" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetAnchorToChar" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetAnchorToFrame" menu:style="radio"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:WrapMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:WrapOff"/>
+ <menu:menuitem menu:id=".uno:WrapOn"/>
+ <menu:menuitem menu:id=".uno:WrapIdeal"/>
+ <menu:menuitem menu:id=".uno:WrapThrough"/>
+ <menu:menuitem menu:id=".uno:WrapThroughTransparent"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:WrapContour"/>
+ <menu:menuitem menu:id=".uno:ContourDialog"/>
+ <menu:menuitem menu:id=".uno:WrapAnchorOnly"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:TextWrap"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ObjectAlign">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:CommonAlignLeft" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:CommonAlignHorizontalCenter" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:CommonAlignRight" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:CommonAlignJustified" menu:style="radio"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:CommonAlignTop"/>
+ <menu:menuitem menu:id=".uno:CommonAlignVerticalCenter"/>
+ <menu:menuitem menu:id=".uno:CommonAlignBottom"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ArrangeMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:BringToFront"/>
+ <menu:menuitem menu:id=".uno:ObjectForwardOne"/>
+ <menu:menuitem menu:id=".uno:ObjectBackOne"/>
+ <menu:menuitem menu:id=".uno:SendToBack"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SetObjectToForeground"/>
+ <menu:menuitem menu:id=".uno:SetObjectToBackground"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:FlipMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:FlipHorizontal"/>
+ <menu:menuitem menu:id=".uno:FlipVertical"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:GroupMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:FormatGroup"/>
+ <menu:menuitem menu:id=".uno:FormatUngroup"/>
+ <menu:menuitem menu:id=".uno:EnterGroup"/>
+ <menu:menuitem menu:id=".uno:LeaveGroup"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:ObjectMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:TransformDialog"/>
+ <menu:menuitem menu:id=".uno:FormatLine"/>
+ <menu:menuitem menu:id=".uno:FormatArea"/>
+ <menu:menuitem menu:id=".uno:TextAttributes"/>
+ <menu:menuitem menu:id=".uno:FontWork"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ObjectTitleDescription"/>
+ <menu:menuitem menu:id=".uno:NameGroup"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:FrameDialog"/>
+ <menu:menuitem menu:id=".uno:GraphicDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:TableMenu">
+ <menu:menupopup>
+ <menu:menu menu:id=".uno:TableInsertMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:InsertTable"/>
+ <menu:menuitem menu:id=".uno:InsertRowDialog"/>
+ <menu:menuitem menu:id=".uno:InsertColumnDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:TableDeleteMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:DeleteTable"/>
+ <menu:menuitem menu:id=".uno:DeleteRows"/>
+ <menu:menuitem menu:id=".uno:DeleteColumns"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:TableSelectMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SelectTable"/>
+ <menu:menuitem menu:id=".uno:EntireRow"/>
+ <menu:menuitem menu:id=".uno:EntireColumn"/>
+ <menu:menuitem menu:id=".uno:EntireCell"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:MergeCells"/>
+ <menu:menuitem menu:id=".uno:SplitCell"/>
+ <menu:menuitem menu:id=".uno:Protect"/>
+ <menu:menuitem menu:id=".uno:MergeTable"/>
+ <menu:menuitem menu:id=".uno:SplitTable"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AutoFormat"/>
+ <menu:menu menu:id=".uno:TableAutoFitMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SetColumnWidth"/>
+ <menu:menuitem menu:id=".uno:SetOptimalColumnWidth"/>
+ <menu:menuitem menu:id=".uno:DistributeColumns"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SetRowHeight"/>
+ <menu:menuitem menu:id=".uno:SetOptimalRowHeight"/>
+ <menu:menuitem menu:id=".uno:DistributeRows"/>
+ <menu:menuitem menu:id=".uno:RowSplit"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:HeadingRowsRepeat"/>
+ <menu:menu menu:id=".uno:TableConvertMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:ConvertTextToTable"/>
+ <menu:menuitem menu:id=".uno:ConvertTableToText"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:TableSort"/>
+ <menu:menuitem menu:id=".uno:InsertFormula"/>
+ <menu:menuitem menu:id=".uno:TableNumberFormatDialog"/>
+ <menu:menuitem menu:id=".uno:TableBoundaries"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:TableDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ToolsMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SpellingAndGrammarDialog"/>
+ <menu:menu menu:id=".uno:LanguageMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SetLanguageSelectionMenu"/>
+ <menu:menuitem menu:id=".uno:SetLanguageParagraphMenu"/>
+ <menu:menuitem menu:id=".uno:SetLanguageAllTextMenu"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:HangulHanjaConversion"/>
+ <menu:menuitem menu:id=".uno:ChineseConversion"/>
+ <menu:menuitem menu:id=".uno:ThesaurusDialog"/>
+ <menu:menuitem menu:id=".uno:Hyphenate"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MoreDictionaries"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:WordCountDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ChapterNumberingDialog"/>
+ <menu:menuitem menu:id=".uno:LineNumberingDialog"/>
+ <menu:menuitem menu:id=".uno:FootnoteDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Gallery"/>
+ <menu:menuitem menu:id=".uno:AVMediaPlayer"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:BibliographyComponent"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MergeDocuments"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SortDialog"/>
+ <menu:menuitem menu:id=".uno:CalculateSel"/>
+ <menu:menu menu:id=".uno:UpdateMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:UpdateAll"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:UpdateFields"/>
+ <menu:menuitem menu:id=".uno:UpdateAllLinks"/>
+ <menu:menuitem menu:id=".uno:UpdateCharts"/>
+ <menu:menuitem menu:id=".uno:UpdateCurIndex"/>
+ <menu:menuitem menu:id=".uno:UpdateAllIndexes"/>
+ <menu:menuitem menu:id=".uno:Repaginate"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:MacrosMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:MacroRecorder"/>
+ <menu:menuitem menu:id=".uno:RunMacro"/>
+ <menu:menu menu:id=".uno:ScriptOrganizer"/>
+ <menu:menuitem menu:id=".uno:MacroSignature"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MacroOrganizer?TabId:short=1"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id="service:com.sun.star.deployment.ui.PackageManagerDialog"/>
+ <menu:menuitem menu:id=".uno:OpenXMLFilterSettings"/>
+ <menu:menuitem menu:id=".uno:AutoCorrectDlg"/>
+ <menu:menuitem menu:id=".uno:ConfigureDialog"/>
+ <menu:menuitem menu:id=".uno:OptionsTreeDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:WindowList">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:NewWindow"/>
+ <menu:menuitem menu:id=".uno:CloseWin"/>
+ <menu:menuseparator/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:HelpMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:HelpIndex"/>
+ <menu:menuitem menu:id=".uno:ExtendedHelp"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:HelpSupport"/>
+ <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:About"/>
+ </menu:menupopup>
+ </menu:menu>
</menu:menubar>
diff --git a/sw/uiconfig/sglobal/toolbar/extrusionobjectbar.xml b/sw/uiconfig/sglobal/toolbar/extrusionobjectbar.xml
index 1f212226cf..148849db6e 100644
--- a/sw/uiconfig/sglobal/toolbar/extrusionobjectbar.xml
+++ b/sw/uiconfig/sglobal/toolbar/extrusionobjectbar.xml
@@ -8,9 +8,9 @@
<toolbar:toolbaritem xlink:href=".uno:ExtrusionTiltLeft" toolbar:helpid="10963"/>
<toolbar:toolbaritem xlink:href=".uno:ExtrusionTiltRight" toolbar:helpid="10964"/>
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionDepthFloater" toolbar:helpid="10965"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionDirectionFloater" toolbar:helpid="10966"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionLightingFloater" toolbar:helpid="10967"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionSurfaceFloater" toolbar:helpid="10968"/>
- <toolbar:toolbaritem xlink:href=".uno:Extrusion3DColor" toolbar:helpid="10969"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionDepthFloater" toolbar:helpid="10965" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionDirectionFloater" toolbar:helpid="10966" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionLightingFloater" toolbar:helpid="10967" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionSurfaceFloater" toolbar:helpid="10968" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:Extrusion3DColor" toolbar:helpid="10969" toolbar:style="dropdownonly"/>
</toolbar:toolbar> \ No newline at end of file
diff --git a/sw/uiconfig/sglobal/toolbar/findbar.xml b/sw/uiconfig/sglobal/toolbar/findbar.xml
new file mode 100644
index 0000000000..9ef9d8a1a7
--- /dev/null
+++ b/sw/uiconfig/sglobal/toolbar/findbar.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
+<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
+ <toolbar:toolbaritem xlink:href=".uno:FindText" toolbar:helpid="helpid:100105" />
+ <toolbar:toolbaritem xlink:href=".uno:DownSearch" toolbar:helpid="helpid:100105" />
+ <toolbar:toolbaritem xlink:href=".uno:UpSearch" toolbar:helpid="helpid:100105" />
+ <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:text="Find &amp; Replace" toolbar:visible="false" toolbar:helpid="helpid:100105"/>
+</toolbar:toolbar>
diff --git a/sw/uiconfig/sglobal/toolbar/fontworkobjectbar.xml b/sw/uiconfig/sglobal/toolbar/fontworkobjectbar.xml
index 3ac334e0e9..32de621477 100644
--- a/sw/uiconfig/sglobal/toolbar/fontworkobjectbar.xml
+++ b/sw/uiconfig/sglobal/toolbar/fontworkobjectbar.xml
@@ -3,9 +3,9 @@
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
<toolbar:toolbaritem xlink:href=".uno:FontworkGalleryFloater" toolbar:helpid="helpid:10977" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:FontworkShapeType" toolbar:helpid="helpid:10978" toolbar:style="radio dropdown" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkShapeType" toolbar:helpid="helpid:10978" toolbar:style="dropdownonly"/>
<toolbar:toolbaritem xlink:href=".uno:FontworkSameLetterHeights" toolbar:helpid="helpid:10979" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:FontworkAlignmentFloater" toolbar:helpid="helpid:10981" toolbar:style="dropdown" />
- <toolbar:toolbaritem xlink:href=".uno:FontworkCharacterSpacingFloater" toolbar:helpid="helpid:10982" toolbar:style="dropdown" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkAlignmentFloater" toolbar:helpid="helpid:10981" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:FontworkCharacterSpacingFloater" toolbar:helpid="helpid:10982" toolbar:style="dropdownonly"/>
</toolbar:toolbar> \ No newline at end of file
diff --git a/sw/uiconfig/sweb/accelerator/de/default.xml b/sw/uiconfig/sweb/accelerator/de/default.xml
deleted file mode 100644
index b134a2a41a..0000000000
--- a/sw/uiconfig/sweb/accelerator/de/default.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_K" accel:shift="true" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_U" accel:shift="true" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_B" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_G" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_H" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_T" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/sweb/accelerator/en-GB/default.xml b/sw/uiconfig/sweb/accelerator/en-GB/default.xml
deleted file mode 100644
index 2bc37195b9..0000000000
--- a/sw/uiconfig/sweb/accelerator/en-GB/default.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_I" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_B" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_U" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_X" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveDirectCharFormats"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/sweb/accelerator/en-US/default.xml b/sw/uiconfig/sweb/accelerator/en-US/default.xml
deleted file mode 100644
index 2bc37195b9..0000000000
--- a/sw/uiconfig/sweb/accelerator/en-US/default.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_I" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_B" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_U" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_X" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveDirectCharFormats"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/sweb/accelerator/es/default.xml b/sw/uiconfig/sweb/accelerator/es/default.xml
deleted file mode 100644
index 42b11d834e..0000000000
--- a/sw/uiconfig/sweb/accelerator/es/default.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_K" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_S" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_T" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/sweb/accelerator/fr/default.xml b/sw/uiconfig/sweb/accelerator/fr/default.xml
deleted file mode 100644
index 4ee8b9e2a1..0000000000
--- a/sw/uiconfig/sweb/accelerator/fr/default.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_I" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_G" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_U" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/sweb/menubar/menubar.xml b/sw/uiconfig/sweb/menubar/menubar.xml
index 4be8c6f8e7..4b482e373d 100644
--- a/sw/uiconfig/sweb/menubar/menubar.xml
+++ b/sw/uiconfig/sweb/menubar/menubar.xml
@@ -1,386 +1,390 @@
<?xml version="1.0" encoding="UTF-8"?>
<menu:menubar xmlns:menu="http://openoffice.org/2001/menu" menu:id="menubar">
- <menu:menu menu:id=".uno:PickList">
+ <menu:menu menu:id=".uno:PickList">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:AddDirect"/>
+ <menu:menuitem menu:id=".uno:Open"/>
+ <menu:menuitem menu:id=".uno:RecentFileList"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AutoPilotMenu"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:CloseDoc"/>
+ <menu:menuitem menu:id=".uno:Save"/>
+ <menu:menuitem menu:id=".uno:SaveAs"/>
+ <menu:menuitem menu:id=".uno:SaveAll"/>
+ <menu:menuitem menu:id=".uno:Reload"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ExportTo"/>
+ <menu:menu menu:id=".uno:SendToMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:AddDirect"/>
- <menu:menuitem menu:id=".uno:Open"/>
- <menu:menuitem menu:id=".uno:RecentFileList"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AutoPilotMenu"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:CloseDoc"/>
- <menu:menuitem menu:id=".uno:Save"/>
- <menu:menuitem menu:id=".uno:SaveAs"/>
- <menu:menuitem menu:id=".uno:SaveAll"/>
- <menu:menuitem menu:id=".uno:Reload"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ExportTo"/>
- <menu:menu menu:id=".uno:SendToMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SendMail"/>
- <menu:menuitem menu:id=".uno:SendMailDocAsPDF"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SetDocumentProperties"/>
- <menu:menu menu:id=".uno:TemplateMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:Organizer"/>
- <menu:menuitem menu:id=".uno:AddressBookSource"/>
- <menu:menuitem menu:id=".uno:SaveAsTemplate"/>
- <menu:menuitem menu:id=".uno:OpenTemplate"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:WebHtml"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:PrintPreview"/>
- <menu:menuitem menu:id=".uno:Print"/>
- <menu:menuitem menu:id=".uno:PrinterSetup"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Quit"/>
+ <menu:menuitem menu:id=".uno:SendMail"/>
+ <menu:menuitem menu:id=".uno:SendMailDocAsPDF"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:EditMenu">
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SetDocumentProperties"/>
+ <menu:menu menu:id=".uno:TemplateMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:Undo"/>
- <menu:menuitem menu:id=".uno:Redo"/>
- <menu:menuitem menu:id=".uno:Repeat"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Cut"/>
- <menu:menuitem menu:id=".uno:Copy"/>
- <menu:menuitem menu:id=".uno:Paste"/>
- <menu:menuitem menu:id=".uno:PasteSpecial"/>
- <menu:menuitem menu:id=".uno:SelectTextMode"/>
- <menu:menu menu:id=".uno:SelectionModeMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SelectionModeDefault"/>
- <menu:menuitem menu:id=".uno:SelectionModeBlock"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:SelectAll"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SearchDialog"/>
- <menu:menuitem menu:id=".uno:EditGlossary"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:FieldDialog"/>
- <menu:menuitem menu:id=".uno:EditFootnote"/>
- <menu:menuitem menu:id=".uno:EditHyperlink"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:LinkDialog"/>
- <menu:menuitem menu:id=".uno:PlugInsActive"/>
- <menu:menuitem menu:id=".uno:ImageMapDialog"/>
- <menu:menuitem menu:id=".uno:ObjectMenue"/>
+ <menu:menuitem menu:id=".uno:Organizer"/>
+ <menu:menuitem menu:id=".uno:AddressBookSource"/>
+ <menu:menuitem menu:id=".uno:SaveAsTemplate"/>
+ <menu:menuitem menu:id=".uno:OpenTemplate"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ViewMenu">
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:WebHtml"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:PrintPreview"/>
+ <menu:menuitem menu:id=".uno:Print"/>
+ <menu:menuitem menu:id=".uno:PrinterSetup"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Quit"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:EditMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:Undo"/>
+ <menu:menuitem menu:id=".uno:Redo"/>
+ <menu:menuitem menu:id=".uno:Repeat"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Cut"/>
+ <menu:menuitem menu:id=".uno:Copy"/>
+ <menu:menuitem menu:id=".uno:Paste"/>
+ <menu:menuitem menu:id=".uno:PasteSpecial"/>
+ <menu:menuitem menu:id=".uno:SelectTextMode"/>
+ <menu:menu menu:id=".uno:SelectionModeMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:PrintLayout"/>
- <menu:menuitem menu:id=".uno:BrowseView"/>
- <menu:menuitem menu:id=".uno:SourceView"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AvailableToolbars"/>
- <menu:menuitem menu:id=".uno:StatusBarVisible"/>
- <menu:menuitem menu:id=".uno:ShowImeStatusWindow"/>
- <menu:menuitem menu:id=".uno:Ruler"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ViewBounds"/>
- <menu:menuitem menu:id=".uno:Marks"/>
- <menu:menuitem menu:id=".uno:Fieldnames"/>
- <menu:menuitem menu:id=".uno:ControlCodes"/>
- <menu:menuitem menu:id=".uno:ShowHiddenParagraphs"/>
- <menu:menuitem menu:id=".uno:ShowAnnotations"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ViewDataSourceBrowser"/>
- <menu:menuitem menu:id=".uno:Navigator"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:FullScreen"/>
- <menu:menuitem menu:id=".uno:Zoom"/>
+ <menu:menuitem menu:id=".uno:SelectionModeDefault" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SelectionModeBlock" menu:style="radio"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:InsertMenu">
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:SelectAll"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SearchDialog"/>
+ <menu:menuitem menu:id=".uno:EditGlossary"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FieldDialog"/>
+ <menu:menuitem menu:id=".uno:EditFootnote"/>
+ <menu:menuitem menu:id=".uno:EditHyperlink"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:LinkDialog"/>
+ <menu:menuitem menu:id=".uno:PlugInsActive"/>
+ <menu:menuitem menu:id=".uno:ImageMapDialog"/>
+ <menu:menuitem menu:id=".uno:ObjectMenue"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ViewMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:PrintLayout"/>
+ <menu:menuitem menu:id=".uno:BrowseView"/>
+ <menu:menuitem menu:id=".uno:SourceView"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AvailableToolbars"/>
+ <menu:menuitem menu:id=".uno:StatusBarVisible"/>
+ <menu:menuitem menu:id=".uno:ShowImeStatusWindow"/>
+ <menu:menuitem menu:id=".uno:Ruler"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ViewBounds"/>
+ <menu:menuitem menu:id=".uno:Marks"/>
+ <menu:menuitem menu:id=".uno:Fieldnames"/>
+ <menu:menuitem menu:id=".uno:ControlCodes"/>
+ <menu:menuitem menu:id=".uno:ShowHiddenParagraphs"/>
+ <menu:menuitem menu:id=".uno:ShowAnnotations"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ViewDataSourceBrowser"/>
+ <menu:menuitem menu:id=".uno:Navigator"/>
+ <menu:menuitem menu:id=".uno:TaskPane"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FullScreen"/>
+ <menu:menuitem menu:id=".uno:Zoom"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:InsertMenu">
+ <menu:menupopup>
+ <menu:menu menu:id=".uno:FieldMenu">
<menu:menupopup>
- <menu:menu menu:id=".uno:FieldMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertDateField"/>
- <menu:menuitem menu:id=".uno:InsertTimeField"/>
- <menu:menuitem menu:id=".uno:InsertPageNumberField"/>
- <menu:menuitem menu:id=".uno:InsertPageCountField"/>
- <menu:menuitem menu:id=".uno:InsertTitleField"/>
- <menu:menuitem menu:id=".uno:InsertAuthorField"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertField"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:InsertSymbol"/>
- <menu:menu menu:id=".uno:FormattingMarkMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertNonBreakingSpace"/>
- <menu:menuitem menu:id=".uno:InsertHardHyphen"/>
- <menu:menuitem menu:id=".uno:InsertSoftHyphen"/>
- <menu:menuitem menu:id=".uno:InsertZWSP"/>
- <menu:menuitem menu:id=".uno:InsertZWNBSP"/>
- <menu:menuitem menu:id=".uno:InsertLRM"/>
- <menu:menuitem menu:id=".uno:InsertRLM"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertSection"/>
- <menu:menuitem menu:id=".uno:HyperlinkDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertFootnoteDialog"/>
- <menu:menuitem menu:id=".uno:InsertBookmark"/>
- <menu:menuitem menu:id=".uno:InsertAnnotation"/>
- <menu:menuitem menu:id=".uno:InsertScript"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertFrame"/>
- <menu:menuitem menu:id=".uno:InsertTable"/>
- <menu:menuitem menu:id=".uno:InsertGraphicRuler"/>
- <menu:menuitem menu:id=".uno:InsertGraphic"/>
- <menu:menuitem menu:id=".uno:InsertAVMedia"/>
- <menu:menu menu:id=".uno:ObjectMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertObject"/>
- <menu:menuitem menu:id=".uno:InsertPlugin"/>
- <menu:menuitem menu:id=".uno:InsertSound"/>
- <menu:menuitem menu:id=".uno:InsertVideo"/>
- <menu:menuitem menu:id=".uno:InsertObjectStarMath"/>
- <menu:menuitem menu:id=".uno:InsertObjectChart"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:InsertObjectFloatingFrame"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertDoc"/>
+ <menu:menuitem menu:id=".uno:InsertDateField"/>
+ <menu:menuitem menu:id=".uno:InsertTimeField"/>
+ <menu:menuitem menu:id=".uno:InsertPageNumberField"/>
+ <menu:menuitem menu:id=".uno:InsertPageCountField"/>
+ <menu:menuitem menu:id=".uno:InsertTitleField"/>
+ <menu:menuitem menu:id=".uno:InsertAuthorField"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertField"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:FormatMenu">
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:InsertSymbol"/>
+ <menu:menu menu:id=".uno:FormattingMarkMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:ResetAttributes"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:FontDialog"/>
- <menu:menuitem menu:id=".uno:ParagraphDialog"/>
- <menu:menuitem menu:id=".uno:BulletsAndNumberingDialog"/>
- <menu:menuitem menu:id=".uno:PageDialog"/>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:TransliterateMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:FormatColumns"/>
- <menu:menuitem menu:id=".uno:EditRegion"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:DesignerDialog"/>
- <menu:menu menu:id=".uno:AutoFormatMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:OnlineAutoFormat"/>
- <menu:menuitem menu:id=".uno:AutoFormatApply"/>
- <menu:menuitem menu:id=".uno:AutoFormatRedlineApply"/>
- <menu:menuitem menu:id=".uno:AutoCorrectDlg"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:AnchorMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SetAnchorToPage"/>
- <menu:menuitem menu:id=".uno:SetAnchorToPara"/>
- <menu:menuitem menu:id=".uno:SetAnchorAtChar"/>
- <menu:menuitem menu:id=".uno:SetAnchorToChar"/>
- <menu:menuitem menu:id=".uno:SetAnchorToFrame"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:WrapMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:WrapOff"/>
- <menu:menuitem menu:id=".uno:WrapOn"/>
- <menu:menuitem menu:id=".uno:WrapIdeal"/>
- <menu:menuitem menu:id=".uno:WrapThrough"/>
- <menu:menuitem menu:id=".uno:WrapThroughTransparent"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:WrapContour"/>
- <menu:menuitem menu:id=".uno:ContourDialog"/>
- <menu:menuitem menu:id=".uno:WrapAnchorOnly"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:TextWrap"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ObjectAlign">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:CommonAlignLeft"/>
- <menu:menuitem menu:id=".uno:CommonAlignHorizontalCenter"/>
- <menu:menuitem menu:id=".uno:CommonAlignRight"/>
- <menu:menuitem menu:id=".uno:CommonAlignJustified"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:CommonAlignTop"/>
- <menu:menuitem menu:id=".uno:CommonAlignVerticalCenter"/>
- <menu:menuitem menu:id=".uno:CommonAlignBottom"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ArrangeMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:BringToFront"/>
- <menu:menuitem menu:id=".uno:ObjectForwardOne"/>
- <menu:menuitem menu:id=".uno:ObjectBackOne"/>
- <menu:menuitem menu:id=".uno:SendToBack"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SetObjectToForeground"/>
- <menu:menuitem menu:id=".uno:SetObjectToBackground"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:FlipMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:FlipHorizontal"/>
- <menu:menuitem menu:id=".uno:FlipVertical"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:GroupMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:FormatGroup"/>
- <menu:menuitem menu:id=".uno:FormatUngroup"/>
- <menu:menuitem menu:id=".uno:EnterGroup"/>
- <menu:menuitem menu:id=".uno:LeaveGroup"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ObjectMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:TransformDialog"/>
- <menu:menuitem menu:id=".uno:FormatLine"/>
- <menu:menuitem menu:id=".uno:FormatArea"/>
- <menu:menuitem menu:id=".uno:TextAttributes"/>
- <menu:menuitem menu:id=".uno:FontWork"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:NameGroup"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:FrameDialog"/>
- <menu:menuitem menu:id=".uno:GraphicDialog"/>
+ <menu:menuitem menu:id=".uno:InsertNonBreakingSpace"/>
+ <menu:menuitem menu:id=".uno:InsertHardHyphen"/>
+ <menu:menuitem menu:id=".uno:InsertSoftHyphen"/>
+ <menu:menuitem menu:id=".uno:InsertZWSP"/>
+ <menu:menuitem menu:id=".uno:InsertZWNBSP"/>
+ <menu:menuitem menu:id=".uno:InsertLRM"/>
+ <menu:menuitem menu:id=".uno:InsertRLM"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:TableMenu">
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertSection"/>
+ <menu:menuitem menu:id=".uno:HyperlinkDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertFootnoteDialog"/>
+ <menu:menuitem menu:id=".uno:InsertBookmark"/>
+ <menu:menuitem menu:id=".uno:InsertAnnotation"/>
+ <menu:menuitem menu:id=".uno:InsertScript"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertFrame"/>
+ <menu:menuitem menu:id=".uno:InsertTable"/>
+ <menu:menuitem menu:id=".uno:InsertGraphicRuler"/>
+ <menu:menuitem menu:id=".uno:InsertGraphic"/>
+ <menu:menuitem menu:id=".uno:InsertAVMedia"/>
+ <menu:menu menu:id=".uno:ObjectMenu">
<menu:menupopup>
- <menu:menu menu:id=".uno:TableInsertMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertTable"/>
- <menu:menuitem menu:id=".uno:InsertRowDialog"/>
- <menu:menuitem menu:id=".uno:InsertColumnDialog"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:TableDeleteMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:DeleteTable"/>
- <menu:menuitem menu:id=".uno:DeleteRows"/>
- <menu:menuitem menu:id=".uno:DeleteColumns"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:TableSelectMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SelectTable"/>
- <menu:menuitem menu:id=".uno:EntireRow"/>
- <menu:menuitem menu:id=".uno:EntireColumn"/>
- <menu:menuitem menu:id=".uno:EntireCell"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:MergeCells"/>
- <menu:menuitem menu:id=".uno:SplitCell"/>
- <menu:menuitem menu:id=".uno:Protect"/>
- <menu:menuitem menu:id=".uno:MergeTable"/>
- <menu:menuitem menu:id=".uno:SplitTable"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AutoFormat"/>
- <menu:menu menu:id=".uno:TableAutoFitMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SetColumnWidth"/>
- <menu:menuitem menu:id=".uno:SetOptimalColumnWidth"/>
- <menu:menuitem menu:id=".uno:DistributeColumns"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SetRowHeight"/>
- <menu:menuitem menu:id=".uno:SetOptimalRowHeight"/>
- <menu:menuitem menu:id=".uno:DistributeRows"/>
- <menu:menuitem menu:id=".uno:RowSplit"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:HeadingRowsRepeat"/>
- <menu:menu menu:id=".uno:TableConvertMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:ConvertTextToTable"/>
- <menu:menuitem menu:id=".uno:ConvertTableToText"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:TableSort"/>
- <menu:menuitem menu:id=".uno:InsertFormula"/>
- <menu:menuitem menu:id=".uno:TableNumberFormatDialog"/>
- <menu:menuitem menu:id=".uno:TableBoundaries"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:TableDialog"/>
+ <menu:menuitem menu:id=".uno:InsertObject"/>
+ <menu:menuitem menu:id=".uno:InsertPlugin"/>
+ <menu:menuitem menu:id=".uno:InsertSound"/>
+ <menu:menuitem menu:id=".uno:InsertVideo"/>
+ <menu:menuitem menu:id=".uno:InsertObjectStarMath"/>
+ <menu:menuitem menu:id=".uno:InsertObjectChart"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ToolsMenu">
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:InsertObjectFloatingFrame"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertDoc"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:FormatMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:ResetAttributes"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FontDialog"/>
+ <menu:menuitem menu:id=".uno:ParagraphDialog"/>
+ <menu:menuitem menu:id=".uno:BulletsAndNumberingDialog"/>
+ <menu:menuitem menu:id=".uno:PageDialog"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:TransliterateMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:SpellingAndGrammarDialog"/>
- <menu:menu menu:id=".uno:LanguageMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SetLanguageSelectionMenu"/>
- <menu:menuitem menu:id=".uno:SetLanguageParagraphMenu"/>
- <menu:menuitem menu:id=".uno:SetLanguageAllTextMenu"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HangulHanjaConversion"/>
- <menu:menuitem menu:id=".uno:ChineseConversion"/>
- <menu:menuitem menu:id=".uno:ThesaurusDialog"/>
- <menu:menuitem menu:id=".uno:Hyphenate"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MoreDictionaries"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:WordCountDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:FootnoteDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Gallery"/>
- <menu:menuitem menu:id=".uno:AVMediaPlayer"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:BibliographyComponent"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SortDialog"/>
- <menu:menuitem menu:id=".uno:CalculateSel"/>
- <menu:menuitem menu:id=".uno:Repaginate"/>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:MacrosMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:MacroRecorder"/>
- <menu:menuitem menu:id=".uno:RunMacro"/>
- <menu:menu menu:id=".uno:ScriptOrganizer"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MacroOrganizer?TabId:short=1"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id="service:com.sun.star.deployment.ui.PackageManagerDialog"/>
- <menu:menuitem menu:id=".uno:OpenXMLFilterSettings"/>
- <menu:menuitem menu:id=".uno:AutoCorrectDlg"/>
- <menu:menuitem menu:id=".uno:ConfigureDialog"/>
- <menu:menuitem menu:id=".uno:OptionsTreeDialog"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToSentenceCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToTitleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToToggleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:FormatColumns"/>
+ <menu:menuitem menu:id=".uno:EditRegion"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:DesignerDialog"/>
+ <menu:menu menu:id=".uno:AutoFormatMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:OnlineAutoFormat"/>
+ <menu:menuitem menu:id=".uno:AutoFormatApply"/>
+ <menu:menuitem menu:id=".uno:AutoFormatRedlineApply"/>
+ <menu:menuitem menu:id=".uno:AutoCorrectDlg"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:AnchorMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SetAnchorToPage" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetAnchorToPara" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetAnchorAtChar" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetAnchorToChar" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetAnchorToFrame" menu:style="radio"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:WrapMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:WrapOff"/>
+ <menu:menuitem menu:id=".uno:WrapOn"/>
+ <menu:menuitem menu:id=".uno:WrapIdeal"/>
+ <menu:menuitem menu:id=".uno:WrapThrough"/>
+ <menu:menuitem menu:id=".uno:WrapThroughTransparent"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:WrapContour"/>
+ <menu:menuitem menu:id=".uno:ContourDialog"/>
+ <menu:menuitem menu:id=".uno:WrapAnchorOnly"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:TextWrap"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ObjectAlign">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:CommonAlignLeft" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:CommonAlignHorizontalCenter" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:CommonAlignRight" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:CommonAlignJustified" menu:style="radio"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:CommonAlignTop"/>
+ <menu:menuitem menu:id=".uno:CommonAlignVerticalCenter"/>
+ <menu:menuitem menu:id=".uno:CommonAlignBottom"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ArrangeMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:BringToFront"/>
+ <menu:menuitem menu:id=".uno:ObjectForwardOne"/>
+ <menu:menuitem menu:id=".uno:ObjectBackOne"/>
+ <menu:menuitem menu:id=".uno:SendToBack"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SetObjectToForeground"/>
+ <menu:menuitem menu:id=".uno:SetObjectToBackground"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:FlipMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:FlipHorizontal"/>
+ <menu:menuitem menu:id=".uno:FlipVertical"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:GroupMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:FormatGroup"/>
+ <menu:menuitem menu:id=".uno:FormatUngroup"/>
+ <menu:menuitem menu:id=".uno:EnterGroup"/>
+ <menu:menuitem menu:id=".uno:LeaveGroup"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ObjectMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:TransformDialog"/>
+ <menu:menuitem menu:id=".uno:FormatLine"/>
+ <menu:menuitem menu:id=".uno:FormatArea"/>
+ <menu:menuitem menu:id=".uno:TextAttributes"/>
+ <menu:menuitem menu:id=".uno:FontWork"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:NameGroup"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:FrameDialog"/>
+ <menu:menuitem menu:id=".uno:GraphicDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:TableMenu">
+ <menu:menupopup>
+ <menu:menu menu:id=".uno:TableInsertMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:InsertTable"/>
+ <menu:menuitem menu:id=".uno:InsertRowDialog"/>
+ <menu:menuitem menu:id=".uno:InsertColumnDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:TableDeleteMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:DeleteTable"/>
+ <menu:menuitem menu:id=".uno:DeleteRows"/>
+ <menu:menuitem menu:id=".uno:DeleteColumns"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:WindowList">
+ </menu:menu>
+ <menu:menu menu:id=".uno:TableSelectMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:NewWindow"/>
- <menu:menuitem menu:id=".uno:CloseWin"/>
- <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SelectTable"/>
+ <menu:menuitem menu:id=".uno:EntireRow"/>
+ <menu:menuitem menu:id=".uno:EntireColumn"/>
+ <menu:menuitem menu:id=".uno:EntireCell"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:HelpMenu">
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:MergeCells"/>
+ <menu:menuitem menu:id=".uno:SplitCell"/>
+ <menu:menuitem menu:id=".uno:Protect"/>
+ <menu:menuitem menu:id=".uno:MergeTable"/>
+ <menu:menuitem menu:id=".uno:SplitTable"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AutoFormat"/>
+ <menu:menu menu:id=".uno:TableAutoFitMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:HelpIndex"/>
- <menu:menuitem menu:id=".uno:ExtendedHelp"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HelpSupport"/>
- <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:About"/>
+ <menu:menuitem menu:id=".uno:SetColumnWidth"/>
+ <menu:menuitem menu:id=".uno:SetOptimalColumnWidth"/>
+ <menu:menuitem menu:id=".uno:DistributeColumns"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SetRowHeight"/>
+ <menu:menuitem menu:id=".uno:SetOptimalRowHeight"/>
+ <menu:menuitem menu:id=".uno:DistributeRows"/>
+ <menu:menuitem menu:id=".uno:RowSplit"/>
</menu:menupopup>
- </menu:menu>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:HeadingRowsRepeat"/>
+ <menu:menu menu:id=".uno:TableConvertMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:ConvertTextToTable"/>
+ <menu:menuitem menu:id=".uno:ConvertTableToText"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:TableSort"/>
+ <menu:menuitem menu:id=".uno:InsertFormula"/>
+ <menu:menuitem menu:id=".uno:TableNumberFormatDialog"/>
+ <menu:menuitem menu:id=".uno:TableBoundaries"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:TableDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ToolsMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SpellingAndGrammarDialog"/>
+ <menu:menu menu:id=".uno:LanguageMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SetLanguageSelectionMenu"/>
+ <menu:menuitem menu:id=".uno:SetLanguageParagraphMenu"/>
+ <menu:menuitem menu:id=".uno:SetLanguageAllTextMenu"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:HangulHanjaConversion"/>
+ <menu:menuitem menu:id=".uno:ChineseConversion"/>
+ <menu:menuitem menu:id=".uno:ThesaurusDialog"/>
+ <menu:menuitem menu:id=".uno:Hyphenate"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MoreDictionaries"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:WordCountDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FootnoteDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Gallery"/>
+ <menu:menuitem menu:id=".uno:AVMediaPlayer"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:BibliographyComponent"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SortDialog"/>
+ <menu:menuitem menu:id=".uno:CalculateSel"/>
+ <menu:menuitem menu:id=".uno:Repaginate"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:MacrosMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:MacroRecorder"/>
+ <menu:menuitem menu:id=".uno:RunMacro"/>
+ <menu:menu menu:id=".uno:ScriptOrganizer"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MacroOrganizer?TabId:short=1"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id="service:com.sun.star.deployment.ui.PackageManagerDialog"/>
+ <menu:menuitem menu:id=".uno:OpenXMLFilterSettings"/>
+ <menu:menuitem menu:id=".uno:AutoCorrectDlg"/>
+ <menu:menuitem menu:id=".uno:ConfigureDialog"/>
+ <menu:menuitem menu:id=".uno:OptionsTreeDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:WindowList">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:NewWindow"/>
+ <menu:menuitem menu:id=".uno:CloseWin"/>
+ <menu:menuseparator/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:HelpMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:HelpIndex"/>
+ <menu:menuitem menu:id=".uno:ExtendedHelp"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:HelpSupport"/>
+ <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:About"/>
+ </menu:menupopup>
+ </menu:menu>
</menu:menubar>
diff --git a/sw/uiconfig/sweb/toolbar/extrusionobjectbar.xml b/sw/uiconfig/sweb/toolbar/extrusionobjectbar.xml
index 1f212226cf..148849db6e 100644
--- a/sw/uiconfig/sweb/toolbar/extrusionobjectbar.xml
+++ b/sw/uiconfig/sweb/toolbar/extrusionobjectbar.xml
@@ -8,9 +8,9 @@
<toolbar:toolbaritem xlink:href=".uno:ExtrusionTiltLeft" toolbar:helpid="10963"/>
<toolbar:toolbaritem xlink:href=".uno:ExtrusionTiltRight" toolbar:helpid="10964"/>
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionDepthFloater" toolbar:helpid="10965"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionDirectionFloater" toolbar:helpid="10966"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionLightingFloater" toolbar:helpid="10967"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionSurfaceFloater" toolbar:helpid="10968"/>
- <toolbar:toolbaritem xlink:href=".uno:Extrusion3DColor" toolbar:helpid="10969"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionDepthFloater" toolbar:helpid="10965" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionDirectionFloater" toolbar:helpid="10966" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionLightingFloater" toolbar:helpid="10967" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionSurfaceFloater" toolbar:helpid="10968" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:Extrusion3DColor" toolbar:helpid="10969" toolbar:style="dropdownonly"/>
</toolbar:toolbar> \ No newline at end of file
diff --git a/sw/uiconfig/sweb/toolbar/findbar.xml b/sw/uiconfig/sweb/toolbar/findbar.xml
new file mode 100644
index 0000000000..9ef9d8a1a7
--- /dev/null
+++ b/sw/uiconfig/sweb/toolbar/findbar.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
+<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
+ <toolbar:toolbaritem xlink:href=".uno:FindText" toolbar:helpid="helpid:100105" />
+ <toolbar:toolbaritem xlink:href=".uno:DownSearch" toolbar:helpid="helpid:100105" />
+ <toolbar:toolbaritem xlink:href=".uno:UpSearch" toolbar:helpid="helpid:100105" />
+ <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:text="Find &amp; Replace" toolbar:visible="false" toolbar:helpid="helpid:100105"/>
+</toolbar:toolbar>
diff --git a/sw/uiconfig/sweb/toolbar/fontworkobjectbar.xml b/sw/uiconfig/sweb/toolbar/fontworkobjectbar.xml
index 850943e548..a6d5c8d4f6 100644
--- a/sw/uiconfig/sweb/toolbar/fontworkobjectbar.xml
+++ b/sw/uiconfig/sweb/toolbar/fontworkobjectbar.xml
@@ -3,9 +3,9 @@
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
<toolbar:toolbaritem xlink:href=".uno:FontworkGalleryFloater" toolbar:helpid="helpid:10977" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:FontworkShapeType" toolbar:helpid="helpid:10978" toolbar:style="radio dropdown" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkShapeType" toolbar:helpid="helpid:10978" toolbar:style="dropdownonly" />
<toolbar:toolbaritem xlink:href=".uno:FontworkSameLetterHeights" toolbar:helpid="helpid:10979" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:FontworkAlignmentFloater" toolbar:helpid="helpid:10981" />
- <toolbar:toolbaritem xlink:href=".uno:FontworkCharacterSpacingFloater" toolbar:helpid="helpid:10982" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkAlignmentFloater" toolbar:helpid="helpid:10981" toolbar:style="dropdownonly" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkCharacterSpacingFloater" toolbar:helpid="helpid:10982" toolbar:style="dropdownonly" />
</toolbar:toolbar>
diff --git a/sw/uiconfig/swform/accelerator/de/default.xml b/sw/uiconfig/swform/accelerator/de/default.xml
deleted file mode 100644
index 8ac4a74fd3..0000000000
--- a/sw/uiconfig/swform/accelerator/de/default.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_B" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" accel:mod2="true" xlink:href=".uno:LastRecord"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_G" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_H" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" accel:mod2="true" xlink:href=".uno:FirstRecord"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_K" accel:shift="true" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_L" accel:shift="true" accel:mod1="true" xlink:href=".uno:FormFilter"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" accel:mod2="true" xlink:href=".uno:PrevRecord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" accel:mod2="true" xlink:href=".uno:NextRecord"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_T" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_U" accel:shift="true" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/swform/accelerator/en-US/default.xml b/sw/uiconfig/swform/accelerator/en-US/default.xml
deleted file mode 100644
index 82fcdd073b..0000000000
--- a/sw/uiconfig/swform/accelerator/en-US/default.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_B" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" accel:mod2="true" xlink:href=".uno:LastRecord"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" accel:mod2="true" xlink:href=".uno:FirstRecord"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_I" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_L" accel:shift="true" accel:mod1="true" xlink:href=".uno:FormFilter"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" accel:mod2="true" xlink:href=".uno:PrevRecord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" accel:mod2="true" xlink:href=".uno:NextRecord"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_U" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_X" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveDirectCharFormats"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_C" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/swform/accelerator/es/default.xml b/sw/uiconfig/swform/accelerator/es/default.xml
deleted file mode 100644
index db982a44d7..0000000000
--- a/sw/uiconfig/swform/accelerator/es/default.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" accel:mod2="true" xlink:href=".uno:LastRecord"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" accel:mod2="true" xlink:href=".uno:FirstRecord"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_K" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_L" accel:shift="true" accel:mod1="true" xlink:href=".uno:FormFilter"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" accel:mod2="true" xlink:href=".uno:PrevRecord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" accel:mod2="true" xlink:href=".uno:NextRecord"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_S" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_T" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/swform/accelerator/fr/default.xml b/sw/uiconfig/swform/accelerator/fr/default.xml
deleted file mode 100644
index 98b7eb4c0c..0000000000
--- a/sw/uiconfig/swform/accelerator/fr/default.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" accel:mod2="true" xlink:href=".uno:LastRecord"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_G" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" accel:mod2="true" xlink:href=".uno:FirstRecord"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_I" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_L" accel:shift="true" accel:mod1="true" xlink:href=".uno:FormFilter"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" accel:mod2="true" xlink:href=".uno:PrevRecord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" accel:mod2="true" xlink:href=".uno:NextRecord"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_U" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/swform/menubar/menubar.xml b/sw/uiconfig/swform/menubar/menubar.xml
index 13448e4247..69b65cfd3e 100644
--- a/sw/uiconfig/swform/menubar/menubar.xml
+++ b/sw/uiconfig/swform/menubar/menubar.xml
@@ -1,452 +1,456 @@
<?xml version="1.0" encoding="UTF-8"?>
<menu:menubar xmlns:menu="http://openoffice.org/2001/menu" menu:id="menubar">
- <menu:menu menu:id=".uno:PickList">
+ <menu:menu menu:id=".uno:PickList">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:AddDirect"/>
+ <menu:menuitem menu:id=".uno:Open"/>
+ <menu:menuitem menu:id=".uno:RecentFileList"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AutoPilotMenu"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:CloseDoc"/>
+ <menu:menuitem menu:id=".uno:Save"/>
+ <menu:menuitem menu:id=".uno:SaveAs"/>
+ <menu:menuitem menu:id=".uno:SaveAll"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Reload"/>
+ <menu:menuitem menu:id=".uno:VersionDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ExportTo"/>
+ <menu:menuitem menu:id=".uno:ExportToPDF"/>
+ <menu:menu menu:id=".uno:SendToMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:AddDirect"/>
- <menu:menuitem menu:id=".uno:Open"/>
- <menu:menuitem menu:id=".uno:RecentFileList"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AutoPilotMenu"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:CloseDoc"/>
- <menu:menuitem menu:id=".uno:Save"/>
- <menu:menuitem menu:id=".uno:SaveAs"/>
- <menu:menuitem menu:id=".uno:SaveAll"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Reload"/>
- <menu:menuitem menu:id=".uno:VersionDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ExportTo"/>
- <menu:menuitem menu:id=".uno:ExportToPDF"/>
- <menu:menu menu:id=".uno:SendToMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SendMail"/>
- <menu:menuitem menu:id=".uno:SendMailDocAsOOo"/>
- <menu:menuitem menu:id=".uno:SendMailDocAsMS"/>
- <menu:menuitem menu:id=".uno:SendMailDocAsPDF"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:NewGlobalDoc"/>
- <menu:menuitem menu:id=".uno:NewHtmlDoc"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SendOutlineToStarImpress"/>
- <menu:menuitem menu:id=".uno:SendOutlineToClipboard"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:CreateAbstract"/>
- <menu:menuitem menu:id=".uno:SendAbstractToStarImpress"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SetDocumentProperties"/>
- <menu:menu menu:id=".uno:TemplateMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:Organizer"/>
- <menu:menuitem menu:id=".uno:AddressBookSource"/>
- <menu:menuitem menu:id=".uno:SaveAsTemplate"/>
- <menu:menuitem menu:id=".uno:OpenTemplate"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:PrintPreview"/>
- <menu:menuitem menu:id=".uno:Print"/>
- <menu:menuitem menu:id=".uno:PrinterSetup"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Quit"/>
+ <menu:menuitem menu:id=".uno:SendMail"/>
+ <menu:menuitem menu:id=".uno:SendMailDocAsOOo"/>
+ <menu:menuitem menu:id=".uno:SendMailDocAsMS"/>
+ <menu:menuitem menu:id=".uno:SendMailDocAsPDF"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:NewGlobalDoc"/>
+ <menu:menuitem menu:id=".uno:NewHtmlDoc"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SendOutlineToStarImpress"/>
+ <menu:menuitem menu:id=".uno:SendOutlineToClipboard"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:CreateAbstract"/>
+ <menu:menuitem menu:id=".uno:SendAbstractToStarImpress"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:EditMenu">
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SetDocumentProperties"/>
+ <menu:menu menu:id=".uno:TemplateMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:Undo"/>
- <menu:menuitem menu:id=".uno:Redo"/>
- <menu:menuitem menu:id=".uno:Repeat"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Cut"/>
- <menu:menuitem menu:id=".uno:Copy"/>
- <menu:menuitem menu:id=".uno:Paste"/>
- <menu:menuitem menu:id=".uno:PasteSpecial"/>
- <menu:menuitem menu:id=".uno:SelectTextMode"/>
- <menu:menu menu:id=".uno:SelectionModeMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SelectionModeDefault"/>
- <menu:menuitem menu:id=".uno:SelectionModeBlock"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:SelectAll"/>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:ChangesMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:TrackChanges"/>
- <menu:menuitem menu:id=".uno:ProtectTraceChangeMode"/>
- <menu:menuitem menu:id=".uno:ShowTrackedChanges"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AcceptTrackedChanges"/>
- <menu:menuitem menu:id=".uno:CommentChangeTracking"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MergeDocuments"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:CompareDocuments"/>
- <menu:menuitem menu:id=".uno:SearchDialog"/>
- <menu:menuitem menu:id=".uno:EditGlossary"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ChangeDatabaseField"/>
- <menu:menuitem menu:id=".uno:FieldDialog"/>
- <menu:menuitem menu:id=".uno:EditFootnote"/>
- <menu:menuitem menu:id=".uno:IndexEntryDialog"/>
- <menu:menuitem menu:id=".uno:AuthoritiesEntryDialog"/>
- <menu:menuitem menu:id=".uno:EditHyperlink"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:LinkDialog"/>
- <menu:menuitem menu:id=".uno:PlugInsActive"/>
- <menu:menuitem menu:id=".uno:ImageMapDialog"/>
- <menu:menuitem menu:id=".uno:ObjectMenue"/>
+ <menu:menuitem menu:id=".uno:Organizer"/>
+ <menu:menuitem menu:id=".uno:AddressBookSource"/>
+ <menu:menuitem menu:id=".uno:SaveAsTemplate"/>
+ <menu:menuitem menu:id=".uno:OpenTemplate"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ViewMenu">
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:PrintPreview"/>
+ <menu:menuitem menu:id=".uno:Print"/>
+ <menu:menuitem menu:id=".uno:PrinterSetup"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Quit"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:EditMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:Undo"/>
+ <menu:menuitem menu:id=".uno:Redo"/>
+ <menu:menuitem menu:id=".uno:Repeat"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Cut"/>
+ <menu:menuitem menu:id=".uno:Copy"/>
+ <menu:menuitem menu:id=".uno:Paste"/>
+ <menu:menuitem menu:id=".uno:PasteSpecial"/>
+ <menu:menuitem menu:id=".uno:SelectTextMode"/>
+ <menu:menu menu:id=".uno:SelectionModeMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:PrintLayout"/>
- <menu:menuitem menu:id=".uno:BrowseView"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AvailableToolbars"/>
- <menu:menuitem menu:id=".uno:StatusBarVisible"/>
- <menu:menuitem menu:id=".uno:ShowImeStatusWindow"/>
- <menu:menuitem menu:id=".uno:Ruler"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ViewBounds"/>
- <menu:menuitem menu:id=".uno:Marks"/>
- <menu:menuitem menu:id=".uno:Fieldnames"/>
- <menu:menuitem menu:id=".uno:ControlCodes"/>
- <menu:menuitem menu:id=".uno:ShowHiddenParagraphs"/>
- <menu:menuitem menu:id=".uno:ShowAnnotations"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ViewDataSourceBrowser"/>
- <menu:menuitem menu:id=".uno:Navigator"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:FullScreen"/>
- <menu:menuitem menu:id=".uno:Zoom"/>
+ <menu:menuitem menu:id=".uno:SelectionModeDefault" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SelectionModeBlock" menu:style="radio"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:InsertMenu">
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:SelectAll"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:ChangesMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertBreak"/>
- <menu:menu menu:id=".uno:FieldMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertDateField"/>
- <menu:menuitem menu:id=".uno:InsertTimeField"/>
- <menu:menuitem menu:id=".uno:InsertPageNumberField"/>
- <menu:menuitem menu:id=".uno:InsertPageCountField"/>
- <menu:menuitem menu:id=".uno:InsertTopicField"/>
- <menu:menuitem menu:id=".uno:InsertTitleField"/>
- <menu:menuitem menu:id=".uno:InsertAuthorField"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertField"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:InsertSymbol"/>
- <menu:menu menu:id=".uno:FormattingMarkMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertNonBreakingSpace"/>
- <menu:menuitem menu:id=".uno:InsertHardHyphen"/>
- <menu:menuitem menu:id=".uno:InsertSoftHyphen"/>
- <menu:menuitem menu:id=".uno:InsertZWSP"/>
- <menu:menuitem menu:id=".uno:InsertZWNBSP"/>
- <menu:menuitem menu:id=".uno:InsertLRM"/>
- <menu:menuitem menu:id=".uno:InsertRLM"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertSection"/>
- <menu:menuitem menu:id=".uno:HyperlinkDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertPageHeader"/>
- <menu:menuitem menu:id=".uno:InsertPageFooter"/>
- <menu:menuitem menu:id=".uno:InsertFootnoteDialog"/>
- <menu:menuitem menu:id=".uno:InsertCaptionDialog"/>
- <menu:menuitem menu:id=".uno:InsertBookmark"/>
- <menu:menuitem menu:id=".uno:InsertReferenceField"/>
- <menu:menuitem menu:id=".uno:InsertAnnotation"/>
- <menu:menuitem menu:id=".uno:InsertScript"/>
- <menu:menu menu:id=".uno:IndexesMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertIndexesEntry"/>
- <menu:menuitem menu:id=".uno:InsertMultiIndex"/>
- <menu:menuitem menu:id=".uno:InsertAuthoritiesEntry"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertEnvelope"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertFrame"/>
- <menu:menuitem menu:id=".uno:InsertTable"/>
- <menu:menuitem menu:id=".uno:InsertGraphicRuler"/>
- <menu:menu menu:id=".uno:GraphicMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertGraphic"/>
- <menu:menu menu:id=".uno:Scan">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:TwainSelect"/>
- <menu:menuitem menu:id=".uno:TwainTransfer"/>
- </menu:menupopup>
- </menu:menu>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:InsertAVMedia"/>
- <menu:menu menu:id=".uno:ObjectMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertObject"/>
- <menu:menuitem menu:id=".uno:InsertPlugin"/>
- <menu:menuitem menu:id=".uno:InsertSound"/>
- <menu:menuitem menu:id=".uno:InsertVideo"/>
- <menu:menuitem menu:id=".uno:InsertObjectStarMath"/>
- <menu:menuitem menu:id=".uno:InsertObjectChart"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:InsertObjectFloatingFrame"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertDoc"/>
+ <menu:menuitem menu:id=".uno:TrackChanges"/>
+ <menu:menuitem menu:id=".uno:ProtectTraceChangeMode"/>
+ <menu:menuitem menu:id=".uno:ShowTrackedChanges"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AcceptTrackedChanges"/>
+ <menu:menuitem menu:id=".uno:CommentChangeTracking"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MergeDocuments"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:FormatMenu">
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:CompareDocuments"/>
+ <menu:menuitem menu:id=".uno:SearchDialog"/>
+ <menu:menuitem menu:id=".uno:EditGlossary"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ChangeDatabaseField"/>
+ <menu:menuitem menu:id=".uno:FieldDialog"/>
+ <menu:menuitem menu:id=".uno:EditFootnote"/>
+ <menu:menuitem menu:id=".uno:IndexEntryDialog"/>
+ <menu:menuitem menu:id=".uno:AuthoritiesEntryDialog"/>
+ <menu:menuitem menu:id=".uno:EditHyperlink"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:LinkDialog"/>
+ <menu:menuitem menu:id=".uno:PlugInsActive"/>
+ <menu:menuitem menu:id=".uno:ImageMapDialog"/>
+ <menu:menuitem menu:id=".uno:ObjectMenue"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ViewMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:PrintLayout"/>
+ <menu:menuitem menu:id=".uno:BrowseView"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AvailableToolbars"/>
+ <menu:menuitem menu:id=".uno:StatusBarVisible"/>
+ <menu:menuitem menu:id=".uno:ShowImeStatusWindow"/>
+ <menu:menuitem menu:id=".uno:Ruler"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ViewBounds"/>
+ <menu:menuitem menu:id=".uno:Marks"/>
+ <menu:menuitem menu:id=".uno:Fieldnames"/>
+ <menu:menuitem menu:id=".uno:ControlCodes"/>
+ <menu:menuitem menu:id=".uno:ShowHiddenParagraphs"/>
+ <menu:menuitem menu:id=".uno:ShowAnnotations"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ViewDataSourceBrowser"/>
+ <menu:menuitem menu:id=".uno:Navigator"/>
+ <menu:menuitem menu:id=".uno:TaskPane"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FullScreen"/>
+ <menu:menuitem menu:id=".uno:Zoom"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:InsertMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:InsertBreak"/>
+ <menu:menu menu:id=".uno:FieldMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:ResetAttributes"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:FontDialog"/>
- <menu:menuitem menu:id=".uno:ParagraphDialog"/>
- <menu:menuitem menu:id=".uno:BulletsAndNumberingDialog"/>
- <menu:menuitem menu:id=".uno:PageDialog"/>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:TransliterateMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:RubyDialog"/>
- <menu:menuitem menu:id=".uno:FormatColumns"/>
- <menu:menuitem menu:id=".uno:EditRegion"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:DesignerDialog"/>
- <menu:menu menu:id=".uno:AutoFormatMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:OnlineAutoFormat"/>
- <menu:menuitem menu:id=".uno:AutoFormatApply"/>
- <menu:menuitem menu:id=".uno:AutoFormatRedlineApply"/>
- <menu:menuitem menu:id=".uno:AutoCorrectDlg"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:AnchorMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SetAnchorToPage"/>
- <menu:menuitem menu:id=".uno:SetAnchorToPara"/>
- <menu:menuitem menu:id=".uno:SetAnchorAtChar"/>
- <menu:menuitem menu:id=".uno:SetAnchorToChar"/>
- <menu:menuitem menu:id=".uno:SetAnchorToFrame"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:WrapMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:WrapOff"/>
- <menu:menuitem menu:id=".uno:WrapOn"/>
- <menu:menuitem menu:id=".uno:WrapIdeal"/>
- <menu:menuitem menu:id=".uno:WrapThrough"/>
- <menu:menuitem menu:id=".uno:WrapThroughTransparent"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:WrapContour"/>
- <menu:menuitem menu:id=".uno:ContourDialog"/>
- <menu:menuitem menu:id=".uno:WrapAnchorOnly"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:TextWrap"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ObjectAlign">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:CommonAlignLeft"/>
- <menu:menuitem menu:id=".uno:CommonAlignHorizontalCenter"/>
- <menu:menuitem menu:id=".uno:CommonAlignRight"/>
- <menu:menuitem menu:id=".uno:CommonAlignJustified"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:CommonAlignTop"/>
- <menu:menuitem menu:id=".uno:CommonAlignVerticalCenter"/>
- <menu:menuitem menu:id=".uno:CommonAlignBottom"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ArrangeMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:BringToFront"/>
- <menu:menuitem menu:id=".uno:ObjectForwardOne"/>
- <menu:menuitem menu:id=".uno:ObjectBackOne"/>
- <menu:menuitem menu:id=".uno:SendToBack"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SetObjectToForeground"/>
- <menu:menuitem menu:id=".uno:SetObjectToBackground"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:FlipMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:FlipHorizontal"/>
- <menu:menuitem menu:id=".uno:FlipVertical"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:GroupMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:FormatGroup"/>
- <menu:menuitem menu:id=".uno:FormatUngroup"/>
- <menu:menuitem menu:id=".uno:EnterGroup"/>
- <menu:menuitem menu:id=".uno:LeaveGroup"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:ObjectMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:TransformDialog"/>
- <menu:menuitem menu:id=".uno:FormatLine"/>
- <menu:menuitem menu:id=".uno:FormatArea"/>
- <menu:menuitem menu:id=".uno:TextAttributes"/>
- <menu:menuitem menu:id=".uno:FontWork"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ObjectTitleDescription"/>
- <menu:menuitem menu:id=".uno:NameGroup"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:FrameDialog"/>
- <menu:menuitem menu:id=".uno:GraphicDialog"/>
+ <menu:menuitem menu:id=".uno:InsertDateField"/>
+ <menu:menuitem menu:id=".uno:InsertTimeField"/>
+ <menu:menuitem menu:id=".uno:InsertPageNumberField"/>
+ <menu:menuitem menu:id=".uno:InsertPageCountField"/>
+ <menu:menuitem menu:id=".uno:InsertTopicField"/>
+ <menu:menuitem menu:id=".uno:InsertTitleField"/>
+ <menu:menuitem menu:id=".uno:InsertAuthorField"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertField"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:TableMenu">
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:InsertSymbol"/>
+ <menu:menu menu:id=".uno:FormattingMarkMenu">
<menu:menupopup>
- <menu:menu menu:id=".uno:TableInsertMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertTable"/>
- <menu:menuitem menu:id=".uno:InsertRowDialog"/>
- <menu:menuitem menu:id=".uno:InsertColumnDialog"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:TableDeleteMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:DeleteTable"/>
- <menu:menuitem menu:id=".uno:DeleteRows"/>
- <menu:menuitem menu:id=".uno:DeleteColumns"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:TableSelectMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SelectTable"/>
- <menu:menuitem menu:id=".uno:EntireRow"/>
- <menu:menuitem menu:id=".uno:EntireColumn"/>
- <menu:menuitem menu:id=".uno:EntireCell"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:MergeCells"/>
- <menu:menuitem menu:id=".uno:SplitCell"/>
- <menu:menuitem menu:id=".uno:Protect"/>
- <menu:menuitem menu:id=".uno:MergeTable"/>
- <menu:menuitem menu:id=".uno:SplitTable"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AutoFormat"/>
- <menu:menu menu:id=".uno:TableAutoFitMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SetColumnWidth"/>
- <menu:menuitem menu:id=".uno:SetOptimalColumnWidth"/>
- <menu:menuitem menu:id=".uno:DistributeColumns"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SetRowHeight"/>
- <menu:menuitem menu:id=".uno:SetOptimalRowHeight"/>
- <menu:menuitem menu:id=".uno:DistributeRows"/>
- <menu:menuitem menu:id=".uno:RowSplit"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:HeadingRowsRepeat"/>
- <menu:menu menu:id=".uno:TableConvertMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:ConvertTextToTable"/>
- <menu:menuitem menu:id=".uno:ConvertTableToText"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:TableSort"/>
- <menu:menuitem menu:id=".uno:InsertFormula"/>
- <menu:menuitem menu:id=".uno:TableNumberFormatDialog"/>
- <menu:menuitem menu:id=".uno:TableBoundaries"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:TableDialog"/>
+ <menu:menuitem menu:id=".uno:InsertNonBreakingSpace"/>
+ <menu:menuitem menu:id=".uno:InsertHardHyphen"/>
+ <menu:menuitem menu:id=".uno:InsertSoftHyphen"/>
+ <menu:menuitem menu:id=".uno:InsertZWSP"/>
+ <menu:menuitem menu:id=".uno:InsertZWNBSP"/>
+ <menu:menuitem menu:id=".uno:InsertLRM"/>
+ <menu:menuitem menu:id=".uno:InsertRLM"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ToolsMenu">
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertSection"/>
+ <menu:menuitem menu:id=".uno:HyperlinkDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertPageHeader"/>
+ <menu:menuitem menu:id=".uno:InsertPageFooter"/>
+ <menu:menuitem menu:id=".uno:InsertFootnoteDialog"/>
+ <menu:menuitem menu:id=".uno:InsertCaptionDialog"/>
+ <menu:menuitem menu:id=".uno:InsertBookmark"/>
+ <menu:menuitem menu:id=".uno:InsertReferenceField"/>
+ <menu:menuitem menu:id=".uno:InsertAnnotation"/>
+ <menu:menuitem menu:id=".uno:InsertScript"/>
+ <menu:menu menu:id=".uno:IndexesMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:SpellingAndGrammarDialog"/>
- <menu:menu menu:id=".uno:LanguageMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:HangulHanjaConversion"/>
- <menu:menuitem menu:id=".uno:ChineseConversion"/>
- <menu:menuitem menu:id=".uno:ThesaurusDialog"/>
- <menu:menuitem menu:id=".uno:Hyphenate"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MoreDictionaries"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:WordCountDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ChapterNumberingDialog"/>
- <menu:menuitem menu:id=".uno:LineNumberingDialog"/>
- <menu:menuitem menu:id=".uno:FootnoteDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Gallery"/>
- <menu:menuitem menu:id=".uno:AVMediaPlayer"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:BibliographyComponent"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MailMergeWizard"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SortDialog"/>
- <menu:menuitem menu:id=".uno:CalculateSel"/>
- <menu:menu menu:id=".uno:UpdateMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:UpdateAll"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:UpdateFields"/>
- <menu:menuitem menu:id=".uno:UpdateAllLinks"/>
- <menu:menuitem menu:id=".uno:UpdateCharts"/>
- <menu:menuitem menu:id=".uno:UpdateCurIndex"/>
- <menu:menuitem menu:id=".uno:UpdateAllIndexes"/>
- <menu:menuitem menu:id=".uno:Repaginate"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:MacrosMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:MacroRecorder"/>
- <menu:menuitem menu:id=".uno:RunMacro"/>
- <menu:menu menu:id=".uno:ScriptOrganizer"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MacroOrganizer?TabId:short=1"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id="service:com.sun.star.deployment.ui.PackageManagerDialog"/>
- <menu:menuitem menu:id=".uno:OpenXMLFilterSettings"/>
- <menu:menuitem menu:id=".uno:AutoCorrectDlg"/>
- <menu:menuitem menu:id=".uno:ConfigureDialog"/>
- <menu:menuitem menu:id=".uno:OptionsTreeDialog"/>
+ <menu:menuitem menu:id=".uno:InsertIndexesEntry"/>
+ <menu:menuitem menu:id=".uno:InsertMultiIndex"/>
+ <menu:menuitem menu:id=".uno:InsertAuthoritiesEntry"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertEnvelope"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertFrame"/>
+ <menu:menuitem menu:id=".uno:InsertTable"/>
+ <menu:menuitem menu:id=".uno:InsertGraphicRuler"/>
+ <menu:menu menu:id=".uno:GraphicMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:InsertGraphic"/>
+ <menu:menu menu:id=".uno:Scan">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:TwainSelect"/>
+ <menu:menuitem menu:id=".uno:TwainTransfer"/>
+ </menu:menupopup>
+ </menu:menu>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:InsertAVMedia"/>
+ <menu:menu menu:id=".uno:ObjectMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:InsertObject"/>
+ <menu:menuitem menu:id=".uno:InsertPlugin"/>
+ <menu:menuitem menu:id=".uno:InsertSound"/>
+ <menu:menuitem menu:id=".uno:InsertVideo"/>
+ <menu:menuitem menu:id=".uno:InsertObjectStarMath"/>
+ <menu:menuitem menu:id=".uno:InsertObjectChart"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:InsertObjectFloatingFrame"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertDoc"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:FormatMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:ResetAttributes"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FontDialog"/>
+ <menu:menuitem menu:id=".uno:ParagraphDialog"/>
+ <menu:menuitem menu:id=".uno:BulletsAndNumberingDialog"/>
+ <menu:menuitem menu:id=".uno:PageDialog"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:TransliterateMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:ChangeCaseToSentenceCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToTitleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToToggleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:RubyDialog"/>
+ <menu:menuitem menu:id=".uno:FormatColumns"/>
+ <menu:menuitem menu:id=".uno:EditRegion"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:DesignerDialog"/>
+ <menu:menu menu:id=".uno:AutoFormatMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:OnlineAutoFormat"/>
+ <menu:menuitem menu:id=".uno:AutoFormatApply"/>
+ <menu:menuitem menu:id=".uno:AutoFormatRedlineApply"/>
+ <menu:menuitem menu:id=".uno:AutoCorrectDlg"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:AnchorMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SetAnchorToPage" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetAnchorToPara" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetAnchorAtChar" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetAnchorToChar" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetAnchorToFrame" menu:style="radio"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:WrapMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:WrapOff"/>
+ <menu:menuitem menu:id=".uno:WrapOn"/>
+ <menu:menuitem menu:id=".uno:WrapIdeal"/>
+ <menu:menuitem menu:id=".uno:WrapThrough"/>
+ <menu:menuitem menu:id=".uno:WrapThroughTransparent"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:WrapContour"/>
+ <menu:menuitem menu:id=".uno:ContourDialog"/>
+ <menu:menuitem menu:id=".uno:WrapAnchorOnly"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:TextWrap"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ObjectAlign">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:CommonAlignLeft" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:CommonAlignHorizontalCenter" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:CommonAlignRight" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:CommonAlignJustified" menu:style="radio"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:CommonAlignTop"/>
+ <menu:menuitem menu:id=".uno:CommonAlignVerticalCenter"/>
+ <menu:menuitem menu:id=".uno:CommonAlignBottom"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ArrangeMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:BringToFront"/>
+ <menu:menuitem menu:id=".uno:ObjectForwardOne"/>
+ <menu:menuitem menu:id=".uno:ObjectBackOne"/>
+ <menu:menuitem menu:id=".uno:SendToBack"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SetObjectToForeground"/>
+ <menu:menuitem menu:id=".uno:SetObjectToBackground"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:FlipMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:FlipHorizontal"/>
+ <menu:menuitem menu:id=".uno:FlipVertical"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:GroupMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:FormatGroup"/>
+ <menu:menuitem menu:id=".uno:FormatUngroup"/>
+ <menu:menuitem menu:id=".uno:EnterGroup"/>
+ <menu:menuitem menu:id=".uno:LeaveGroup"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:ObjectMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:TransformDialog"/>
+ <menu:menuitem menu:id=".uno:FormatLine"/>
+ <menu:menuitem menu:id=".uno:FormatArea"/>
+ <menu:menuitem menu:id=".uno:TextAttributes"/>
+ <menu:menuitem menu:id=".uno:FontWork"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ObjectTitleDescription"/>
+ <menu:menuitem menu:id=".uno:NameGroup"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:FrameDialog"/>
+ <menu:menuitem menu:id=".uno:GraphicDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:TableMenu">
+ <menu:menupopup>
+ <menu:menu menu:id=".uno:TableInsertMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:InsertTable"/>
+ <menu:menuitem menu:id=".uno:InsertRowDialog"/>
+ <menu:menuitem menu:id=".uno:InsertColumnDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:TableDeleteMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:DeleteTable"/>
+ <menu:menuitem menu:id=".uno:DeleteRows"/>
+ <menu:menuitem menu:id=".uno:DeleteColumns"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:WindowList">
+ </menu:menu>
+ <menu:menu menu:id=".uno:TableSelectMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:NewWindow"/>
- <menu:menuitem menu:id=".uno:CloseWin"/>
- <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SelectTable"/>
+ <menu:menuitem menu:id=".uno:EntireRow"/>
+ <menu:menuitem menu:id=".uno:EntireColumn"/>
+ <menu:menuitem menu:id=".uno:EntireCell"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:HelpMenu">
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:MergeCells"/>
+ <menu:menuitem menu:id=".uno:SplitCell"/>
+ <menu:menuitem menu:id=".uno:Protect"/>
+ <menu:menuitem menu:id=".uno:MergeTable"/>
+ <menu:menuitem menu:id=".uno:SplitTable"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AutoFormat"/>
+ <menu:menu menu:id=".uno:TableAutoFitMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:HelpIndex"/>
- <menu:menuitem menu:id=".uno:ExtendedHelp"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HelpSupport"/>
- <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:About"/>
+ <menu:menuitem menu:id=".uno:SetColumnWidth"/>
+ <menu:menuitem menu:id=".uno:SetOptimalColumnWidth"/>
+ <menu:menuitem menu:id=".uno:DistributeColumns"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SetRowHeight"/>
+ <menu:menuitem menu:id=".uno:SetOptimalRowHeight"/>
+ <menu:menuitem menu:id=".uno:DistributeRows"/>
+ <menu:menuitem menu:id=".uno:RowSplit"/>
</menu:menupopup>
- </menu:menu>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:HeadingRowsRepeat"/>
+ <menu:menu menu:id=".uno:TableConvertMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:ConvertTextToTable"/>
+ <menu:menuitem menu:id=".uno:ConvertTableToText"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:TableSort"/>
+ <menu:menuitem menu:id=".uno:InsertFormula"/>
+ <menu:menuitem menu:id=".uno:TableNumberFormatDialog"/>
+ <menu:menuitem menu:id=".uno:TableBoundaries"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:TableDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ToolsMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SpellingAndGrammarDialog"/>
+ <menu:menu menu:id=".uno:LanguageMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:HangulHanjaConversion"/>
+ <menu:menuitem menu:id=".uno:ChineseConversion"/>
+ <menu:menuitem menu:id=".uno:ThesaurusDialog"/>
+ <menu:menuitem menu:id=".uno:Hyphenate"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MoreDictionaries"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:WordCountDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ChapterNumberingDialog"/>
+ <menu:menuitem menu:id=".uno:LineNumberingDialog"/>
+ <menu:menuitem menu:id=".uno:FootnoteDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Gallery"/>
+ <menu:menuitem menu:id=".uno:AVMediaPlayer"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:BibliographyComponent"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MailMergeWizard"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SortDialog"/>
+ <menu:menuitem menu:id=".uno:CalculateSel"/>
+ <menu:menu menu:id=".uno:UpdateMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:UpdateAll"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:UpdateFields"/>
+ <menu:menuitem menu:id=".uno:UpdateAllLinks"/>
+ <menu:menuitem menu:id=".uno:UpdateCharts"/>
+ <menu:menuitem menu:id=".uno:UpdateCurIndex"/>
+ <menu:menuitem menu:id=".uno:UpdateAllIndexes"/>
+ <menu:menuitem menu:id=".uno:Repaginate"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:MacrosMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:MacroRecorder"/>
+ <menu:menuitem menu:id=".uno:RunMacro"/>
+ <menu:menu menu:id=".uno:ScriptOrganizer"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MacroOrganizer?TabId:short=1"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id="service:com.sun.star.deployment.ui.PackageManagerDialog"/>
+ <menu:menuitem menu:id=".uno:OpenXMLFilterSettings"/>
+ <menu:menuitem menu:id=".uno:AutoCorrectDlg"/>
+ <menu:menuitem menu:id=".uno:ConfigureDialog"/>
+ <menu:menuitem menu:id=".uno:OptionsTreeDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:WindowList">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:NewWindow"/>
+ <menu:menuitem menu:id=".uno:CloseWin"/>
+ <menu:menuseparator/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:HelpMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:HelpIndex"/>
+ <menu:menuitem menu:id=".uno:ExtendedHelp"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:HelpSupport"/>
+ <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:About"/>
+ </menu:menupopup>
+ </menu:menu>
</menu:menubar>
diff --git a/sw/uiconfig/swform/toolbar/extrusionobjectbar.xml b/sw/uiconfig/swform/toolbar/extrusionobjectbar.xml
index 1f212226cf..148849db6e 100644
--- a/sw/uiconfig/swform/toolbar/extrusionobjectbar.xml
+++ b/sw/uiconfig/swform/toolbar/extrusionobjectbar.xml
@@ -8,9 +8,9 @@
<toolbar:toolbaritem xlink:href=".uno:ExtrusionTiltLeft" toolbar:helpid="10963"/>
<toolbar:toolbaritem xlink:href=".uno:ExtrusionTiltRight" toolbar:helpid="10964"/>
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionDepthFloater" toolbar:helpid="10965"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionDirectionFloater" toolbar:helpid="10966"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionLightingFloater" toolbar:helpid="10967"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionSurfaceFloater" toolbar:helpid="10968"/>
- <toolbar:toolbaritem xlink:href=".uno:Extrusion3DColor" toolbar:helpid="10969"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionDepthFloater" toolbar:helpid="10965" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionDirectionFloater" toolbar:helpid="10966" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionLightingFloater" toolbar:helpid="10967" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionSurfaceFloater" toolbar:helpid="10968" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:Extrusion3DColor" toolbar:helpid="10969" toolbar:style="dropdownonly"/>
</toolbar:toolbar> \ No newline at end of file
diff --git a/sw/uiconfig/swform/toolbar/fontworkobjectbar.xml b/sw/uiconfig/swform/toolbar/fontworkobjectbar.xml
index 3ac334e0e9..5219a1e235 100644
--- a/sw/uiconfig/swform/toolbar/fontworkobjectbar.xml
+++ b/sw/uiconfig/swform/toolbar/fontworkobjectbar.xml
@@ -3,9 +3,9 @@
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
<toolbar:toolbaritem xlink:href=".uno:FontworkGalleryFloater" toolbar:helpid="helpid:10977" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:FontworkShapeType" toolbar:helpid="helpid:10978" toolbar:style="radio dropdown" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkShapeType" toolbar:helpid="helpid:10978" toolbar:style="dropdownonly" />
<toolbar:toolbaritem xlink:href=".uno:FontworkSameLetterHeights" toolbar:helpid="helpid:10979" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:FontworkAlignmentFloater" toolbar:helpid="helpid:10981" toolbar:style="dropdown" />
- <toolbar:toolbaritem xlink:href=".uno:FontworkCharacterSpacingFloater" toolbar:helpid="helpid:10982" toolbar:style="dropdown" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkAlignmentFloater" toolbar:helpid="helpid:10981" toolbar:style="dropdownonly" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkCharacterSpacingFloater" toolbar:helpid="helpid:10982" toolbar:style="dropdownonly" />
</toolbar:toolbar> \ No newline at end of file
diff --git a/sw/uiconfig/swreport/accelerator/de/default.xml b/sw/uiconfig/swreport/accelerator/de/default.xml
deleted file mode 100644
index b134a2a41a..0000000000
--- a/sw/uiconfig/swreport/accelerator/de/default.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_K" accel:shift="true" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_U" accel:shift="true" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_B" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_G" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_H" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_T" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/swreport/accelerator/en-GB/default.xml b/sw/uiconfig/swreport/accelerator/en-GB/default.xml
deleted file mode 100644
index 83f88ade9d..0000000000
--- a/sw/uiconfig/swreport/accelerator/en-GB/default.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_I" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_B" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_U" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_X" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveDirectCharFormats"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_C" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/swreport/accelerator/en-US/default.xml b/sw/uiconfig/swreport/accelerator/en-US/default.xml
deleted file mode 100644
index 83f88ade9d..0000000000
--- a/sw/uiconfig/swreport/accelerator/en-US/default.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_I" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_B" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_U" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_X" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveDirectCharFormats"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_C" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/swreport/accelerator/es/default.xml b/sw/uiconfig/swreport/accelerator/es/default.xml
deleted file mode 100644
index 12f1aa3ab8..0000000000
--- a/sw/uiconfig/swreport/accelerator/es/default.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_K" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_S" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_T" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/swreport/accelerator/fr/default.xml b/sw/uiconfig/swreport/accelerator/fr/default.xml
deleted file mode 100644
index ac445d4a5a..0000000000
--- a/sw/uiconfig/swreport/accelerator/fr/default.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_I" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_G" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_U" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/swreport/menubar/menubar.xml b/sw/uiconfig/swreport/menubar/menubar.xml
index 1f94b7ced1..69b65cfd3e 100644
--- a/sw/uiconfig/swreport/menubar/menubar.xml
+++ b/sw/uiconfig/swreport/menubar/menubar.xml
@@ -1,452 +1,456 @@
<?xml version="1.0" encoding="UTF-8"?>
<menu:menubar xmlns:menu="http://openoffice.org/2001/menu" menu:id="menubar">
- <menu:menu menu:id=".uno:PickList">
+ <menu:menu menu:id=".uno:PickList">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:AddDirect"/>
+ <menu:menuitem menu:id=".uno:Open"/>
+ <menu:menuitem menu:id=".uno:RecentFileList"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AutoPilotMenu"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:CloseDoc"/>
+ <menu:menuitem menu:id=".uno:Save"/>
+ <menu:menuitem menu:id=".uno:SaveAs"/>
+ <menu:menuitem menu:id=".uno:SaveAll"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Reload"/>
+ <menu:menuitem menu:id=".uno:VersionDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ExportTo"/>
+ <menu:menuitem menu:id=".uno:ExportToPDF"/>
+ <menu:menu menu:id=".uno:SendToMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:AddDirect"/>
- <menu:menuitem menu:id=".uno:Open"/>
- <menu:menuitem menu:id=".uno:RecentFileList"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AutoPilotMenu"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:CloseDoc"/>
- <menu:menuitem menu:id=".uno:Save"/>
- <menu:menuitem menu:id=".uno:SaveAs"/>
- <menu:menuitem menu:id=".uno:SaveAll"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Reload"/>
- <menu:menuitem menu:id=".uno:VersionDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ExportTo"/>
- <menu:menuitem menu:id=".uno:ExportToPDF"/>
- <menu:menu menu:id=".uno:SendToMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SendMail"/>
- <menu:menuitem menu:id=".uno:SendMailDocAsOOo"/>
- <menu:menuitem menu:id=".uno:SendMailDocAsMS"/>
- <menu:menuitem menu:id=".uno:SendMailDocAsPDF"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:NewGlobalDoc"/>
- <menu:menuitem menu:id=".uno:NewHtmlDoc"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SendOutlineToStarImpress"/>
- <menu:menuitem menu:id=".uno:SendOutlineToClipboard"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:CreateAbstract"/>
- <menu:menuitem menu:id=".uno:SendAbstractToStarImpress"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SetDocumentProperties"/>
- <menu:menu menu:id=".uno:TemplateMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:Organizer"/>
- <menu:menuitem menu:id=".uno:AddressBookSource"/>
- <menu:menuitem menu:id=".uno:SaveAsTemplate"/>
- <menu:menuitem menu:id=".uno:OpenTemplate"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:PrintPreview"/>
- <menu:menuitem menu:id=".uno:Print"/>
- <menu:menuitem menu:id=".uno:PrinterSetup"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Quit"/>
+ <menu:menuitem menu:id=".uno:SendMail"/>
+ <menu:menuitem menu:id=".uno:SendMailDocAsOOo"/>
+ <menu:menuitem menu:id=".uno:SendMailDocAsMS"/>
+ <menu:menuitem menu:id=".uno:SendMailDocAsPDF"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:NewGlobalDoc"/>
+ <menu:menuitem menu:id=".uno:NewHtmlDoc"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SendOutlineToStarImpress"/>
+ <menu:menuitem menu:id=".uno:SendOutlineToClipboard"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:CreateAbstract"/>
+ <menu:menuitem menu:id=".uno:SendAbstractToStarImpress"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:EditMenu">
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SetDocumentProperties"/>
+ <menu:menu menu:id=".uno:TemplateMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:Undo"/>
- <menu:menuitem menu:id=".uno:Redo"/>
- <menu:menuitem menu:id=".uno:Repeat"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Cut"/>
- <menu:menuitem menu:id=".uno:Copy"/>
- <menu:menuitem menu:id=".uno:Paste"/>
- <menu:menuitem menu:id=".uno:PasteSpecial"/>
- <menu:menuitem menu:id=".uno:SelectTextMode"/>
- <menu:menu menu:id=".uno:SelectionModeMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SelectionModeDefault"/>
- <menu:menuitem menu:id=".uno:SelectionModeBlock"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:SelectAll"/>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:ChangesMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:TrackChanges"/>
- <menu:menuitem menu:id=".uno:ProtectTraceChangeMode"/>
- <menu:menuitem menu:id=".uno:ShowTrackedChanges"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AcceptTrackedChanges"/>
- <menu:menuitem menu:id=".uno:CommentChangeTracking"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MergeDocuments"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:CompareDocuments"/>
- <menu:menuitem menu:id=".uno:SearchDialog"/>
- <menu:menuitem menu:id=".uno:EditGlossary"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ChangeDatabaseField"/>
- <menu:menuitem menu:id=".uno:FieldDialog"/>
- <menu:menuitem menu:id=".uno:EditFootnote"/>
- <menu:menuitem menu:id=".uno:IndexEntryDialog"/>
- <menu:menuitem menu:id=".uno:AuthoritiesEntryDialog"/>
- <menu:menuitem menu:id=".uno:EditHyperlink"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:LinkDialog"/>
- <menu:menuitem menu:id=".uno:PlugInsActive"/>
- <menu:menuitem menu:id=".uno:ImageMapDialog"/>
- <menu:menuitem menu:id=".uno:ObjectMenue"/>
+ <menu:menuitem menu:id=".uno:Organizer"/>
+ <menu:menuitem menu:id=".uno:AddressBookSource"/>
+ <menu:menuitem menu:id=".uno:SaveAsTemplate"/>
+ <menu:menuitem menu:id=".uno:OpenTemplate"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ViewMenu">
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:PrintPreview"/>
+ <menu:menuitem menu:id=".uno:Print"/>
+ <menu:menuitem menu:id=".uno:PrinterSetup"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Quit"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:EditMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:Undo"/>
+ <menu:menuitem menu:id=".uno:Redo"/>
+ <menu:menuitem menu:id=".uno:Repeat"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Cut"/>
+ <menu:menuitem menu:id=".uno:Copy"/>
+ <menu:menuitem menu:id=".uno:Paste"/>
+ <menu:menuitem menu:id=".uno:PasteSpecial"/>
+ <menu:menuitem menu:id=".uno:SelectTextMode"/>
+ <menu:menu menu:id=".uno:SelectionModeMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:PrintLayout"/>
- <menu:menuitem menu:id=".uno:BrowseView"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AvailableToolbars"/>
- <menu:menuitem menu:id=".uno:StatusBarVisible"/>
- <menu:menuitem menu:id=".uno:ShowImeStatusWindow"/>
- <menu:menuitem menu:id=".uno:Ruler"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ViewBounds"/>
- <menu:menuitem menu:id=".uno:Marks"/>
- <menu:menuitem menu:id=".uno:Fieldnames"/>
- <menu:menuitem menu:id=".uno:ControlCodes"/>
- <menu:menuitem menu:id=".uno:ShowHiddenParagraphs"/>
- <menu:menuitem menu:id=".uno:ShowAnnotations"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ViewDataSourceBrowser"/>
- <menu:menuitem menu:id=".uno:Navigator"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:FullScreen"/>
- <menu:menuitem menu:id=".uno:Zoom"/>
+ <menu:menuitem menu:id=".uno:SelectionModeDefault" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SelectionModeBlock" menu:style="radio"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:InsertMenu">
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:SelectAll"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:ChangesMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertBreak"/>
- <menu:menu menu:id=".uno:FieldMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertDateField"/>
- <menu:menuitem menu:id=".uno:InsertTimeField"/>
- <menu:menuitem menu:id=".uno:InsertPageNumberField"/>
- <menu:menuitem menu:id=".uno:InsertPageCountField"/>
- <menu:menuitem menu:id=".uno:InsertTopicField"/>
- <menu:menuitem menu:id=".uno:InsertTitleField"/>
- <menu:menuitem menu:id=".uno:InsertAuthorField"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertField"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:InsertSymbol"/>
- <menu:menu menu:id=".uno:FormattingMarkMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertNonBreakingSpace"/>
- <menu:menuitem menu:id=".uno:InsertHardHyphen"/>
- <menu:menuitem menu:id=".uno:InsertSoftHyphen"/>
- <menu:menuitem menu:id=".uno:InsertZWSP"/>
- <menu:menuitem menu:id=".uno:InsertZWNBSP"/>
- <menu:menuitem menu:id=".uno:InsertLRM"/>
- <menu:menuitem menu:id=".uno:InsertRLM"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertSection"/>
- <menu:menuitem menu:id=".uno:HyperlinkDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertPageHeader"/>
- <menu:menuitem menu:id=".uno:InsertPageFooter"/>
- <menu:menuitem menu:id=".uno:InsertFootnoteDialog"/>
- <menu:menuitem menu:id=".uno:InsertCaptionDialog"/>
- <menu:menuitem menu:id=".uno:InsertBookmark"/>
- <menu:menuitem menu:id=".uno:InsertReferenceField"/>
- <menu:menuitem menu:id=".uno:InsertAnnotation"/>
- <menu:menuitem menu:id=".uno:InsertScript"/>
- <menu:menu menu:id=".uno:IndexesMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertIndexesEntry"/>
- <menu:menuitem menu:id=".uno:InsertMultiIndex"/>
- <menu:menuitem menu:id=".uno:InsertAuthoritiesEntry"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertEnvelope"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertFrame"/>
- <menu:menuitem menu:id=".uno:InsertTable"/>
- <menu:menuitem menu:id=".uno:InsertGraphicRuler"/>
- <menu:menu menu:id=".uno:GraphicMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertGraphic"/>
- <menu:menu menu:id=".uno:Scan">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:TwainSelect"/>
- <menu:menuitem menu:id=".uno:TwainTransfer"/>
- </menu:menupopup>
- </menu:menu>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:InsertAVMedia"/>
- <menu:menu menu:id=".uno:ObjectMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertObject"/>
- <menu:menuitem menu:id=".uno:InsertPlugin"/>
- <menu:menuitem menu:id=".uno:InsertSound"/>
- <menu:menuitem menu:id=".uno:InsertVideo"/>
- <menu:menuitem menu:id=".uno:InsertObjectStarMath"/>
- <menu:menuitem menu:id=".uno:InsertObjectChart"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:InsertObjectFloatingFrame"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertDoc"/>
+ <menu:menuitem menu:id=".uno:TrackChanges"/>
+ <menu:menuitem menu:id=".uno:ProtectTraceChangeMode"/>
+ <menu:menuitem menu:id=".uno:ShowTrackedChanges"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AcceptTrackedChanges"/>
+ <menu:menuitem menu:id=".uno:CommentChangeTracking"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MergeDocuments"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:FormatMenu">
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:CompareDocuments"/>
+ <menu:menuitem menu:id=".uno:SearchDialog"/>
+ <menu:menuitem menu:id=".uno:EditGlossary"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ChangeDatabaseField"/>
+ <menu:menuitem menu:id=".uno:FieldDialog"/>
+ <menu:menuitem menu:id=".uno:EditFootnote"/>
+ <menu:menuitem menu:id=".uno:IndexEntryDialog"/>
+ <menu:menuitem menu:id=".uno:AuthoritiesEntryDialog"/>
+ <menu:menuitem menu:id=".uno:EditHyperlink"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:LinkDialog"/>
+ <menu:menuitem menu:id=".uno:PlugInsActive"/>
+ <menu:menuitem menu:id=".uno:ImageMapDialog"/>
+ <menu:menuitem menu:id=".uno:ObjectMenue"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ViewMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:PrintLayout"/>
+ <menu:menuitem menu:id=".uno:BrowseView"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AvailableToolbars"/>
+ <menu:menuitem menu:id=".uno:StatusBarVisible"/>
+ <menu:menuitem menu:id=".uno:ShowImeStatusWindow"/>
+ <menu:menuitem menu:id=".uno:Ruler"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ViewBounds"/>
+ <menu:menuitem menu:id=".uno:Marks"/>
+ <menu:menuitem menu:id=".uno:Fieldnames"/>
+ <menu:menuitem menu:id=".uno:ControlCodes"/>
+ <menu:menuitem menu:id=".uno:ShowHiddenParagraphs"/>
+ <menu:menuitem menu:id=".uno:ShowAnnotations"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ViewDataSourceBrowser"/>
+ <menu:menuitem menu:id=".uno:Navigator"/>
+ <menu:menuitem menu:id=".uno:TaskPane"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FullScreen"/>
+ <menu:menuitem menu:id=".uno:Zoom"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:InsertMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:InsertBreak"/>
+ <menu:menu menu:id=".uno:FieldMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:ResetAttributes"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:FontDialog"/>
- <menu:menuitem menu:id=".uno:ParagraphDialog"/>
- <menu:menuitem menu:id=".uno:BulletsAndNumberingDialog"/>
- <menu:menuitem menu:id=".uno:PageDialog"/>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:TransliterateMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:RubyDialog"/>
- <menu:menuitem menu:id=".uno:FormatColumns"/>
- <menu:menuitem menu:id=".uno:EditRegion"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:DesignerDialog"/>
- <menu:menu menu:id=".uno:AutoFormatMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:OnlineAutoFormat"/>
- <menu:menuitem menu:id=".uno:AutoFormatApply"/>
- <menu:menuitem menu:id=".uno:AutoFormatRedlineApply"/>
- <menu:menuitem menu:id=".uno:AutoCorrectDlg"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:AnchorMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SetAnchorToPage"/>
- <menu:menuitem menu:id=".uno:SetAnchorToPara"/>
- <menu:menuitem menu:id=".uno:SetAnchorAtChar"/>
- <menu:menuitem menu:id=".uno:SetAnchorToChar"/>
- <menu:menuitem menu:id=".uno:SetAnchorToFrame"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:WrapMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:WrapOff"/>
- <menu:menuitem menu:id=".uno:WrapOn"/>
- <menu:menuitem menu:id=".uno:WrapIdeal"/>
- <menu:menuitem menu:id=".uno:WrapThrough"/>
- <menu:menuitem menu:id=".uno:WrapThroughTransparent"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:WrapContour"/>
- <menu:menuitem menu:id=".uno:ContourDialog"/>
- <menu:menuitem menu:id=".uno:WrapAnchorOnly"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:TextWrap"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ObjectAlign">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:CommonAlignLeft"/>
- <menu:menuitem menu:id=".uno:CommonAlignHorizontalCenter"/>
- <menu:menuitem menu:id=".uno:CommonAlignRight"/>
- <menu:menuitem menu:id=".uno:CommonAlignJustified"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:CommonAlignTop"/>
- <menu:menuitem menu:id=".uno:CommonAlignVerticalCenter"/>
- <menu:menuitem menu:id=".uno:CommonAlignBottom"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ArrangeMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:BringToFront"/>
- <menu:menuitem menu:id=".uno:ObjectForwardOne"/>
- <menu:menuitem menu:id=".uno:ObjectBackOne"/>
- <menu:menuitem menu:id=".uno:SendToBack"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SetObjectToForeground"/>
- <menu:menuitem menu:id=".uno:SetObjectToBackground"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:FlipMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:FlipHorizontal"/>
- <menu:menuitem menu:id=".uno:FlipVertical"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:GroupMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:FormatGroup"/>
- <menu:menuitem menu:id=".uno:FormatUngroup"/>
- <menu:menuitem menu:id=".uno:EnterGroup"/>
- <menu:menuitem menu:id=".uno:LeaveGroup"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:ObjectMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:TransformDialog"/>
- <menu:menuitem menu:id=".uno:FormatLine"/>
- <menu:menuitem menu:id=".uno:FormatArea"/>
- <menu:menuitem menu:id=".uno:TextAttributes"/>
- <menu:menuitem menu:id=".uno:FontWork"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ObjectTitleDescription"/>
- <menu:menuitem menu:id=".uno:NameGroup"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:FrameDialog"/>
- <menu:menuitem menu:id=".uno:GraphicDialog"/>
+ <menu:menuitem menu:id=".uno:InsertDateField"/>
+ <menu:menuitem menu:id=".uno:InsertTimeField"/>
+ <menu:menuitem menu:id=".uno:InsertPageNumberField"/>
+ <menu:menuitem menu:id=".uno:InsertPageCountField"/>
+ <menu:menuitem menu:id=".uno:InsertTopicField"/>
+ <menu:menuitem menu:id=".uno:InsertTitleField"/>
+ <menu:menuitem menu:id=".uno:InsertAuthorField"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertField"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:TableMenu">
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:InsertSymbol"/>
+ <menu:menu menu:id=".uno:FormattingMarkMenu">
<menu:menupopup>
- <menu:menu menu:id=".uno:TableInsertMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertTable"/>
- <menu:menuitem menu:id=".uno:InsertRowDialog"/>
- <menu:menuitem menu:id=".uno:InsertColumnDialog"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:TableDeleteMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:DeleteTable"/>
- <menu:menuitem menu:id=".uno:DeleteRows"/>
- <menu:menuitem menu:id=".uno:DeleteColumns"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:TableSelectMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SelectTable"/>
- <menu:menuitem menu:id=".uno:EntireRow"/>
- <menu:menuitem menu:id=".uno:EntireColumn"/>
- <menu:menuitem menu:id=".uno:EntireCell"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:MergeCells"/>
- <menu:menuitem menu:id=".uno:SplitCell"/>
- <menu:menuitem menu:id=".uno:Protect"/>
- <menu:menuitem menu:id=".uno:MergeTable"/>
- <menu:menuitem menu:id=".uno:SplitTable"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AutoFormat"/>
- <menu:menu menu:id=".uno:TableAutoFitMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SetColumnWidth"/>
- <menu:menuitem menu:id=".uno:SetOptimalColumnWidth"/>
- <menu:menuitem menu:id=".uno:DistributeColumns"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SetRowHeight"/>
- <menu:menuitem menu:id=".uno:SetOptimalRowHeight"/>
- <menu:menuitem menu:id=".uno:DistributeRows"/>
- <menu:menuitem menu:id=".uno:RowSplit"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:HeadingRowsRepeat"/>
- <menu:menu menu:id=".uno:TableConvertMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:ConvertTextToTable"/>
- <menu:menuitem menu:id=".uno:ConvertTableToText"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:TableSort"/>
- <menu:menuitem menu:id=".uno:InsertFormula"/>
- <menu:menuitem menu:id=".uno:TableNumberFormatDialog"/>
- <menu:menuitem menu:id=".uno:TableBoundaries"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:TableDialog"/>
+ <menu:menuitem menu:id=".uno:InsertNonBreakingSpace"/>
+ <menu:menuitem menu:id=".uno:InsertHardHyphen"/>
+ <menu:menuitem menu:id=".uno:InsertSoftHyphen"/>
+ <menu:menuitem menu:id=".uno:InsertZWSP"/>
+ <menu:menuitem menu:id=".uno:InsertZWNBSP"/>
+ <menu:menuitem menu:id=".uno:InsertLRM"/>
+ <menu:menuitem menu:id=".uno:InsertRLM"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ToolsMenu">
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertSection"/>
+ <menu:menuitem menu:id=".uno:HyperlinkDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertPageHeader"/>
+ <menu:menuitem menu:id=".uno:InsertPageFooter"/>
+ <menu:menuitem menu:id=".uno:InsertFootnoteDialog"/>
+ <menu:menuitem menu:id=".uno:InsertCaptionDialog"/>
+ <menu:menuitem menu:id=".uno:InsertBookmark"/>
+ <menu:menuitem menu:id=".uno:InsertReferenceField"/>
+ <menu:menuitem menu:id=".uno:InsertAnnotation"/>
+ <menu:menuitem menu:id=".uno:InsertScript"/>
+ <menu:menu menu:id=".uno:IndexesMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:SpellingAndGrammarDialog"/>
- <menu:menu menu:id=".uno:LanguageMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:HangulHanjaConversion"/>
- <menu:menuitem menu:id=".uno:ChineseConversion"/>
- <menu:menuitem menu:id=".uno:ThesaurusDialog"/>
- <menu:menuitem menu:id=".uno:Hyphenate"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MoreDictionaries"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:WordCountDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ChapterNumberingDialog"/>
- <menu:menuitem menu:id=".uno:LineNumberingDialog"/>
- <menu:menuitem menu:id=".uno:FootnoteDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Gallery"/>
- <menu:menuitem menu:id=".uno:AVMediaPlayer"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:BibliographyComponent"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MailMergeWizard"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SortDialog"/>
- <menu:menuitem menu:id=".uno:CalculateSel"/>
- <menu:menu menu:id=".uno:UpdateMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:UpdateAll"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:UpdateFields"/>
- <menu:menuitem menu:id=".uno:UpdateAllLinks"/>
- <menu:menuitem menu:id=".uno:UpdateCharts"/>
- <menu:menuitem menu:id=".uno:UpdateCurIndex"/>
- <menu:menuitem menu:id=".uno:UpdateAllIndexes"/>
- <menu:menuitem menu:id=".uno:Repaginate"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:MacrosMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:MacroRecorder"/>
- <menu:menuitem menu:id=".uno:RunMacro"/>
- <menu:menu menu:id=".uno:ScriptOrganizer"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MacroOrganizer?TabId:short=1"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id="service:com.sun.star.deployment.ui.PackageManagerDialog"/>
- <menu:menuitem menu:id=".uno:OpenXMLFilterSettings"/>
- <menu:menuitem menu:id=".uno:AutoCorrectDlg"/>
- <menu:menuitem menu:id=".uno:ConfigureDialog"/>
- <menu:menuitem menu:id=".uno:OptionsTreeDialog"/>
+ <menu:menuitem menu:id=".uno:InsertIndexesEntry"/>
+ <menu:menuitem menu:id=".uno:InsertMultiIndex"/>
+ <menu:menuitem menu:id=".uno:InsertAuthoritiesEntry"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertEnvelope"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertFrame"/>
+ <menu:menuitem menu:id=".uno:InsertTable"/>
+ <menu:menuitem menu:id=".uno:InsertGraphicRuler"/>
+ <menu:menu menu:id=".uno:GraphicMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:InsertGraphic"/>
+ <menu:menu menu:id=".uno:Scan">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:TwainSelect"/>
+ <menu:menuitem menu:id=".uno:TwainTransfer"/>
+ </menu:menupopup>
+ </menu:menu>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:InsertAVMedia"/>
+ <menu:menu menu:id=".uno:ObjectMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:InsertObject"/>
+ <menu:menuitem menu:id=".uno:InsertPlugin"/>
+ <menu:menuitem menu:id=".uno:InsertSound"/>
+ <menu:menuitem menu:id=".uno:InsertVideo"/>
+ <menu:menuitem menu:id=".uno:InsertObjectStarMath"/>
+ <menu:menuitem menu:id=".uno:InsertObjectChart"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:InsertObjectFloatingFrame"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertDoc"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:FormatMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:ResetAttributes"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FontDialog"/>
+ <menu:menuitem menu:id=".uno:ParagraphDialog"/>
+ <menu:menuitem menu:id=".uno:BulletsAndNumberingDialog"/>
+ <menu:menuitem menu:id=".uno:PageDialog"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:TransliterateMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:ChangeCaseToSentenceCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToTitleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToToggleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:RubyDialog"/>
+ <menu:menuitem menu:id=".uno:FormatColumns"/>
+ <menu:menuitem menu:id=".uno:EditRegion"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:DesignerDialog"/>
+ <menu:menu menu:id=".uno:AutoFormatMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:OnlineAutoFormat"/>
+ <menu:menuitem menu:id=".uno:AutoFormatApply"/>
+ <menu:menuitem menu:id=".uno:AutoFormatRedlineApply"/>
+ <menu:menuitem menu:id=".uno:AutoCorrectDlg"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:AnchorMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SetAnchorToPage" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetAnchorToPara" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetAnchorAtChar" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetAnchorToChar" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetAnchorToFrame" menu:style="radio"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:WrapMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:WrapOff"/>
+ <menu:menuitem menu:id=".uno:WrapOn"/>
+ <menu:menuitem menu:id=".uno:WrapIdeal"/>
+ <menu:menuitem menu:id=".uno:WrapThrough"/>
+ <menu:menuitem menu:id=".uno:WrapThroughTransparent"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:WrapContour"/>
+ <menu:menuitem menu:id=".uno:ContourDialog"/>
+ <menu:menuitem menu:id=".uno:WrapAnchorOnly"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:TextWrap"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ObjectAlign">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:CommonAlignLeft" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:CommonAlignHorizontalCenter" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:CommonAlignRight" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:CommonAlignJustified" menu:style="radio"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:CommonAlignTop"/>
+ <menu:menuitem menu:id=".uno:CommonAlignVerticalCenter"/>
+ <menu:menuitem menu:id=".uno:CommonAlignBottom"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ArrangeMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:BringToFront"/>
+ <menu:menuitem menu:id=".uno:ObjectForwardOne"/>
+ <menu:menuitem menu:id=".uno:ObjectBackOne"/>
+ <menu:menuitem menu:id=".uno:SendToBack"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SetObjectToForeground"/>
+ <menu:menuitem menu:id=".uno:SetObjectToBackground"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:FlipMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:FlipHorizontal"/>
+ <menu:menuitem menu:id=".uno:FlipVertical"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:GroupMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:FormatGroup"/>
+ <menu:menuitem menu:id=".uno:FormatUngroup"/>
+ <menu:menuitem menu:id=".uno:EnterGroup"/>
+ <menu:menuitem menu:id=".uno:LeaveGroup"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:ObjectMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:TransformDialog"/>
+ <menu:menuitem menu:id=".uno:FormatLine"/>
+ <menu:menuitem menu:id=".uno:FormatArea"/>
+ <menu:menuitem menu:id=".uno:TextAttributes"/>
+ <menu:menuitem menu:id=".uno:FontWork"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ObjectTitleDescription"/>
+ <menu:menuitem menu:id=".uno:NameGroup"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:FrameDialog"/>
+ <menu:menuitem menu:id=".uno:GraphicDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:TableMenu">
+ <menu:menupopup>
+ <menu:menu menu:id=".uno:TableInsertMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:InsertTable"/>
+ <menu:menuitem menu:id=".uno:InsertRowDialog"/>
+ <menu:menuitem menu:id=".uno:InsertColumnDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:TableDeleteMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:DeleteTable"/>
+ <menu:menuitem menu:id=".uno:DeleteRows"/>
+ <menu:menuitem menu:id=".uno:DeleteColumns"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:TableSelectMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SelectTable"/>
+ <menu:menuitem menu:id=".uno:EntireRow"/>
+ <menu:menuitem menu:id=".uno:EntireColumn"/>
+ <menu:menuitem menu:id=".uno:EntireCell"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:WindowList">
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:MergeCells"/>
+ <menu:menuitem menu:id=".uno:SplitCell"/>
+ <menu:menuitem menu:id=".uno:Protect"/>
+ <menu:menuitem menu:id=".uno:MergeTable"/>
+ <menu:menuitem menu:id=".uno:SplitTable"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AutoFormat"/>
+ <menu:menu menu:id=".uno:TableAutoFitMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SetColumnWidth"/>
+ <menu:menuitem menu:id=".uno:SetOptimalColumnWidth"/>
+ <menu:menuitem menu:id=".uno:DistributeColumns"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SetRowHeight"/>
+ <menu:menuitem menu:id=".uno:SetOptimalRowHeight"/>
+ <menu:menuitem menu:id=".uno:DistributeRows"/>
+ <menu:menuitem menu:id=".uno:RowSplit"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:HeadingRowsRepeat"/>
+ <menu:menu menu:id=".uno:TableConvertMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:ConvertTextToTable"/>
+ <menu:menuitem menu:id=".uno:ConvertTableToText"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:TableSort"/>
+ <menu:menuitem menu:id=".uno:InsertFormula"/>
+ <menu:menuitem menu:id=".uno:TableNumberFormatDialog"/>
+ <menu:menuitem menu:id=".uno:TableBoundaries"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:TableDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ToolsMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SpellingAndGrammarDialog"/>
+ <menu:menu menu:id=".uno:LanguageMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:HangulHanjaConversion"/>
+ <menu:menuitem menu:id=".uno:ChineseConversion"/>
+ <menu:menuitem menu:id=".uno:ThesaurusDialog"/>
+ <menu:menuitem menu:id=".uno:Hyphenate"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MoreDictionaries"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:WordCountDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ChapterNumberingDialog"/>
+ <menu:menuitem menu:id=".uno:LineNumberingDialog"/>
+ <menu:menuitem menu:id=".uno:FootnoteDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Gallery"/>
+ <menu:menuitem menu:id=".uno:AVMediaPlayer"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:BibliographyComponent"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MailMergeWizard"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SortDialog"/>
+ <menu:menuitem menu:id=".uno:CalculateSel"/>
+ <menu:menu menu:id=".uno:UpdateMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:NewWindow"/>
- <menu:menuitem menu:id=".uno:CloseWin"/>
- <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:UpdateAll"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:UpdateFields"/>
+ <menu:menuitem menu:id=".uno:UpdateAllLinks"/>
+ <menu:menuitem menu:id=".uno:UpdateCharts"/>
+ <menu:menuitem menu:id=".uno:UpdateCurIndex"/>
+ <menu:menuitem menu:id=".uno:UpdateAllIndexes"/>
+ <menu:menuitem menu:id=".uno:Repaginate"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:HelpMenu">
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:MacrosMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:HelpIndex"/>
- <menu:menuitem menu:id=".uno:ExtendedHelp"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HelpSupport"/>
- <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:About"/>
+ <menu:menuitem menu:id=".uno:MacroRecorder"/>
+ <menu:menuitem menu:id=".uno:RunMacro"/>
+ <menu:menu menu:id=".uno:ScriptOrganizer"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MacroOrganizer?TabId:short=1"/>
</menu:menupopup>
- </menu:menu>
+ </menu:menu>
+ <menu:menuitem menu:id="service:com.sun.star.deployment.ui.PackageManagerDialog"/>
+ <menu:menuitem menu:id=".uno:OpenXMLFilterSettings"/>
+ <menu:menuitem menu:id=".uno:AutoCorrectDlg"/>
+ <menu:menuitem menu:id=".uno:ConfigureDialog"/>
+ <menu:menuitem menu:id=".uno:OptionsTreeDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:WindowList">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:NewWindow"/>
+ <menu:menuitem menu:id=".uno:CloseWin"/>
+ <menu:menuseparator/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:HelpMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:HelpIndex"/>
+ <menu:menuitem menu:id=".uno:ExtendedHelp"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:HelpSupport"/>
+ <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:About"/>
+ </menu:menupopup>
+ </menu:menu>
</menu:menubar>
diff --git a/sw/uiconfig/swreport/toolbar/extrusionobjectbar.xml b/sw/uiconfig/swreport/toolbar/extrusionobjectbar.xml
index 1f212226cf..148849db6e 100644
--- a/sw/uiconfig/swreport/toolbar/extrusionobjectbar.xml
+++ b/sw/uiconfig/swreport/toolbar/extrusionobjectbar.xml
@@ -8,9 +8,9 @@
<toolbar:toolbaritem xlink:href=".uno:ExtrusionTiltLeft" toolbar:helpid="10963"/>
<toolbar:toolbaritem xlink:href=".uno:ExtrusionTiltRight" toolbar:helpid="10964"/>
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionDepthFloater" toolbar:helpid="10965"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionDirectionFloater" toolbar:helpid="10966"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionLightingFloater" toolbar:helpid="10967"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionSurfaceFloater" toolbar:helpid="10968"/>
- <toolbar:toolbaritem xlink:href=".uno:Extrusion3DColor" toolbar:helpid="10969"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionDepthFloater" toolbar:helpid="10965" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionDirectionFloater" toolbar:helpid="10966" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionLightingFloater" toolbar:helpid="10967" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionSurfaceFloater" toolbar:helpid="10968" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:Extrusion3DColor" toolbar:helpid="10969" toolbar:style="dropdownonly"/>
</toolbar:toolbar> \ No newline at end of file
diff --git a/sw/uiconfig/swreport/toolbar/fontworkobjectbar.xml b/sw/uiconfig/swreport/toolbar/fontworkobjectbar.xml
index 3ac334e0e9..5219a1e235 100644
--- a/sw/uiconfig/swreport/toolbar/fontworkobjectbar.xml
+++ b/sw/uiconfig/swreport/toolbar/fontworkobjectbar.xml
@@ -3,9 +3,9 @@
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
<toolbar:toolbaritem xlink:href=".uno:FontworkGalleryFloater" toolbar:helpid="helpid:10977" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:FontworkShapeType" toolbar:helpid="helpid:10978" toolbar:style="radio dropdown" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkShapeType" toolbar:helpid="helpid:10978" toolbar:style="dropdownonly" />
<toolbar:toolbaritem xlink:href=".uno:FontworkSameLetterHeights" toolbar:helpid="helpid:10979" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:FontworkAlignmentFloater" toolbar:helpid="helpid:10981" toolbar:style="dropdown" />
- <toolbar:toolbaritem xlink:href=".uno:FontworkCharacterSpacingFloater" toolbar:helpid="helpid:10982" toolbar:style="dropdown" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkAlignmentFloater" toolbar:helpid="helpid:10981" toolbar:style="dropdownonly" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkCharacterSpacingFloater" toolbar:helpid="helpid:10982" toolbar:style="dropdownonly" />
</toolbar:toolbar> \ No newline at end of file
diff --git a/sw/uiconfig/swriter/accelerator/de/default.xml b/sw/uiconfig/swriter/accelerator/de/default.xml
deleted file mode 100644
index 1c8b455332..0000000000
--- a/sw/uiconfig/swriter/accelerator/de/default.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_K" accel:shift="true" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_U" accel:shift="true" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_B" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_G" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_H" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_T" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/swriter/accelerator/en-GB/default.xml b/sw/uiconfig/swriter/accelerator/en-GB/default.xml
deleted file mode 100644
index cb04b7f52a..0000000000
--- a/sw/uiconfig/swriter/accelerator/en-GB/default.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_I" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_B" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_U" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_X" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveDirectCharFormats"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_C" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/swriter/accelerator/en-US/default.xml b/sw/uiconfig/swriter/accelerator/en-US/default.xml
deleted file mode 100644
index cb04b7f52a..0000000000
--- a/sw/uiconfig/swriter/accelerator/en-US/default.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_I" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_B" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_U" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_X" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveDirectCharFormats"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_C" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/swriter/accelerator/es/default.xml b/sw/uiconfig/swriter/accelerator/es/default.xml
deleted file mode 100644
index 464cc3a295..0000000000
--- a/sw/uiconfig/swriter/accelerator/es/default.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_K" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_S" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_T" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/swriter/accelerator/fr/default.xml b/sw/uiconfig/swriter/accelerator/fr/default.xml
deleted file mode 100644
index ae29581b2b..0000000000
--- a/sw/uiconfig/swriter/accelerator/fr/default.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_I" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_G" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_U" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/swriter/menubar/menubar.xml b/sw/uiconfig/swriter/menubar/menubar.xml
index 7c44f84982..fb10ca615b 100644
--- a/sw/uiconfig/swriter/menubar/menubar.xml
+++ b/sw/uiconfig/swriter/menubar/menubar.xml
@@ -1,460 +1,464 @@
<?xml version="1.0" encoding="UTF-8"?>
<menu:menubar xmlns:menu="http://openoffice.org/2001/menu" menu:id="menubar">
- <menu:menu menu:id=".uno:PickList">
+ <menu:menu menu:id=".uno:PickList">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:AddDirect"/>
+ <menu:menuitem menu:id=".uno:Open"/>
+ <menu:menuitem menu:id=".uno:RecentFileList"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AutoPilotMenu"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:CloseDoc"/>
+ <menu:menuitem menu:id=".uno:Save"/>
+ <menu:menuitem menu:id=".uno:SaveAs"/>
+ <menu:menuitem menu:id=".uno:SaveAll"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Reload"/>
+ <menu:menuitem menu:id=".uno:VersionDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ExportTo"/>
+ <menu:menuitem menu:id=".uno:ExportToPDF"/>
+ <menu:menu menu:id=".uno:SendToMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:AddDirect"/>
- <menu:menuitem menu:id=".uno:Open"/>
- <menu:menuitem menu:id=".uno:RecentFileList"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AutoPilotMenu"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:CloseDoc"/>
- <menu:menuitem menu:id=".uno:Save"/>
- <menu:menuitem menu:id=".uno:SaveAs"/>
- <menu:menuitem menu:id=".uno:SaveAll"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Reload"/>
- <menu:menuitem menu:id=".uno:VersionDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ExportTo"/>
- <menu:menuitem menu:id=".uno:ExportToPDF"/>
- <menu:menu menu:id=".uno:SendToMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SendMail"/>
- <menu:menuitem menu:id=".uno:SendMailDocAsOOo"/>
- <menu:menuitem menu:id=".uno:SendMailDocAsMS"/>
- <menu:menuitem menu:id=".uno:SendMailDocAsPDF"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:NewGlobalDoc"/>
- <menu:menuitem menu:id=".uno:NewHtmlDoc"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SendOutlineToStarImpress"/>
- <menu:menuitem menu:id=".uno:SendOutlineToClipboard"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:CreateAbstract"/>
- <menu:menuitem menu:id=".uno:SendAbstractToStarImpress"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SetDocumentProperties"/>
- <menu:menuitem menu:id=".uno:Signature"/>
- <menu:menu menu:id=".uno:TemplateMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:Organizer"/>
- <menu:menuitem menu:id=".uno:AddressBookSource"/>
- <menu:menuitem menu:id=".uno:SaveAsTemplate"/>
- <menu:menuitem menu:id=".uno:OpenTemplate"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:WebHtml"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:PrintPreview"/>
- <menu:menuitem menu:id=".uno:Print"/>
- <menu:menuitem menu:id=".uno:PrinterSetup"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Quit"/>
+ <menu:menuitem menu:id=".uno:SendMail"/>
+ <menu:menuitem menu:id=".uno:SendMailDocAsOOo"/>
+ <menu:menuitem menu:id=".uno:SendMailDocAsMS"/>
+ <menu:menuitem menu:id=".uno:SendMailDocAsPDF"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:NewGlobalDoc"/>
+ <menu:menuitem menu:id=".uno:NewHtmlDoc"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SendOutlineToStarImpress"/>
+ <menu:menuitem menu:id=".uno:SendOutlineToClipboard"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:CreateAbstract"/>
+ <menu:menuitem menu:id=".uno:SendAbstractToStarImpress"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:EditMenu">
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SetDocumentProperties"/>
+ <menu:menuitem menu:id=".uno:Signature"/>
+ <menu:menu menu:id=".uno:TemplateMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:Undo"/>
- <menu:menuitem menu:id=".uno:Redo"/>
- <menu:menuitem menu:id=".uno:Repeat"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Cut"/>
- <menu:menuitem menu:id=".uno:Copy"/>
- <menu:menuitem menu:id=".uno:Paste"/>
- <menu:menuitem menu:id=".uno:PasteSpecial"/>
- <menu:menuitem menu:id=".uno:SelectTextMode"/>
- <menu:menu menu:id=".uno:SelectionModeMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SelectionModeDefault"/>
- <menu:menuitem menu:id=".uno:SelectionModeBlock"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:SelectAll"/>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:ChangesMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:TrackChanges"/>
- <menu:menuitem menu:id=".uno:ProtectTraceChangeMode"/>
- <menu:menuitem menu:id=".uno:ShowTrackedChanges"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AcceptTrackedChanges"/>
- <menu:menuitem menu:id=".uno:CommentChangeTracking"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MergeDocuments"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:CompareDocuments"/>
- <menu:menuitem menu:id=".uno:SearchDialog"/>
- <menu:menuitem menu:id=".uno:EditGlossary"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ChangeDatabaseField"/>
- <menu:menuitem menu:id=".uno:FieldDialog"/>
- <menu:menuitem menu:id=".uno:EditFootnote"/>
- <menu:menuitem menu:id=".uno:IndexEntryDialog"/>
- <menu:menuitem menu:id=".uno:AuthoritiesEntryDialog"/>
- <menu:menuitem menu:id=".uno:EditHyperlink"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:LinkDialog"/>
- <menu:menuitem menu:id=".uno:PlugInsActive"/>
- <menu:menuitem menu:id=".uno:ImageMapDialog"/>
- <menu:menuitem menu:id=".uno:ObjectMenue"/>
+ <menu:menuitem menu:id=".uno:Organizer"/>
+ <menu:menuitem menu:id=".uno:AddressBookSource"/>
+ <menu:menuitem menu:id=".uno:SaveAsTemplate"/>
+ <menu:menuitem menu:id=".uno:OpenTemplate"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ViewMenu">
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:WebHtml"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:PrintPreview"/>
+ <menu:menuitem menu:id=".uno:Print"/>
+ <menu:menuitem menu:id=".uno:PrinterSetup"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Quit"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:EditMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:Undo"/>
+ <menu:menuitem menu:id=".uno:Redo"/>
+ <menu:menuitem menu:id=".uno:Repeat"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Cut"/>
+ <menu:menuitem menu:id=".uno:Copy"/>
+ <menu:menuitem menu:id=".uno:Paste"/>
+ <menu:menuitem menu:id=".uno:PasteSpecial"/>
+ <menu:menuitem menu:id=".uno:SelectTextMode"/>
+ <menu:menu menu:id=".uno:SelectionModeMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:PrintLayout"/>
- <menu:menuitem menu:id=".uno:BrowseView"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AvailableToolbars"/>
- <menu:menuitem menu:id=".uno:StatusBarVisible"/>
- <menu:menuitem menu:id=".uno:ShowImeStatusWindow"/>
- <menu:menuitem menu:id=".uno:Ruler"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ViewBounds"/>
- <menu:menuitem menu:id=".uno:Marks"/>
- <menu:menuitem menu:id=".uno:Fieldnames"/>
- <menu:menuitem menu:id=".uno:ControlCodes"/>
- <menu:menuitem menu:id=".uno:ShowHiddenParagraphs"/>
- <menu:menuitem menu:id=".uno:ShowAnnotations"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ViewDataSourceBrowser"/>
- <menu:menuitem menu:id=".uno:Navigator"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:FullScreen"/>
- <menu:menuitem menu:id=".uno:Zoom"/>
+ <menu:menuitem menu:id=".uno:SelectionModeDefault" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SelectionModeBlock" menu:style="radio"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:InsertMenu">
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:SelectAll"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:ChangesMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertBreak"/>
- <menu:menu menu:id=".uno:FieldMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertDateField"/>
- <menu:menuitem menu:id=".uno:InsertTimeField"/>
- <menu:menuitem menu:id=".uno:InsertPageNumberField"/>
- <menu:menuitem menu:id=".uno:InsertPageCountField"/>
- <menu:menuitem menu:id=".uno:InsertTopicField"/>
- <menu:menuitem menu:id=".uno:InsertTitleField"/>
- <menu:menuitem menu:id=".uno:InsertAuthorField"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertField"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:InsertSymbol"/>
- <menu:menu menu:id=".uno:FormattingMarkMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertNonBreakingSpace"/>
- <menu:menuitem menu:id=".uno:InsertHardHyphen"/>
- <menu:menuitem menu:id=".uno:InsertSoftHyphen"/>
- <menu:menuitem menu:id=".uno:InsertZWSP"/>
- <menu:menuitem menu:id=".uno:InsertZWNBSP"/>
- <menu:menuitem menu:id=".uno:InsertLRM"/>
- <menu:menuitem menu:id=".uno:InsertRLM"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertSection"/>
- <menu:menuitem menu:id=".uno:HyperlinkDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertPageHeader"/>
- <menu:menuitem menu:id=".uno:InsertPageFooter"/>
- <menu:menuitem menu:id=".uno:InsertFootnoteDialog"/>
- <menu:menuitem menu:id=".uno:InsertCaptionDialog"/>
- <menu:menuitem menu:id=".uno:InsertBookmark"/>
- <menu:menuitem menu:id=".uno:InsertReferenceField"/>
- <menu:menuitem menu:id=".uno:InsertAnnotation"/>
- <menu:menuitem menu:id=".uno:InsertScript"/>
- <menu:menu menu:id=".uno:IndexesMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertIndexesEntry"/>
- <menu:menuitem menu:id=".uno:InsertMultiIndex"/>
- <menu:menuitem menu:id=".uno:InsertAuthoritiesEntry"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertEnvelope"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertFrame"/>
- <menu:menuitem menu:id=".uno:InsertTable"/>
- <menu:menuitem menu:id=".uno:InsertGraphicRuler"/>
- <menu:menu menu:id=".uno:GraphicMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertGraphic"/>
- <menu:menu menu:id=".uno:Scan">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:TwainSelect"/>
- <menu:menuitem menu:id=".uno:TwainTransfer"/>
- </menu:menupopup>
- </menu:menu>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:InsertAVMedia"/>
- <menu:menu menu:id=".uno:ObjectMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertObject"/>
- <menu:menuitem menu:id=".uno:InsertPlugin"/>
- <menu:menuitem menu:id=".uno:InsertSound"/>
- <menu:menuitem menu:id=".uno:InsertVideo"/>
- <menu:menuitem menu:id=".uno:InsertObjectStarMath"/>
- <menu:menuitem menu:id=".uno:InsertObjectChart"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:InsertObjectFloatingFrame"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertDoc"/>
+ <menu:menuitem menu:id=".uno:TrackChanges"/>
+ <menu:menuitem menu:id=".uno:ProtectTraceChangeMode"/>
+ <menu:menuitem menu:id=".uno:ShowTrackedChanges"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AcceptTrackedChanges"/>
+ <menu:menuitem menu:id=".uno:CommentChangeTracking"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MergeDocuments"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:FormatMenu">
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:CompareDocuments"/>
+ <menu:menuitem menu:id=".uno:SearchDialog"/>
+ <menu:menuitem menu:id=".uno:EditGlossary"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ChangeDatabaseField"/>
+ <menu:menuitem menu:id=".uno:FieldDialog"/>
+ <menu:menuitem menu:id=".uno:EditFootnote"/>
+ <menu:menuitem menu:id=".uno:IndexEntryDialog"/>
+ <menu:menuitem menu:id=".uno:AuthoritiesEntryDialog"/>
+ <menu:menuitem menu:id=".uno:EditHyperlink"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:LinkDialog"/>
+ <menu:menuitem menu:id=".uno:PlugInsActive"/>
+ <menu:menuitem menu:id=".uno:ImageMapDialog"/>
+ <menu:menuitem menu:id=".uno:ObjectMenue"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ViewMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:PrintLayout"/>
+ <menu:menuitem menu:id=".uno:BrowseView"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AvailableToolbars"/>
+ <menu:menuitem menu:id=".uno:StatusBarVisible"/>
+ <menu:menuitem menu:id=".uno:ShowImeStatusWindow"/>
+ <menu:menuitem menu:id=".uno:Ruler"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ViewBounds"/>
+ <menu:menuitem menu:id=".uno:Marks"/>
+ <menu:menuitem menu:id=".uno:Fieldnames"/>
+ <menu:menuitem menu:id=".uno:ControlCodes"/>
+ <menu:menuitem menu:id=".uno:ShowHiddenParagraphs"/>
+ <menu:menuitem menu:id=".uno:ShowAnnotations"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ViewDataSourceBrowser"/>
+ <menu:menuitem menu:id=".uno:Navigator"/>
+ <menu:menuitem menu:id=".uno:TaskPane"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FullScreen"/>
+ <menu:menuitem menu:id=".uno:Zoom"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:InsertMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:InsertBreak"/>
+ <menu:menu menu:id=".uno:FieldMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:ResetAttributes"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:FontDialog"/>
- <menu:menuitem menu:id=".uno:ParagraphDialog"/>
- <menu:menuitem menu:id=".uno:BulletsAndNumberingDialog"/>
- <menu:menuitem menu:id=".uno:PageDialog"/>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:TransliterateMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:RubyDialog"/>
- <menu:menuitem menu:id=".uno:FormatColumns"/>
- <menu:menuitem menu:id=".uno:EditRegion"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:DesignerDialog"/>
- <menu:menu menu:id=".uno:AutoFormatMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:OnlineAutoFormat"/>
- <menu:menuitem menu:id=".uno:AutoFormatApply"/>
- <menu:menuitem menu:id=".uno:AutoFormatRedlineApply"/>
- <menu:menuitem menu:id=".uno:AutoCorrectDlg"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:AnchorMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SetAnchorToPage"/>
- <menu:menuitem menu:id=".uno:SetAnchorToPara"/>
- <menu:menuitem menu:id=".uno:SetAnchorAtChar"/>
- <menu:menuitem menu:id=".uno:SetAnchorToChar"/>
- <menu:menuitem menu:id=".uno:SetAnchorToFrame"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:WrapMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:WrapOff"/>
- <menu:menuitem menu:id=".uno:WrapOn"/>
- <menu:menuitem menu:id=".uno:WrapIdeal"/>
- <menu:menuitem menu:id=".uno:WrapThrough"/>
- <menu:menuitem menu:id=".uno:WrapThroughTransparent"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:WrapContour"/>
- <menu:menuitem menu:id=".uno:ContourDialog"/>
- <menu:menuitem menu:id=".uno:WrapAnchorOnly"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:TextWrap"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ObjectAlign">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:CommonAlignLeft"/>
- <menu:menuitem menu:id=".uno:CommonAlignHorizontalCenter"/>
- <menu:menuitem menu:id=".uno:CommonAlignRight"/>
- <menu:menuitem menu:id=".uno:CommonAlignJustified"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:CommonAlignTop"/>
- <menu:menuitem menu:id=".uno:CommonAlignVerticalCenter"/>
- <menu:menuitem menu:id=".uno:CommonAlignBottom"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ArrangeMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:BringToFront"/>
- <menu:menuitem menu:id=".uno:ObjectForwardOne"/>
- <menu:menuitem menu:id=".uno:ObjectBackOne"/>
- <menu:menuitem menu:id=".uno:SendToBack"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SetObjectToForeground"/>
- <menu:menuitem menu:id=".uno:SetObjectToBackground"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:FlipMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:FlipHorizontal"/>
- <menu:menuitem menu:id=".uno:FlipVertical"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:GroupMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:FormatGroup"/>
- <menu:menuitem menu:id=".uno:FormatUngroup"/>
- <menu:menuitem menu:id=".uno:EnterGroup"/>
- <menu:menuitem menu:id=".uno:LeaveGroup"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:ObjectMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:TransformDialog"/>
- <menu:menuitem menu:id=".uno:FormatLine"/>
- <menu:menuitem menu:id=".uno:FormatArea"/>
- <menu:menuitem menu:id=".uno:TextAttributes"/>
- <menu:menuitem menu:id=".uno:FontWork"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ObjectTitleDescription"/>
- <menu:menuitem menu:id=".uno:NameGroup"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:FrameDialog"/>
- <menu:menuitem menu:id=".uno:GraphicDialog"/>
+ <menu:menuitem menu:id=".uno:InsertDateField"/>
+ <menu:menuitem menu:id=".uno:InsertTimeField"/>
+ <menu:menuitem menu:id=".uno:InsertPageNumberField"/>
+ <menu:menuitem menu:id=".uno:InsertPageCountField"/>
+ <menu:menuitem menu:id=".uno:InsertTopicField"/>
+ <menu:menuitem menu:id=".uno:InsertTitleField"/>
+ <menu:menuitem menu:id=".uno:InsertAuthorField"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertField"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:TableMenu">
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:InsertSymbol"/>
+ <menu:menu menu:id=".uno:FormattingMarkMenu">
<menu:menupopup>
- <menu:menu menu:id=".uno:TableInsertMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertTable"/>
- <menu:menuitem menu:id=".uno:InsertRowDialog"/>
- <menu:menuitem menu:id=".uno:InsertColumnDialog"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:TableDeleteMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:DeleteTable"/>
- <menu:menuitem menu:id=".uno:DeleteRows"/>
- <menu:menuitem menu:id=".uno:DeleteColumns"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:TableSelectMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SelectTable"/>
- <menu:menuitem menu:id=".uno:EntireRow"/>
- <menu:menuitem menu:id=".uno:EntireColumn"/>
- <menu:menuitem menu:id=".uno:EntireCell"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:MergeCells"/>
- <menu:menuitem menu:id=".uno:SplitCell"/>
- <menu:menuitem menu:id=".uno:Protect"/>
- <menu:menuitem menu:id=".uno:MergeTable"/>
- <menu:menuitem menu:id=".uno:SplitTable"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AutoFormat"/>
- <menu:menu menu:id=".uno:TableAutoFitMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SetColumnWidth"/>
- <menu:menuitem menu:id=".uno:SetOptimalColumnWidth"/>
- <menu:menuitem menu:id=".uno:DistributeColumns"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SetRowHeight"/>
- <menu:menuitem menu:id=".uno:SetOptimalRowHeight"/>
- <menu:menuitem menu:id=".uno:DistributeRows"/>
- <menu:menuitem menu:id=".uno:RowSplit"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:HeadingRowsRepeat"/>
- <menu:menu menu:id=".uno:TableConvertMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:ConvertTextToTable"/>
- <menu:menuitem menu:id=".uno:ConvertTableToText"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:TableSort"/>
- <menu:menuitem menu:id=".uno:InsertFormula"/>
- <menu:menuitem menu:id=".uno:TableNumberFormatDialog"/>
- <menu:menuitem menu:id=".uno:TableBoundaries"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:TableDialog"/>
+ <menu:menuitem menu:id=".uno:InsertNonBreakingSpace"/>
+ <menu:menuitem menu:id=".uno:InsertHardHyphen"/>
+ <menu:menuitem menu:id=".uno:InsertSoftHyphen"/>
+ <menu:menuitem menu:id=".uno:InsertZWSP"/>
+ <menu:menuitem menu:id=".uno:InsertZWNBSP"/>
+ <menu:menuitem menu:id=".uno:InsertLRM"/>
+ <menu:menuitem menu:id=".uno:InsertRLM"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ToolsMenu">
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertSection"/>
+ <menu:menuitem menu:id=".uno:HyperlinkDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertPageHeader"/>
+ <menu:menuitem menu:id=".uno:InsertPageFooter"/>
+ <menu:menuitem menu:id=".uno:InsertFootnoteDialog"/>
+ <menu:menuitem menu:id=".uno:InsertCaptionDialog"/>
+ <menu:menuitem menu:id=".uno:InsertBookmark"/>
+ <menu:menuitem menu:id=".uno:InsertReferenceField"/>
+ <menu:menuitem menu:id=".uno:InsertAnnotation"/>
+ <menu:menuitem menu:id=".uno:InsertScript"/>
+ <menu:menu menu:id=".uno:IndexesMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:SpellingAndGrammarDialog"/>
- <menu:menu menu:id=".uno:LanguageMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SetLanguageSelectionMenu"/>
- <menu:menuitem menu:id=".uno:SetLanguageParagraphMenu"/>
- <menu:menuitem menu:id=".uno:SetLanguageAllTextMenu"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HangulHanjaConversion"/>
- <menu:menuitem menu:id=".uno:ChineseConversion"/>
- <menu:menuitem menu:id=".uno:ThesaurusDialog"/>
- <menu:menuitem menu:id=".uno:Hyphenate"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MoreDictionaries"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:WordCountDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ChapterNumberingDialog"/>
- <menu:menuitem menu:id=".uno:LineNumberingDialog"/>
- <menu:menuitem menu:id=".uno:FootnoteDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Gallery"/>
- <menu:menuitem menu:id=".uno:AVMediaPlayer"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:BibliographyComponent"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MailMergeWizard"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SortDialog"/>
- <menu:menuitem menu:id=".uno:CalculateSel"/>
- <menu:menu menu:id=".uno:UpdateMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:UpdateAll"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:UpdateFields"/>
- <menu:menuitem menu:id=".uno:UpdateAllLinks"/>
- <menu:menuitem menu:id=".uno:UpdateCharts"/>
- <menu:menuitem menu:id=".uno:UpdateCurIndex"/>
- <menu:menuitem menu:id=".uno:UpdateAllIndexes"/>
- <menu:menuitem menu:id=".uno:Repaginate"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:MacrosMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:MacroRecorder"/>
- <menu:menuitem menu:id=".uno:RunMacro"/>
- <menu:menu menu:id=".uno:ScriptOrganizer"/>
- <menu:menuitem menu:id=".uno:MacroSignature"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MacroOrganizer?TabId:short=1"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id="service:com.sun.star.deployment.ui.PackageManagerDialog"/>
- <menu:menuitem menu:id=".uno:OpenXMLFilterSettings"/>
- <menu:menuitem menu:id=".uno:AutoCorrectDlg"/>
- <menu:menuitem menu:id=".uno:ConfigureDialog"/>
- <menu:menuitem menu:id=".uno:OptionsTreeDialog"/>
+ <menu:menuitem menu:id=".uno:InsertIndexesEntry"/>
+ <menu:menuitem menu:id=".uno:InsertMultiIndex"/>
+ <menu:menuitem menu:id=".uno:InsertAuthoritiesEntry"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:WindowList">
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertEnvelope"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertFrame"/>
+ <menu:menuitem menu:id=".uno:InsertTable"/>
+ <menu:menuitem menu:id=".uno:InsertGraphicRuler"/>
+ <menu:menu menu:id=".uno:GraphicMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:NewWindow"/>
- <menu:menuitem menu:id=".uno:CloseWin"/>
- <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertGraphic"/>
+ <menu:menu menu:id=".uno:Scan">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:TwainSelect"/>
+ <menu:menuitem menu:id=".uno:TwainTransfer"/>
+ </menu:menupopup>
+ </menu:menu>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:HelpMenu">
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:InsertAVMedia"/>
+ <menu:menu menu:id=".uno:ObjectMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:HelpIndex"/>
- <menu:menuitem menu:id=".uno:ExtendedHelp"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HelpSupport"/>
- <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:About"/>
+ <menu:menuitem menu:id=".uno:InsertObject"/>
+ <menu:menuitem menu:id=".uno:InsertPlugin"/>
+ <menu:menuitem menu:id=".uno:InsertSound"/>
+ <menu:menuitem menu:id=".uno:InsertVideo"/>
+ <menu:menuitem menu:id=".uno:InsertObjectStarMath"/>
+ <menu:menuitem menu:id=".uno:InsertObjectChart"/>
</menu:menupopup>
- </menu:menu>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:InsertObjectFloatingFrame"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertDoc"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:FormatMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:ResetAttributes"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FontDialog"/>
+ <menu:menuitem menu:id=".uno:ParagraphDialog"/>
+ <menu:menuitem menu:id=".uno:BulletsAndNumberingDialog"/>
+ <menu:menuitem menu:id=".uno:PageDialog"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:TransliterateMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:ChangeCaseToSentenceCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToTitleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToToggleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:RubyDialog"/>
+ <menu:menuitem menu:id=".uno:FormatColumns"/>
+ <menu:menuitem menu:id=".uno:EditRegion"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:DesignerDialog"/>
+ <menu:menu menu:id=".uno:AutoFormatMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:OnlineAutoFormat"/>
+ <menu:menuitem menu:id=".uno:AutoFormatApply"/>
+ <menu:menuitem menu:id=".uno:AutoFormatRedlineApply"/>
+ <menu:menuitem menu:id=".uno:AutoCorrectDlg"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:AnchorMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SetAnchorToPage" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetAnchorToPara" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetAnchorAtChar" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetAnchorToChar" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetAnchorToFrame" menu:style="radio"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:WrapMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:WrapOff"/>
+ <menu:menuitem menu:id=".uno:WrapOn"/>
+ <menu:menuitem menu:id=".uno:WrapIdeal"/>
+ <menu:menuitem menu:id=".uno:WrapThrough"/>
+ <menu:menuitem menu:id=".uno:WrapThroughTransparent"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:WrapContour"/>
+ <menu:menuitem menu:id=".uno:ContourDialog"/>
+ <menu:menuitem menu:id=".uno:WrapAnchorOnly"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:TextWrap"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ObjectAlign">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:CommonAlignLeft" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:CommonAlignHorizontalCenter" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:CommonAlignRight" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:CommonAlignJustified" menu:style="radio"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:CommonAlignTop"/>
+ <menu:menuitem menu:id=".uno:CommonAlignVerticalCenter"/>
+ <menu:menuitem menu:id=".uno:CommonAlignBottom"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ArrangeMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:BringToFront"/>
+ <menu:menuitem menu:id=".uno:ObjectForwardOne"/>
+ <menu:menuitem menu:id=".uno:ObjectBackOne"/>
+ <menu:menuitem menu:id=".uno:SendToBack"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SetObjectToForeground"/>
+ <menu:menuitem menu:id=".uno:SetObjectToBackground"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:FlipMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:FlipHorizontal"/>
+ <menu:menuitem menu:id=".uno:FlipVertical"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:GroupMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:FormatGroup"/>
+ <menu:menuitem menu:id=".uno:FormatUngroup"/>
+ <menu:menuitem menu:id=".uno:EnterGroup"/>
+ <menu:menuitem menu:id=".uno:LeaveGroup"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:ObjectMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:TransformDialog"/>
+ <menu:menuitem menu:id=".uno:FormatLine"/>
+ <menu:menuitem menu:id=".uno:FormatArea"/>
+ <menu:menuitem menu:id=".uno:TextAttributes"/>
+ <menu:menuitem menu:id=".uno:FontWork"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ObjectTitleDescription"/>
+ <menu:menuitem menu:id=".uno:NameGroup"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:FrameDialog"/>
+ <menu:menuitem menu:id=".uno:GraphicDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:TableMenu">
+ <menu:menupopup>
+ <menu:menu menu:id=".uno:TableInsertMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:InsertTable"/>
+ <menu:menuitem menu:id=".uno:InsertRowDialog"/>
+ <menu:menuitem menu:id=".uno:InsertColumnDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:TableDeleteMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:DeleteTable"/>
+ <menu:menuitem menu:id=".uno:DeleteRows"/>
+ <menu:menuitem menu:id=".uno:DeleteColumns"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:TableSelectMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SelectTable"/>
+ <menu:menuitem menu:id=".uno:EntireRow"/>
+ <menu:menuitem menu:id=".uno:EntireColumn"/>
+ <menu:menuitem menu:id=".uno:EntireCell"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:MergeCells"/>
+ <menu:menuitem menu:id=".uno:SplitCell"/>
+ <menu:menuitem menu:id=".uno:Protect"/>
+ <menu:menuitem menu:id=".uno:MergeTable"/>
+ <menu:menuitem menu:id=".uno:SplitTable"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AutoFormat"/>
+ <menu:menu menu:id=".uno:TableAutoFitMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SetColumnWidth"/>
+ <menu:menuitem menu:id=".uno:SetOptimalColumnWidth"/>
+ <menu:menuitem menu:id=".uno:DistributeColumns"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SetRowHeight"/>
+ <menu:menuitem menu:id=".uno:SetOptimalRowHeight"/>
+ <menu:menuitem menu:id=".uno:DistributeRows"/>
+ <menu:menuitem menu:id=".uno:RowSplit"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:HeadingRowsRepeat"/>
+ <menu:menu menu:id=".uno:TableConvertMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:ConvertTextToTable"/>
+ <menu:menuitem menu:id=".uno:ConvertTableToText"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:TableSort"/>
+ <menu:menuitem menu:id=".uno:InsertFormula"/>
+ <menu:menuitem menu:id=".uno:TableNumberFormatDialog"/>
+ <menu:menuitem menu:id=".uno:TableBoundaries"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:TableDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ToolsMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SpellingAndGrammarDialog"/>
+ <menu:menu menu:id=".uno:LanguageMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SetLanguageSelectionMenu"/>
+ <menu:menuitem menu:id=".uno:SetLanguageParagraphMenu"/>
+ <menu:menuitem menu:id=".uno:SetLanguageAllTextMenu"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:HangulHanjaConversion"/>
+ <menu:menuitem menu:id=".uno:ChineseConversion"/>
+ <menu:menuitem menu:id=".uno:ThesaurusDialog"/>
+ <menu:menuitem menu:id=".uno:Hyphenate"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MoreDictionaries"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:WordCountDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ChapterNumberingDialog"/>
+ <menu:menuitem menu:id=".uno:LineNumberingDialog"/>
+ <menu:menuitem menu:id=".uno:FootnoteDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Gallery"/>
+ <menu:menuitem menu:id=".uno:AVMediaPlayer"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:BibliographyComponent"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MailMergeWizard"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SortDialog"/>
+ <menu:menuitem menu:id=".uno:CalculateSel"/>
+ <menu:menu menu:id=".uno:UpdateMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:UpdateAll"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:UpdateFields"/>
+ <menu:menuitem menu:id=".uno:UpdateAllLinks"/>
+ <menu:menuitem menu:id=".uno:UpdateCharts"/>
+ <menu:menuitem menu:id=".uno:UpdateCurIndex"/>
+ <menu:menuitem menu:id=".uno:UpdateAllIndexes"/>
+ <menu:menuitem menu:id=".uno:Repaginate"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:MacrosMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:MacroRecorder"/>
+ <menu:menuitem menu:id=".uno:RunMacro"/>
+ <menu:menu menu:id=".uno:ScriptOrganizer"/>
+ <menu:menuitem menu:id=".uno:MacroSignature"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MacroOrganizer?TabId:short=1"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id="service:com.sun.star.deployment.ui.PackageManagerDialog"/>
+ <menu:menuitem menu:id=".uno:OpenXMLFilterSettings"/>
+ <menu:menuitem menu:id=".uno:AutoCorrectDlg"/>
+ <menu:menuitem menu:id=".uno:ConfigureDialog"/>
+ <menu:menuitem menu:id=".uno:OptionsTreeDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:WindowList">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:NewWindow"/>
+ <menu:menuitem menu:id=".uno:CloseWin"/>
+ <menu:menuseparator/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:HelpMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:HelpIndex"/>
+ <menu:menuitem menu:id=".uno:ExtendedHelp"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:HelpSupport"/>
+ <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:About"/>
+ </menu:menupopup>
+ </menu:menu>
</menu:menubar>
diff --git a/sw/uiconfig/swriter/toolbar/extrusionobjectbar.xml b/sw/uiconfig/swriter/toolbar/extrusionobjectbar.xml
index 1f212226cf..148849db6e 100644
--- a/sw/uiconfig/swriter/toolbar/extrusionobjectbar.xml
+++ b/sw/uiconfig/swriter/toolbar/extrusionobjectbar.xml
@@ -8,9 +8,9 @@
<toolbar:toolbaritem xlink:href=".uno:ExtrusionTiltLeft" toolbar:helpid="10963"/>
<toolbar:toolbaritem xlink:href=".uno:ExtrusionTiltRight" toolbar:helpid="10964"/>
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionDepthFloater" toolbar:helpid="10965"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionDirectionFloater" toolbar:helpid="10966"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionLightingFloater" toolbar:helpid="10967"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionSurfaceFloater" toolbar:helpid="10968"/>
- <toolbar:toolbaritem xlink:href=".uno:Extrusion3DColor" toolbar:helpid="10969"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionDepthFloater" toolbar:helpid="10965" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionDirectionFloater" toolbar:helpid="10966" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionLightingFloater" toolbar:helpid="10967" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionSurfaceFloater" toolbar:helpid="10968" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:Extrusion3DColor" toolbar:helpid="10969" toolbar:style="dropdownonly"/>
</toolbar:toolbar> \ No newline at end of file
diff --git a/sw/uiconfig/swriter/toolbar/findbar.xml b/sw/uiconfig/swriter/toolbar/findbar.xml
new file mode 100644
index 0000000000..9ef9d8a1a7
--- /dev/null
+++ b/sw/uiconfig/swriter/toolbar/findbar.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
+<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
+ <toolbar:toolbaritem xlink:href=".uno:FindText" toolbar:helpid="helpid:100105" />
+ <toolbar:toolbaritem xlink:href=".uno:DownSearch" toolbar:helpid="helpid:100105" />
+ <toolbar:toolbaritem xlink:href=".uno:UpSearch" toolbar:helpid="helpid:100105" />
+ <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:text="Find &amp; Replace" toolbar:visible="false" toolbar:helpid="helpid:100105"/>
+</toolbar:toolbar>
diff --git a/sw/uiconfig/swriter/toolbar/fontworkobjectbar.xml b/sw/uiconfig/swriter/toolbar/fontworkobjectbar.xml
index 3ac334e0e9..5219a1e235 100644
--- a/sw/uiconfig/swriter/toolbar/fontworkobjectbar.xml
+++ b/sw/uiconfig/swriter/toolbar/fontworkobjectbar.xml
@@ -3,9 +3,9 @@
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
<toolbar:toolbaritem xlink:href=".uno:FontworkGalleryFloater" toolbar:helpid="helpid:10977" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:FontworkShapeType" toolbar:helpid="helpid:10978" toolbar:style="radio dropdown" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkShapeType" toolbar:helpid="helpid:10978" toolbar:style="dropdownonly" />
<toolbar:toolbaritem xlink:href=".uno:FontworkSameLetterHeights" toolbar:helpid="helpid:10979" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:FontworkAlignmentFloater" toolbar:helpid="helpid:10981" toolbar:style="dropdown" />
- <toolbar:toolbaritem xlink:href=".uno:FontworkCharacterSpacingFloater" toolbar:helpid="helpid:10982" toolbar:style="dropdown" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkAlignmentFloater" toolbar:helpid="helpid:10981" toolbar:style="dropdownonly" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkCharacterSpacingFloater" toolbar:helpid="helpid:10982" toolbar:style="dropdownonly" />
</toolbar:toolbar> \ No newline at end of file
diff --git a/sw/uiconfig/swxform/accelerator/de/default.xml b/sw/uiconfig/swxform/accelerator/de/default.xml
deleted file mode 100644
index 875c95ef26..0000000000
--- a/sw/uiconfig/swxform/accelerator/de/default.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_K" accel:shift="true" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_U" accel:shift="true" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_B" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_G" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_H" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_T" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/swxform/accelerator/en-GB/default.xml b/sw/uiconfig/swxform/accelerator/en-GB/default.xml
deleted file mode 100644
index 83f88ade9d..0000000000
--- a/sw/uiconfig/swxform/accelerator/en-GB/default.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_I" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_B" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_U" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_X" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveDirectCharFormats"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_C" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/swxform/accelerator/en-US/default.xml b/sw/uiconfig/swxform/accelerator/en-US/default.xml
deleted file mode 100644
index 83f88ade9d..0000000000
--- a/sw/uiconfig/swxform/accelerator/en-US/default.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_I" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_B" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_U" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_X" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveDirectCharFormats"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_C" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/swxform/accelerator/es/default.xml b/sw/uiconfig/swxform/accelerator/es/default.xml
deleted file mode 100644
index 12f1aa3ab8..0000000000
--- a/sw/uiconfig/swxform/accelerator/es/default.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_K" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_S" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_T" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/swxform/accelerator/fr/default.xml b/sw/uiconfig/swxform/accelerator/fr/default.xml
deleted file mode 100644
index ac445d4a5a..0000000000
--- a/sw/uiconfig/swxform/accelerator/fr/default.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
- <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
- <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:ActivateStyleApply"/>
- <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
- <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
- <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
- <accel:item accel:code="KEY_I" accel:mod1="true" xlink:href=".uno:Italic"/>
- <accel:item accel:code="KEY_G" accel:mod1="true" xlink:href=".uno:Bold"/>
- <accel:item accel:code="KEY_U" accel:mod1="true" xlink:href=".uno:Underline"/>
- <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
- <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
- <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:CenterPara"/>
- <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
- <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
- <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
- <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
- <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
- <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
- <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
- <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
- <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
- <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:GoToPrevPara"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
- <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:GoToNextPara"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
- <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
- <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
- <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
- <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
- <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
- <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
- <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
- <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
- <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
- <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
- <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
- <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
- <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
- <accel:item accel:code="KEY_SPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
- <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
- <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
- <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href=".uno:SuperScript"/>
- <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href=".uno:SubScript"/>
- <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
- <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
- <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
- <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
- <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellingAndGrammarDialog"/>
- <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
- <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
- <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
- <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
- <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
- <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
- <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
- <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
- <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
- <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
- <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
- <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
- <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
- <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
- <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
- <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
- <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
- <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
- <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
- <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
- <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_F8" accel:shift="true" accel:mod2="true" xlink:href=".uno:SelectionModeBlock"/>
- <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
- <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
- <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfParaSel"/>
- <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfParaSel"/>
- <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
- <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
- <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
- <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
- <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Text body&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_0" accel:mod1="true" accel:shift="true" xlink:href=".uno:StyleApply?Style:string=Standard&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_4" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 4&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 5&amp;FamilyName:string=ParagraphStyles"/>
- <accel:item accel:code="KEY_M" accel:mod1="true" xlink:href=".uno:ResetAttributes"/>
- <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
- <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertAnnotation"/>
-</accel:acceleratorlist>
diff --git a/sw/uiconfig/swxform/menubar/menubar.xml b/sw/uiconfig/swxform/menubar/menubar.xml
index b37a8e14d2..ae0df22748 100644
--- a/sw/uiconfig/swxform/menubar/menubar.xml
+++ b/sw/uiconfig/swxform/menubar/menubar.xml
@@ -1,453 +1,457 @@
<?xml version="1.0" encoding="UTF-8"?>
<menu:menubar xmlns:menu="http://openoffice.org/2001/menu" menu:id="menubar">
- <menu:menu menu:id=".uno:PickList">
+ <menu:menu menu:id=".uno:PickList">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:AddDirect"/>
+ <menu:menuitem menu:id=".uno:Open"/>
+ <menu:menuitem menu:id=".uno:RecentFileList"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AutoPilotMenu"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:CloseDoc"/>
+ <menu:menuitem menu:id=".uno:Save"/>
+ <menu:menuitem menu:id=".uno:SaveAs"/>
+ <menu:menuitem menu:id=".uno:SaveAll"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Reload"/>
+ <menu:menuitem menu:id=".uno:VersionDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ExportTo"/>
+ <menu:menuitem menu:id=".uno:ExportToPDF"/>
+ <menu:menu menu:id=".uno:SendToMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SendMail"/>
+ <menu:menuitem menu:id=".uno:SendMailDocAsOOo"/>
+ <menu:menuitem menu:id=".uno:SendMailDocAsMS"/>
+ <menu:menuitem menu:id=".uno:SendMailDocAsPDF"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:NewGlobalDoc"/>
+ <menu:menuitem menu:id=".uno:NewHtmlDoc"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SendOutlineToStarImpress"/>
+ <menu:menuitem menu:id=".uno:SendOutlineToClipboard"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:CreateAbstract"/>
+ <menu:menuitem menu:id=".uno:SendAbstractToStarImpress"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SetDocumentProperties"/>
+ <menu:menuitem menu:id=".uno:Signature"/>
+ <menu:menu menu:id=".uno:TemplateMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:Organizer"/>
+ <menu:menuitem menu:id=".uno:AddressBookSource"/>
+ <menu:menuitem menu:id=".uno:SaveAsTemplate"/>
+ <menu:menuitem menu:id=".uno:OpenTemplate"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:PrintPreview"/>
+ <menu:menuitem menu:id=".uno:Print"/>
+ <menu:menuitem menu:id=".uno:PrinterSetup"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Quit"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:EditMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:Undo"/>
+ <menu:menuitem menu:id=".uno:Redo"/>
+ <menu:menuitem menu:id=".uno:Repeat"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Cut"/>
+ <menu:menuitem menu:id=".uno:Copy"/>
+ <menu:menuitem menu:id=".uno:Paste"/>
+ <menu:menuitem menu:id=".uno:PasteSpecial"/>
+ <menu:menuitem menu:id=".uno:SelectTextMode"/>
+ <menu:menu menu:id=".uno:SelectionModeMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SelectionModeDefault" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SelectionModeBlock" menu:style="radio"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:SelectAll"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:ChangesMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:TrackChanges"/>
+ <menu:menuitem menu:id=".uno:ProtectTraceChangeMode"/>
+ <menu:menuitem menu:id=".uno:ShowTrackedChanges"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AcceptTrackedChanges"/>
+ <menu:menuitem menu:id=".uno:CommentChangeTracking"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MergeDocuments"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:CompareDocuments"/>
+ <menu:menuitem menu:id=".uno:SearchDialog"/>
+ <menu:menuitem menu:id=".uno:EditGlossary"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ChangeDatabaseField"/>
+ <menu:menuitem menu:id=".uno:FieldDialog"/>
+ <menu:menuitem menu:id=".uno:EditFootnote"/>
+ <menu:menuitem menu:id=".uno:IndexEntryDialog"/>
+ <menu:menuitem menu:id=".uno:AuthoritiesEntryDialog"/>
+ <menu:menuitem menu:id=".uno:EditHyperlink"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:LinkDialog"/>
+ <menu:menuitem menu:id=".uno:PlugInsActive"/>
+ <menu:menuitem menu:id=".uno:ImageMapDialog"/>
+ <menu:menuitem menu:id=".uno:ObjectMenue"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ViewMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:PrintLayout"/>
+ <menu:menuitem menu:id=".uno:BrowseView"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AvailableToolbars"/>
+ <menu:menuitem menu:id=".uno:StatusBarVisible"/>
+ <menu:menuitem menu:id=".uno:ShowImeStatusWindow"/>
+ <menu:menuitem menu:id=".uno:Ruler"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ViewBounds"/>
+ <menu:menuitem menu:id=".uno:Marks"/>
+ <menu:menuitem menu:id=".uno:Fieldnames"/>
+ <menu:menuitem menu:id=".uno:ControlCodes"/>
+ <menu:menuitem menu:id=".uno:ShowHiddenParagraphs"/>
+ <menu:menuitem menu:id=".uno:ShowAnnotations"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ViewDataSourceBrowser"/>
+ <menu:menuitem menu:id=".uno:Navigator"/>
+ <menu:menuitem menu:id=".uno:TaskPane"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FullScreen"/>
+ <menu:menuitem menu:id=".uno:Zoom"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:InsertMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:InsertBreak"/>
+ <menu:menu menu:id=".uno:FieldMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:InsertDateField"/>
+ <menu:menuitem menu:id=".uno:InsertTimeField"/>
+ <menu:menuitem menu:id=".uno:InsertPageNumberField"/>
+ <menu:menuitem menu:id=".uno:InsertPageCountField"/>
+ <menu:menuitem menu:id=".uno:InsertTopicField"/>
+ <menu:menuitem menu:id=".uno:InsertTitleField"/>
+ <menu:menuitem menu:id=".uno:InsertAuthorField"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertField"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:InsertSymbol"/>
+ <menu:menu menu:id=".uno:FormattingMarkMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:InsertNonBreakingSpace"/>
+ <menu:menuitem menu:id=".uno:InsertHardHyphen"/>
+ <menu:menuitem menu:id=".uno:InsertSoftHyphen"/>
+ <menu:menuitem menu:id=".uno:InsertZWSP"/>
+ <menu:menuitem menu:id=".uno:InsertZWNBSP"/>
+ <menu:menuitem menu:id=".uno:InsertLRM"/>
+ <menu:menuitem menu:id=".uno:InsertRLM"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertSection"/>
+ <menu:menuitem menu:id=".uno:HyperlinkDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertPageHeader"/>
+ <menu:menuitem menu:id=".uno:InsertPageFooter"/>
+ <menu:menuitem menu:id=".uno:InsertFootnoteDialog"/>
+ <menu:menuitem menu:id=".uno:InsertCaptionDialog"/>
+ <menu:menuitem menu:id=".uno:InsertBookmark"/>
+ <menu:menuitem menu:id=".uno:InsertReferenceField"/>
+ <menu:menuitem menu:id=".uno:InsertAnnotation"/>
+ <menu:menuitem menu:id=".uno:InsertScript"/>
+ <menu:menu menu:id=".uno:IndexesMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:InsertIndexesEntry"/>
+ <menu:menuitem menu:id=".uno:InsertMultiIndex"/>
+ <menu:menuitem menu:id=".uno:InsertAuthoritiesEntry"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertEnvelope"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertFrame"/>
+ <menu:menuitem menu:id=".uno:InsertTable"/>
+ <menu:menuitem menu:id=".uno:InsertGraphicRuler"/>
+ <menu:menu menu:id=".uno:GraphicMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:InsertGraphic"/>
+ <menu:menu menu:id=".uno:Scan">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:TwainSelect"/>
+ <menu:menuitem menu:id=".uno:TwainTransfer"/>
+ </menu:menupopup>
+ </menu:menu>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:InsertAVMedia"/>
+ <menu:menu menu:id=".uno:ObjectMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:AddDirect"/>
- <menu:menuitem menu:id=".uno:Open"/>
- <menu:menuitem menu:id=".uno:RecentFileList"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AutoPilotMenu"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:CloseDoc"/>
- <menu:menuitem menu:id=".uno:Save"/>
- <menu:menuitem menu:id=".uno:SaveAs"/>
- <menu:menuitem menu:id=".uno:SaveAll"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Reload"/>
- <menu:menuitem menu:id=".uno:VersionDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ExportTo"/>
- <menu:menuitem menu:id=".uno:ExportToPDF"/>
- <menu:menu menu:id=".uno:SendToMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SendMail"/>
- <menu:menuitem menu:id=".uno:SendMailDocAsOOo"/>
- <menu:menuitem menu:id=".uno:SendMailDocAsMS"/>
- <menu:menuitem menu:id=".uno:SendMailDocAsPDF"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:NewGlobalDoc"/>
- <menu:menuitem menu:id=".uno:NewHtmlDoc"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SendOutlineToStarImpress"/>
- <menu:menuitem menu:id=".uno:SendOutlineToClipboard"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:CreateAbstract"/>
- <menu:menuitem menu:id=".uno:SendAbstractToStarImpress"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SetDocumentProperties"/>
- <menu:menuitem menu:id=".uno:Signature"/>
- <menu:menu menu:id=".uno:TemplateMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:Organizer"/>
- <menu:menuitem menu:id=".uno:AddressBookSource"/>
- <menu:menuitem menu:id=".uno:SaveAsTemplate"/>
- <menu:menuitem menu:id=".uno:OpenTemplate"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:PrintPreview"/>
- <menu:menuitem menu:id=".uno:Print"/>
- <menu:menuitem menu:id=".uno:PrinterSetup"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Quit"/>
+ <menu:menuitem menu:id=".uno:InsertObject"/>
+ <menu:menuitem menu:id=".uno:InsertPlugin"/>
+ <menu:menuitem menu:id=".uno:InsertSound"/>
+ <menu:menuitem menu:id=".uno:InsertVideo"/>
+ <menu:menuitem menu:id=".uno:InsertObjectStarMath"/>
+ <menu:menuitem menu:id=".uno:InsertObjectChart"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:EditMenu">
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:InsertObjectFloatingFrame"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertDoc"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:FormatMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:ResetAttributes"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FontDialog"/>
+ <menu:menuitem menu:id=".uno:ParagraphDialog"/>
+ <menu:menuitem menu:id=".uno:BulletsAndNumberingDialog"/>
+ <menu:menuitem menu:id=".uno:PageDialog"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:TransliterateMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:ChangeCaseToSentenceCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToTitleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToToggleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:RubyDialog"/>
+ <menu:menuitem menu:id=".uno:FormatColumns"/>
+ <menu:menuitem menu:id=".uno:EditRegion"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:DesignerDialog"/>
+ <menu:menu menu:id=".uno:AutoFormatMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:OnlineAutoFormat"/>
+ <menu:menuitem menu:id=".uno:AutoFormatApply"/>
+ <menu:menuitem menu:id=".uno:AutoFormatRedlineApply"/>
+ <menu:menuitem menu:id=".uno:AutoCorrectDlg"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:AnchorMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:Undo"/>
- <menu:menuitem menu:id=".uno:Redo"/>
- <menu:menuitem menu:id=".uno:Repeat"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Cut"/>
- <menu:menuitem menu:id=".uno:Copy"/>
- <menu:menuitem menu:id=".uno:Paste"/>
- <menu:menuitem menu:id=".uno:PasteSpecial"/>
- <menu:menuitem menu:id=".uno:SelectTextMode"/>
- <menu:menu menu:id=".uno:SelectionModeMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SelectionModeDefault"/>
- <menu:menuitem menu:id=".uno:SelectionModeBlock"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:SelectAll"/>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:ChangesMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:TrackChanges"/>
- <menu:menuitem menu:id=".uno:ProtectTraceChangeMode"/>
- <menu:menuitem menu:id=".uno:ShowTrackedChanges"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AcceptTrackedChanges"/>
- <menu:menuitem menu:id=".uno:CommentChangeTracking"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MergeDocuments"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:CompareDocuments"/>
- <menu:menuitem menu:id=".uno:SearchDialog"/>
- <menu:menuitem menu:id=".uno:EditGlossary"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ChangeDatabaseField"/>
- <menu:menuitem menu:id=".uno:FieldDialog"/>
- <menu:menuitem menu:id=".uno:EditFootnote"/>
- <menu:menuitem menu:id=".uno:IndexEntryDialog"/>
- <menu:menuitem menu:id=".uno:AuthoritiesEntryDialog"/>
- <menu:menuitem menu:id=".uno:EditHyperlink"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:LinkDialog"/>
- <menu:menuitem menu:id=".uno:PlugInsActive"/>
- <menu:menuitem menu:id=".uno:ImageMapDialog"/>
- <menu:menuitem menu:id=".uno:ObjectMenue"/>
+ <menu:menuitem menu:id=".uno:SetAnchorToPage" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetAnchorToPara" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetAnchorAtChar" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetAnchorToChar" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:SetAnchorToFrame" menu:style="radio"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ViewMenu">
+ </menu:menu>
+ <menu:menu menu:id=".uno:WrapMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:PrintLayout"/>
- <menu:menuitem menu:id=".uno:BrowseView"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AvailableToolbars"/>
- <menu:menuitem menu:id=".uno:StatusBarVisible"/>
- <menu:menuitem menu:id=".uno:ShowImeStatusWindow"/>
- <menu:menuitem menu:id=".uno:Ruler"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ViewBounds"/>
- <menu:menuitem menu:id=".uno:Marks"/>
- <menu:menuitem menu:id=".uno:Fieldnames"/>
- <menu:menuitem menu:id=".uno:ControlCodes"/>
- <menu:menuitem menu:id=".uno:ShowHiddenParagraphs"/>
- <menu:menuitem menu:id=".uno:ShowAnnotations"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ViewDataSourceBrowser"/>
- <menu:menuitem menu:id=".uno:Navigator"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:FullScreen"/>
- <menu:menuitem menu:id=".uno:Zoom"/>
+ <menu:menuitem menu:id=".uno:WrapOff"/>
+ <menu:menuitem menu:id=".uno:WrapOn"/>
+ <menu:menuitem menu:id=".uno:WrapIdeal"/>
+ <menu:menuitem menu:id=".uno:WrapThrough"/>
+ <menu:menuitem menu:id=".uno:WrapThroughTransparent"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:WrapContour"/>
+ <menu:menuitem menu:id=".uno:ContourDialog"/>
+ <menu:menuitem menu:id=".uno:WrapAnchorOnly"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:TextWrap"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:InsertMenu">
+ </menu:menu>
+ <menu:menu menu:id=".uno:ObjectAlign">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertBreak"/>
- <menu:menu menu:id=".uno:FieldMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertDateField"/>
- <menu:menuitem menu:id=".uno:InsertTimeField"/>
- <menu:menuitem menu:id=".uno:InsertPageNumberField"/>
- <menu:menuitem menu:id=".uno:InsertPageCountField"/>
- <menu:menuitem menu:id=".uno:InsertTopicField"/>
- <menu:menuitem menu:id=".uno:InsertTitleField"/>
- <menu:menuitem menu:id=".uno:InsertAuthorField"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertField"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:InsertSymbol"/>
- <menu:menu menu:id=".uno:FormattingMarkMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertNonBreakingSpace"/>
- <menu:menuitem menu:id=".uno:InsertHardHyphen"/>
- <menu:menuitem menu:id=".uno:InsertSoftHyphen"/>
- <menu:menuitem menu:id=".uno:InsertZWSP"/>
- <menu:menuitem menu:id=".uno:InsertZWNBSP"/>
- <menu:menuitem menu:id=".uno:InsertLRM"/>
- <menu:menuitem menu:id=".uno:InsertRLM"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertSection"/>
- <menu:menuitem menu:id=".uno:HyperlinkDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertPageHeader"/>
- <menu:menuitem menu:id=".uno:InsertPageFooter"/>
- <menu:menuitem menu:id=".uno:InsertFootnoteDialog"/>
- <menu:menuitem menu:id=".uno:InsertCaptionDialog"/>
- <menu:menuitem menu:id=".uno:InsertBookmark"/>
- <menu:menuitem menu:id=".uno:InsertReferenceField"/>
- <menu:menuitem menu:id=".uno:InsertAnnotation"/>
- <menu:menuitem menu:id=".uno:InsertScript"/>
- <menu:menu menu:id=".uno:IndexesMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertIndexesEntry"/>
- <menu:menuitem menu:id=".uno:InsertMultiIndex"/>
- <menu:menuitem menu:id=".uno:InsertAuthoritiesEntry"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertEnvelope"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertFrame"/>
- <menu:menuitem menu:id=".uno:InsertTable"/>
- <menu:menuitem menu:id=".uno:InsertGraphicRuler"/>
- <menu:menu menu:id=".uno:GraphicMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertGraphic"/>
- <menu:menu menu:id=".uno:Scan">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:TwainSelect"/>
- <menu:menuitem menu:id=".uno:TwainTransfer"/>
- </menu:menupopup>
- </menu:menu>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:InsertAVMedia"/>
- <menu:menu menu:id=".uno:ObjectMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertObject"/>
- <menu:menuitem menu:id=".uno:InsertPlugin"/>
- <menu:menuitem menu:id=".uno:InsertSound"/>
- <menu:menuitem menu:id=".uno:InsertVideo"/>
- <menu:menuitem menu:id=".uno:InsertObjectStarMath"/>
- <menu:menuitem menu:id=".uno:InsertObjectChart"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:InsertObjectFloatingFrame"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertDoc"/>
+ <menu:menuitem menu:id=".uno:CommonAlignLeft" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:CommonAlignHorizontalCenter" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:CommonAlignRight" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:CommonAlignJustified" menu:style="radio"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:CommonAlignTop"/>
+ <menu:menuitem menu:id=".uno:CommonAlignVerticalCenter"/>
+ <menu:menuitem menu:id=".uno:CommonAlignBottom"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:FormatMenu">
+ </menu:menu>
+ <menu:menu menu:id=".uno:ArrangeMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:ResetAttributes"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:FontDialog"/>
- <menu:menuitem menu:id=".uno:ParagraphDialog"/>
- <menu:menuitem menu:id=".uno:BulletsAndNumberingDialog"/>
- <menu:menuitem menu:id=".uno:PageDialog"/>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:TransliterateMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:RubyDialog"/>
- <menu:menuitem menu:id=".uno:FormatColumns"/>
- <menu:menuitem menu:id=".uno:EditRegion"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:DesignerDialog"/>
- <menu:menu menu:id=".uno:AutoFormatMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:OnlineAutoFormat"/>
- <menu:menuitem menu:id=".uno:AutoFormatApply"/>
- <menu:menuitem menu:id=".uno:AutoFormatRedlineApply"/>
- <menu:menuitem menu:id=".uno:AutoCorrectDlg"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:AnchorMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SetAnchorToPage"/>
- <menu:menuitem menu:id=".uno:SetAnchorToPara"/>
- <menu:menuitem menu:id=".uno:SetAnchorAtChar"/>
- <menu:menuitem menu:id=".uno:SetAnchorToChar"/>
- <menu:menuitem menu:id=".uno:SetAnchorToFrame"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:WrapMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:WrapOff"/>
- <menu:menuitem menu:id=".uno:WrapOn"/>
- <menu:menuitem menu:id=".uno:WrapIdeal"/>
- <menu:menuitem menu:id=".uno:WrapThrough"/>
- <menu:menuitem menu:id=".uno:WrapThroughTransparent"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:WrapContour"/>
- <menu:menuitem menu:id=".uno:ContourDialog"/>
- <menu:menuitem menu:id=".uno:WrapAnchorOnly"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:TextWrap"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ObjectAlign">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:CommonAlignLeft"/>
- <menu:menuitem menu:id=".uno:CommonAlignHorizontalCenter"/>
- <menu:menuitem menu:id=".uno:CommonAlignRight"/>
- <menu:menuitem menu:id=".uno:CommonAlignJustified"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:CommonAlignTop"/>
- <menu:menuitem menu:id=".uno:CommonAlignVerticalCenter"/>
- <menu:menuitem menu:id=".uno:CommonAlignBottom"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ArrangeMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:BringToFront"/>
- <menu:menuitem menu:id=".uno:ObjectForwardOne"/>
- <menu:menuitem menu:id=".uno:ObjectBackOne"/>
- <menu:menuitem menu:id=".uno:SendToBack"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SetObjectToForeground"/>
- <menu:menuitem menu:id=".uno:SetObjectToBackground"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:FlipMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:FlipHorizontal"/>
- <menu:menuitem menu:id=".uno:FlipVertical"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:GroupMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:FormatGroup"/>
- <menu:menuitem menu:id=".uno:FormatUngroup"/>
- <menu:menuitem menu:id=".uno:EnterGroup"/>
- <menu:menuitem menu:id=".uno:LeaveGroup"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:ObjectMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:TransformDialog"/>
- <menu:menuitem menu:id=".uno:FormatLine"/>
- <menu:menuitem menu:id=".uno:FormatArea"/>
- <menu:menuitem menu:id=".uno:TextAttributes"/>
- <menu:menuitem menu:id=".uno:FontWork"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ObjectTitleDescription"/>
- <menu:menuitem menu:id=".uno:NameGroup"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:FrameDialog"/>
- <menu:menuitem menu:id=".uno:GraphicDialog"/>
+ <menu:menuitem menu:id=".uno:BringToFront"/>
+ <menu:menuitem menu:id=".uno:ObjectForwardOne"/>
+ <menu:menuitem menu:id=".uno:ObjectBackOne"/>
+ <menu:menuitem menu:id=".uno:SendToBack"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SetObjectToForeground"/>
+ <menu:menuitem menu:id=".uno:SetObjectToBackground"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:TableMenu">
+ </menu:menu>
+ <menu:menu menu:id=".uno:FlipMenu">
<menu:menupopup>
- <menu:menu menu:id=".uno:TableInsertMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertTable"/>
- <menu:menuitem menu:id=".uno:InsertRowDialog"/>
- <menu:menuitem menu:id=".uno:InsertColumnDialog"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:TableDeleteMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:DeleteTable"/>
- <menu:menuitem menu:id=".uno:DeleteRows"/>
- <menu:menuitem menu:id=".uno:DeleteColumns"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:TableSelectMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SelectTable"/>
- <menu:menuitem menu:id=".uno:EntireRow"/>
- <menu:menuitem menu:id=".uno:EntireColumn"/>
- <menu:menuitem menu:id=".uno:EntireCell"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:MergeCells"/>
- <menu:menuitem menu:id=".uno:SplitCell"/>
- <menu:menuitem menu:id=".uno:Protect"/>
- <menu:menuitem menu:id=".uno:MergeTable"/>
- <menu:menuitem menu:id=".uno:SplitTable"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AutoFormat"/>
- <menu:menu menu:id=".uno:TableAutoFitMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SetColumnWidth"/>
- <menu:menuitem menu:id=".uno:SetOptimalColumnWidth"/>
- <menu:menuitem menu:id=".uno:DistributeColumns"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SetRowHeight"/>
- <menu:menuitem menu:id=".uno:SetOptimalRowHeight"/>
- <menu:menuitem menu:id=".uno:DistributeRows"/>
- <menu:menuitem menu:id=".uno:RowSplit"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:HeadingRowsRepeat"/>
- <menu:menu menu:id=".uno:TableConvertMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:ConvertTextToTable"/>
- <menu:menuitem menu:id=".uno:ConvertTableToText"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:TableSort"/>
- <menu:menuitem menu:id=".uno:InsertFormula"/>
- <menu:menuitem menu:id=".uno:TableNumberFormatDialog"/>
- <menu:menuitem menu:id=".uno:TableBoundaries"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:TableDialog"/>
+ <menu:menuitem menu:id=".uno:FlipHorizontal"/>
+ <menu:menuitem menu:id=".uno:FlipVertical"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ToolsMenu">
+ </menu:menu>
+ <menu:menu menu:id=".uno:GroupMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:SpellingAndGrammarDialog"/>
- <menu:menu menu:id=".uno:LanguageMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:HangulHanjaConversion"/>
- <menu:menuitem menu:id=".uno:ChineseConversion"/>
- <menu:menuitem menu:id=".uno:ThesaurusDialog"/>
- <menu:menuitem menu:id=".uno:Hyphenate"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MoreDictionaries"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:WordCountDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ChapterNumberingDialog"/>
- <menu:menuitem menu:id=".uno:LineNumberingDialog"/>
- <menu:menuitem menu:id=".uno:FootnoteDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Gallery"/>
- <menu:menuitem menu:id=".uno:AVMediaPlayer"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:BibliographyComponent"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MailMergeWizard"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SortDialog"/>
- <menu:menuitem menu:id=".uno:CalculateSel"/>
- <menu:menu menu:id=".uno:UpdateMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:UpdateAll"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:UpdateFields"/>
- <menu:menuitem menu:id=".uno:UpdateAllLinks"/>
- <menu:menuitem menu:id=".uno:UpdateCharts"/>
- <menu:menuitem menu:id=".uno:UpdateCurIndex"/>
- <menu:menuitem menu:id=".uno:UpdateAllIndexes"/>
- <menu:menuitem menu:id=".uno:Repaginate"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:MacrosMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:MacroRecorder"/>
- <menu:menuitem menu:id=".uno:RunMacro"/>
- <menu:menu menu:id=".uno:ScriptOrganizer"/>
- <menu:menuitem menu:id=".uno:MacroSignature"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MacroOrganizer?TabId:short=1"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id="service:com.sun.star.deployment.ui.PackageManagerDialog"/>
- <menu:menuitem menu:id=".uno:OpenXMLFilterSettings"/>
- <menu:menuitem menu:id=".uno:ConfigureDialog"/>
- <menu:menuitem menu:id=".uno:OptionsTreeDialog"/>
+ <menu:menuitem menu:id=".uno:FormatGroup"/>
+ <menu:menuitem menu:id=".uno:FormatUngroup"/>
+ <menu:menuitem menu:id=".uno:EnterGroup"/>
+ <menu:menuitem menu:id=".uno:LeaveGroup"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:WindowList">
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:ObjectMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:TransformDialog"/>
+ <menu:menuitem menu:id=".uno:FormatLine"/>
+ <menu:menuitem menu:id=".uno:FormatArea"/>
+ <menu:menuitem menu:id=".uno:TextAttributes"/>
+ <menu:menuitem menu:id=".uno:FontWork"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ObjectTitleDescription"/>
+ <menu:menuitem menu:id=".uno:NameGroup"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:FrameDialog"/>
+ <menu:menuitem menu:id=".uno:GraphicDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:TableMenu">
+ <menu:menupopup>
+ <menu:menu menu:id=".uno:TableInsertMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:InsertTable"/>
+ <menu:menuitem menu:id=".uno:InsertRowDialog"/>
+ <menu:menuitem menu:id=".uno:InsertColumnDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:TableDeleteMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:NewWindow"/>
- <menu:menuitem menu:id=".uno:CloseWin"/>
- <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:DeleteTable"/>
+ <menu:menuitem menu:id=".uno:DeleteRows"/>
+ <menu:menuitem menu:id=".uno:DeleteColumns"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:HelpMenu">
+ </menu:menu>
+ <menu:menu menu:id=".uno:TableSelectMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:HelpIndex"/>
- <menu:menuitem menu:id=".uno:ExtendedHelp"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HelpSupport"/>
- <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:About"/>
+ <menu:menuitem menu:id=".uno:SelectTable"/>
+ <menu:menuitem menu:id=".uno:EntireRow"/>
+ <menu:menuitem menu:id=".uno:EntireColumn"/>
+ <menu:menuitem menu:id=".uno:EntireCell"/>
</menu:menupopup>
- </menu:menu>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:MergeCells"/>
+ <menu:menuitem menu:id=".uno:SplitCell"/>
+ <menu:menuitem menu:id=".uno:Protect"/>
+ <menu:menuitem menu:id=".uno:MergeTable"/>
+ <menu:menuitem menu:id=".uno:SplitTable"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AutoFormat"/>
+ <menu:menu menu:id=".uno:TableAutoFitMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SetColumnWidth"/>
+ <menu:menuitem menu:id=".uno:SetOptimalColumnWidth"/>
+ <menu:menuitem menu:id=".uno:DistributeColumns"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SetRowHeight"/>
+ <menu:menuitem menu:id=".uno:SetOptimalRowHeight"/>
+ <menu:menuitem menu:id=".uno:DistributeRows"/>
+ <menu:menuitem menu:id=".uno:RowSplit"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:HeadingRowsRepeat"/>
+ <menu:menu menu:id=".uno:TableConvertMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:ConvertTextToTable"/>
+ <menu:menuitem menu:id=".uno:ConvertTableToText"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:TableSort"/>
+ <menu:menuitem menu:id=".uno:InsertFormula"/>
+ <menu:menuitem menu:id=".uno:TableNumberFormatDialog"/>
+ <menu:menuitem menu:id=".uno:TableBoundaries"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:TableDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ToolsMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SpellingAndGrammarDialog"/>
+ <menu:menu menu:id=".uno:LanguageMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:HangulHanjaConversion"/>
+ <menu:menuitem menu:id=".uno:ChineseConversion"/>
+ <menu:menuitem menu:id=".uno:ThesaurusDialog"/>
+ <menu:menuitem menu:id=".uno:Hyphenate"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MoreDictionaries"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:WordCountDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ChapterNumberingDialog"/>
+ <menu:menuitem menu:id=".uno:LineNumberingDialog"/>
+ <menu:menuitem menu:id=".uno:FootnoteDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Gallery"/>
+ <menu:menuitem menu:id=".uno:AVMediaPlayer"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:BibliographyComponent"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MailMergeWizard"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SortDialog"/>
+ <menu:menuitem menu:id=".uno:CalculateSel"/>
+ <menu:menu menu:id=".uno:UpdateMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:UpdateAll"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:UpdateFields"/>
+ <menu:menuitem menu:id=".uno:UpdateAllLinks"/>
+ <menu:menuitem menu:id=".uno:UpdateCharts"/>
+ <menu:menuitem menu:id=".uno:UpdateCurIndex"/>
+ <menu:menuitem menu:id=".uno:UpdateAllIndexes"/>
+ <menu:menuitem menu:id=".uno:Repaginate"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:MacrosMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:MacroRecorder"/>
+ <menu:menuitem menu:id=".uno:RunMacro"/>
+ <menu:menu menu:id=".uno:ScriptOrganizer"/>
+ <menu:menuitem menu:id=".uno:MacroSignature"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MacroOrganizer?TabId:short=1"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id="service:com.sun.star.deployment.ui.PackageManagerDialog"/>
+ <menu:menuitem menu:id=".uno:OpenXMLFilterSettings"/>
+ <menu:menuitem menu:id=".uno:ConfigureDialog"/>
+ <menu:menuitem menu:id=".uno:OptionsTreeDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:WindowList">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:NewWindow"/>
+ <menu:menuitem menu:id=".uno:CloseWin"/>
+ <menu:menuseparator/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:HelpMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:HelpIndex"/>
+ <menu:menuitem menu:id=".uno:ExtendedHelp"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:HelpSupport"/>
+ <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:About"/>
+ </menu:menupopup>
+ </menu:menu>
</menu:menubar>
diff --git a/sw/uiconfig/swxform/toolbar/extrusionobjectbar.xml b/sw/uiconfig/swxform/toolbar/extrusionobjectbar.xml
index 1f212226cf..148849db6e 100644
--- a/sw/uiconfig/swxform/toolbar/extrusionobjectbar.xml
+++ b/sw/uiconfig/swxform/toolbar/extrusionobjectbar.xml
@@ -8,9 +8,9 @@
<toolbar:toolbaritem xlink:href=".uno:ExtrusionTiltLeft" toolbar:helpid="10963"/>
<toolbar:toolbaritem xlink:href=".uno:ExtrusionTiltRight" toolbar:helpid="10964"/>
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionDepthFloater" toolbar:helpid="10965"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionDirectionFloater" toolbar:helpid="10966"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionLightingFloater" toolbar:helpid="10967"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionSurfaceFloater" toolbar:helpid="10968"/>
- <toolbar:toolbaritem xlink:href=".uno:Extrusion3DColor" toolbar:helpid="10969"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionDepthFloater" toolbar:helpid="10965" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionDirectionFloater" toolbar:helpid="10966" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionLightingFloater" toolbar:helpid="10967" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionSurfaceFloater" toolbar:helpid="10968" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:Extrusion3DColor" toolbar:helpid="10969" toolbar:style="dropdownonly"/>
</toolbar:toolbar> \ No newline at end of file
diff --git a/sw/uiconfig/swxform/toolbar/findbar.xml b/sw/uiconfig/swxform/toolbar/findbar.xml
new file mode 100644
index 0000000000..9ef9d8a1a7
--- /dev/null
+++ b/sw/uiconfig/swxform/toolbar/findbar.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
+<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
+ <toolbar:toolbaritem xlink:href=".uno:FindText" toolbar:helpid="helpid:100105" />
+ <toolbar:toolbaritem xlink:href=".uno:DownSearch" toolbar:helpid="helpid:100105" />
+ <toolbar:toolbaritem xlink:href=".uno:UpSearch" toolbar:helpid="helpid:100105" />
+ <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:text="Find &amp; Replace" toolbar:visible="false" toolbar:helpid="helpid:100105"/>
+</toolbar:toolbar>
diff --git a/sw/uiconfig/swxform/toolbar/fontworkobjectbar.xml b/sw/uiconfig/swxform/toolbar/fontworkobjectbar.xml
index 3ac334e0e9..5219a1e235 100644
--- a/sw/uiconfig/swxform/toolbar/fontworkobjectbar.xml
+++ b/sw/uiconfig/swxform/toolbar/fontworkobjectbar.xml
@@ -3,9 +3,9 @@
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
<toolbar:toolbaritem xlink:href=".uno:FontworkGalleryFloater" toolbar:helpid="helpid:10977" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:FontworkShapeType" toolbar:helpid="helpid:10978" toolbar:style="radio dropdown" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkShapeType" toolbar:helpid="helpid:10978" toolbar:style="dropdownonly" />
<toolbar:toolbaritem xlink:href=".uno:FontworkSameLetterHeights" toolbar:helpid="helpid:10979" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:FontworkAlignmentFloater" toolbar:helpid="helpid:10981" toolbar:style="dropdown" />
- <toolbar:toolbaritem xlink:href=".uno:FontworkCharacterSpacingFloater" toolbar:helpid="helpid:10982" toolbar:style="dropdown" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkAlignmentFloater" toolbar:helpid="helpid:10981" toolbar:style="dropdownonly" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkCharacterSpacingFloater" toolbar:helpid="helpid:10982" toolbar:style="dropdownonly" />
</toolbar:toolbar> \ No newline at end of file
diff --git a/sw/util/makefile.mk b/sw/util/makefile.mk
index 557e871a74..2907264d89 100644
--- a/sw/util/makefile.mk
+++ b/sw/util/makefile.mk
@@ -44,7 +44,7 @@ sw_res_files= \
$(SRS)$/dialog.srs \
$(SRS)$/chrdlg.srs \
$(SRS)$/config.srs \
- $(SRS)$/dbui.srs \
+ $(SRS)$/dbui.srs \
$(SRS)$/dochdl.srs \
$(SRS)$/docvw.srs \
$(SRS)$/envelp.srs \
@@ -60,7 +60,7 @@ sw_res_files= \
$(SRS)$/smartmenu.srs \
$(SRS)$/table.srs \
$(SRS)$/uiview.srs \
- $(SRS)$/undo.srs \
+ $(SRS)$/undo.srs \
$(SRS)$/unocore.srs \
$(SRS)$/utlui.srs \
$(SRS)$/web.srs \
@@ -118,8 +118,8 @@ SHL1STDLIBS+= \
$(SALLIB) \
$(SALHELPERLIB) \
$(ICUUCLIB) \
- $(I18NUTILLIB) \
- $(VBAHELPERLIB) \
+ $(I18NUTILLIB)
+SHL1STDLIBS+= \
$(AVMEDIALIB)
.IF "$(GUI)"=="WNT"
@@ -337,6 +337,7 @@ SHL4STDLIBS= \
$(BASICLIB) \
$(I18NUTILLIB)
+.IF "$(ENABLE_VBA)" == "YES"
#target vba
TARGET_VBA=vbaswobj
SHL5TARGET=$(TARGET_VBA)$(DLLPOSTFIX).uno
@@ -370,5 +371,6 @@ SHL5STDLIBS= \
SHL5DEPN=$(SHL1TARGETN)
SHL5LIBS=$(SLB)$/$(TARGET_VBA).lib
+.ENDIF # .IF "$(ENABLE_VBA)" == "YES"
.INCLUDE : target.mk