diff options
author | Michael Meeks <michael.meeks@novell.com> | 2011-03-04 14:57:45 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2011-03-04 14:57:45 +0000 |
commit | d7206332626870bf2b4460f6b52af031cc625d22 (patch) | |
tree | f3418c2cacc22512642cc293ed420238fed293ed /sw/source | |
parent | 91efc279ab46267e89212afc55fc2a6c1a6350be (diff) | |
parent | 5824c861a68f6dbf7be90ae4679baed222c4a57d (diff) |
Merge remote branch 'stage/ooo/dev300_m98_fixed' into integration/dev300_m98
Conflicts:
starmath/inc/dialog.hxx
starmath/inc/format.hxx
starmath/inc/node.hxx
starmath/inc/parse.hxx
starmath/inc/starmath.hrc
starmath/inc/symbol.hxx
starmath/inc/view.hxx
starmath/prj/build.lst
starmath/qa/unoapi/knownissues.xcl
starmath/sdi/smslots.sdi
starmath/source/cfgitem.cxx
starmath/source/cfgitem.hxx
starmath/source/dialog.cxx
starmath/source/document.cxx
starmath/source/edit.cxx
starmath/source/format.cxx
starmath/source/makefile.mk
starmath/source/math_pch.cxx
starmath/source/mathmlexport.cxx
starmath/source/mathmlexport.hxx
starmath/source/mathmlimport.cxx
starmath/source/mathmlimport.hxx
starmath/source/menu_tmpl.src
starmath/source/node.cxx
starmath/source/parse.cxx
starmath/source/smdll.cxx
starmath/source/smmod.cxx
starmath/source/smres.src
starmath/source/symbol.cxx
starmath/source/toolbox.cxx
starmath/source/types.cxx
starmath/source/unomodel.cxx
starmath/source/view.cxx
starmath/uiconfig/smath/menubar/menubar.xml
sw/Module_sw.mk
sw/Package_xml.mk
sw/inc/AnnotationWin.hxx
sw/inc/IDocumentLinksAdministration.hxx
sw/inc/IDocumentSettingAccess.hxx
sw/inc/IMark.hxx
sw/inc/PostItMgr.hxx
sw/inc/SidebarWin.hxx
sw/inc/SidebarWindowsTypes.hxx
sw/inc/SwNumberTree.hxx
sw/inc/accmap.hxx
sw/inc/anchoreddrawobject.hxx
sw/inc/chpfld.hxx
sw/inc/cmdid.h
sw/inc/comcore.hrc
sw/inc/crsrsh.hxx
sw/inc/dbfld.hxx
sw/inc/ddefld.hxx
sw/inc/doc.hxx
sw/inc/docsh.hxx
sw/inc/docufld.hxx
sw/inc/editsh.hxx
sw/inc/expfld.hxx
sw/inc/fesh.hxx
sw/inc/fldbas.hxx
sw/inc/flddat.hxx
sw/inc/fmtcol.hxx
sw/inc/frmfmt.hxx
sw/inc/helpid.h
sw/inc/hintids.hxx
sw/inc/lineinfo.hxx
sw/inc/makefile.mk
sw/inc/ndarr.hxx
sw/inc/ndgrf.hxx
sw/inc/ndole.hxx
sw/inc/ndtxt.hxx
sw/inc/numrule.hxx
sw/inc/pagedesc.hxx
sw/inc/pagepreviewlayout.hxx
sw/inc/pch/precompiled_sw.hxx
sw/inc/postithelper.hxx
sw/inc/printdata.hxx
sw/inc/reffld.hxx
sw/inc/rolbck.hxx
sw/inc/section.hxx
sw/inc/swabstdlg.hxx
sw/inc/swprtopt.hxx
sw/inc/swtable.hxx
sw/inc/tblafmt.hxx
sw/inc/tox.hxx
sw/inc/txtfld.hxx
sw/inc/undobj.hxx
sw/inc/unobaseclass.hxx
sw/inc/unobookmark.hxx
sw/inc/unocrsrhelper.hxx
sw/inc/unofootnote.hxx
sw/inc/unoframe.hxx
sw/inc/unoidx.hxx
sw/inc/unoparaframeenum.hxx
sw/inc/unoparagraph.hxx
sw/inc/unoprnms.hxx
sw/inc/unoredline.hxx
sw/inc/unoredlines.hxx
sw/inc/unorefmark.hxx
sw/inc/unosection.hxx
sw/inc/unostyle.hxx
sw/inc/unotext.hxx
sw/inc/unotextbodyhf.hxx
sw/inc/unotextcursor.hxx
sw/inc/unotextrange.hxx
sw/inc/unotxdoc.hxx
sw/inc/usrfld.hxx
sw/inc/viewsh.hxx
sw/inc/warnpassword.hxx
sw/prj/build.lst
sw/prj/d.lst
sw/qa/complex/indeterminateState/makefile.mk
sw/qa/complex/writer/TextPortionEnumerationTest.java
sw/qa/complex/writer/makefile.mk
sw/qa/core/makefile.mk
sw/qa/unoapi/knownissues.xcl
sw/sdi/makefile.mk
sw/source/core/SwNumberTree/SwNodeNum.cxx
sw/source/core/SwNumberTree/SwNumberTree.cxx
sw/source/core/SwNumberTree/makefile.mk
sw/source/core/access/acccell.cxx
sw/source/core/access/acccontext.cxx
sw/source/core/access/accframe.cxx
sw/source/core/access/accfrmobj.cxx
sw/source/core/access/accfrmobj.hxx
sw/source/core/access/accfrmobjmap.cxx
sw/source/core/access/accfrmobjslist.cxx
sw/source/core/access/accfrmobjslist.hxx
sw/source/core/access/accmap.cxx
sw/source/core/access/accpara.cxx
sw/source/core/access/accselectionhelper.cxx
sw/source/core/access/acctable.cxx
sw/source/core/access/makefile.mk
sw/source/core/access/parachangetrackinginfo.cxx
sw/source/core/access/parachangetrackinginfo.hxx
sw/source/core/access/textmarkuphelper.cxx
sw/source/core/attr/cellatr.cxx
sw/source/core/attr/hints.cxx
sw/source/core/attr/makefile.mk
sw/source/core/bastyp/breakit.cxx
sw/source/core/bastyp/calc.cxx
sw/source/core/bastyp/init.cxx
sw/source/core/bastyp/makefile.mk
sw/source/core/crsr/bookmrk.cxx
sw/source/core/crsr/callnk.cxx
sw/source/core/crsr/findtxt.cxx
sw/source/core/crsr/makefile.mk
sw/source/core/crsr/pam.cxx
sw/source/core/doc/SwStyleNameMapper.cxx
sw/source/core/doc/doc.cxx
sw/source/core/doc/doccomp.cxx
sw/source/core/doc/docdraw.cxx
sw/source/core/doc/docedt.cxx
sw/source/core/doc/docfld.cxx
sw/source/core/doc/docglbl.cxx
sw/source/core/doc/doclay.cxx
sw/source/core/doc/docnew.cxx
sw/source/core/doc/docnum.cxx
sw/source/core/doc/docredln.cxx
sw/source/core/doc/doctxm.cxx
sw/source/core/doc/makefile.mk
sw/source/core/doc/notxtfrm.cxx
sw/source/core/doc/number.cxx
sw/source/core/doc/tblrwcl.cxx
sw/source/core/docnode/makefile.mk
sw/source/core/docnode/ndsect.cxx
sw/source/core/docnode/ndtbl.cxx
sw/source/core/docnode/section.cxx
sw/source/core/docnode/swbaslnk.cxx
sw/source/core/draw/dflyobj.cxx
sw/source/core/draw/dview.cxx
sw/source/core/draw/makefile.mk
sw/source/core/edit/acorrect.cxx
sw/source/core/edit/autofmt.cxx
sw/source/core/edit/edattr.cxx
sw/source/core/edit/edfld.cxx
sw/source/core/edit/edlingu.cxx
sw/source/core/edit/edsect.cxx
sw/source/core/edit/edtox.cxx
sw/source/core/edit/makefile.mk
sw/source/core/except/dbgloop.cxx
sw/source/core/except/makefile.mk
sw/source/core/fields/cellfml.cxx
sw/source/core/fields/dbfld.cxx
sw/source/core/fields/docufld.cxx
sw/source/core/fields/fldbas.cxx
sw/source/core/fields/makefile.mk
sw/source/core/fields/postithelper.cxx
sw/source/core/fields/tblcalc.cxx
sw/source/core/fields/usrfld.cxx
sw/source/core/frmedt/fefly1.cxx
sw/source/core/frmedt/feshview.cxx
sw/source/core/frmedt/fetab.cxx
sw/source/core/frmedt/makefile.mk
sw/source/core/frmedt/tblsel.cxx
sw/source/core/graphic/makefile.mk
sw/source/core/inc/bookmrk.hxx
sw/source/core/inc/layfrm.hxx
sw/source/core/inc/scriptinfo.hxx
sw/source/core/inc/swfont.hxx
sw/source/core/inc/tabfrm.hxx
sw/source/core/inc/txmsrt.hxx
sw/source/core/inc/unoclbck.hxx
sw/source/core/inc/viewimp.hxx
sw/source/core/layout/atrfrm.cxx
sw/source/core/layout/dbg_lay.cxx
sw/source/core/layout/fly.cxx
sw/source/core/layout/flyincnt.cxx
sw/source/core/layout/layact.cxx
sw/source/core/layout/laycache.cxx
sw/source/core/layout/makefile.mk
sw/source/core/layout/paintfrm.cxx
sw/source/core/layout/tabfrm.cxx
sw/source/core/layout/trvlfrm.cxx
sw/source/core/layout/wsfrm.cxx
sw/source/core/makefile.mk
sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx
sw/source/core/objectpositioning/makefile.mk
sw/source/core/ole/makefile.mk
sw/source/core/ole/ndole.cxx
sw/source/core/para/makefile.mk
sw/source/core/sw3io/makefile.mk
sw/source/core/swg/makefile.mk
sw/source/core/table/makefile.mk
sw/source/core/table/swtable.cxx
sw/source/core/text/frmpaint.cxx
sw/source/core/text/inftxt.cxx
sw/source/core/text/inftxt.hxx
sw/source/core/text/itrform2.cxx
sw/source/core/text/makefile.mk
sw/source/core/text/porfld.cxx
sw/source/core/text/portxt.cxx
sw/source/core/text/txtfld.cxx
sw/source/core/text/txtfly.cxx
sw/source/core/text/txtio.cxx
sw/source/core/text/txttab.cxx
sw/source/core/tox/makefile.mk
sw/source/core/tox/txmsrt.cxx
sw/source/core/txtnode/atrfld.cxx
sw/source/core/txtnode/fmtatr2.cxx
sw/source/core/txtnode/fntcap.cxx
sw/source/core/txtnode/makefile.mk
sw/source/core/txtnode/ndtxt.cxx
sw/source/core/txtnode/swfont.cxx
sw/source/core/txtnode/thints.cxx
sw/source/core/txtnode/txtatr2.cxx
sw/source/core/txtnode/txtedt.cxx
sw/source/core/undo/makefile.mk
sw/source/core/undo/rolbck.cxx
sw/source/core/undo/undel.cxx
sw/source/core/undo/unmove.cxx
sw/source/core/undo/unnum.cxx
sw/source/core/undo/unsect.cxx
sw/source/core/unocore/SwXTextDefaults.cxx
sw/source/core/unocore/makefile.mk
sw/source/core/unocore/unobkm.cxx
sw/source/core/unocore/unocoll.cxx
sw/source/core/unocore/unocrsrhelper.cxx
sw/source/core/unocore/unofield.cxx
sw/source/core/unocore/unoflatpara.cxx
sw/source/core/unocore/unoframe.cxx
sw/source/core/unocore/unoftn.cxx
sw/source/core/unocore/unoidx.cxx
sw/source/core/unocore/unoobj.cxx
sw/source/core/unocore/unoobj2.cxx
sw/source/core/unocore/unoparagraph.cxx
sw/source/core/unocore/unoportenum.cxx
sw/source/core/unocore/unoprnms.cxx
sw/source/core/unocore/unoredline.cxx
sw/source/core/unocore/unoredlines.cxx
sw/source/core/unocore/unorefmk.cxx
sw/source/core/unocore/unosect.cxx
sw/source/core/unocore/unosrch.cxx
sw/source/core/unocore/unostyle.cxx
sw/source/core/unocore/unotbl.cxx
sw/source/core/unocore/unotext.cxx
sw/source/core/view/makefile.mk
sw/source/core/view/printdata.cxx
sw/source/core/view/vdraw.cxx
sw/source/core/view/viewimp.cxx
sw/source/core/view/viewpg.cxx
sw/source/core/view/viewsh.cxx
sw/source/core/view/vprint.cxx
sw/source/filter/ascii/ascatr.cxx
sw/source/filter/ascii/makefile.mk
sw/source/filter/basflt/fltini.cxx
sw/source/filter/basflt/makefile.mk
sw/source/filter/html/css1atr.cxx
sw/source/filter/html/htmlcss1.cxx
sw/source/filter/html/htmlfldw.cxx
sw/source/filter/html/htmlgrin.cxx
sw/source/filter/html/htmltab.cxx
sw/source/filter/html/htmltabw.cxx
sw/source/filter/html/makefile.mk
sw/source/filter/html/parcss1.cxx
sw/source/filter/html/swhtml.cxx
sw/source/filter/makefile.mk
sw/source/filter/rtf/makefile.mk
sw/source/filter/rtf/rtfnum.cxx
sw/source/filter/rtf/rtftbl.cxx
sw/source/filter/rtf/swparrtf.cxx
sw/source/filter/rtf/swparrtf.hxx
sw/source/filter/writer/makefile.mk
sw/source/filter/writer/writer.cxx
sw/source/filter/writer/wrtswtbl.cxx
sw/source/filter/ww1/fltshell.cxx
sw/source/filter/ww1/makefile.mk
sw/source/filter/ww1/w1filter.cxx
sw/source/filter/ww1/w1sprm.cxx
sw/source/filter/ww8/README-rtf.txt
sw/source/filter/ww8/WW8Sttbf.cxx
sw/source/filter/ww8/WW8TableInfo.cxx
sw/source/filter/ww8/attributeoutputbase.hxx
sw/source/filter/ww8/docxattributeoutput.cxx
sw/source/filter/ww8/docxexport.cxx
sw/source/filter/ww8/docxexport.hxx
sw/source/filter/ww8/docxexportfilter.cxx
sw/source/filter/ww8/dump/dump8.cxx
sw/source/filter/ww8/dump/dump8a.cxx
sw/source/filter/ww8/dump/msvbasic.cxx
sw/source/filter/ww8/dump/msvbasic.hxx
sw/source/filter/ww8/dump/ww8darr.cxx
sw/source/filter/ww8/dump/ww8dout.cxx
sw/source/filter/ww8/dump/ww8dout.hxx
sw/source/filter/ww8/dump/ww8scan.cxx
sw/source/filter/ww8/dump/ww8scan.hxx
sw/source/filter/ww8/dump/ww8struc.hxx
sw/source/filter/ww8/makefile.mk
sw/source/filter/ww8/rtfattributeoutput.cxx
sw/source/filter/ww8/rtfattributeoutput.hxx
sw/source/filter/ww8/rtfexport.cxx
sw/source/filter/ww8/rtfexport.hxx
sw/source/filter/ww8/rtfexportfilter.cxx
sw/source/filter/ww8/rtfexportfilter.hxx
sw/source/filter/ww8/rtfimportfilter.cxx
sw/source/filter/ww8/rtfimportfilter.hxx
sw/source/filter/ww8/rtfsdrexport.cxx
sw/source/filter/ww8/rtfsdrexport.hxx
sw/source/filter/ww8/writerhelper.cxx
sw/source/filter/ww8/writerhelper.hxx
sw/source/filter/ww8/writerwordglue.cxx
sw/source/filter/ww8/wrtw8esh.cxx
sw/source/filter/ww8/wrtw8nds.cxx
sw/source/filter/ww8/wrtw8sty.cxx
sw/source/filter/ww8/wrtww8.cxx
sw/source/filter/ww8/wrtww8.hxx
sw/source/filter/ww8/wrtww8gr.cxx
sw/source/filter/ww8/ww8atr.cxx
sw/source/filter/ww8/ww8graf.cxx
sw/source/filter/ww8/ww8par.cxx
sw/source/filter/ww8/ww8par.hxx
sw/source/filter/ww8/ww8par2.cxx
sw/source/filter/ww8/ww8par3.cxx
sw/source/filter/ww8/ww8par5.cxx
sw/source/filter/ww8/ww8par6.cxx
sw/source/filter/ww8/ww8scan.cxx
sw/source/filter/xml/XMLRedlineImportHelper.cxx
sw/source/filter/xml/makefile.mk
sw/source/filter/xml/xmlexp.cxx
sw/source/filter/xml/xmlexp.hxx
sw/source/filter/xml/xmliteme.cxx
sw/source/filter/xml/xmlitemi.cxx
sw/source/filter/xml/xmltble.cxx
sw/source/ui/app/app.src
sw/source/ui/app/appenv.cxx
sw/source/ui/app/applab.cxx
sw/source/ui/app/appopt.cxx
sw/source/ui/app/docsh.cxx
sw/source/ui/app/docsh2.cxx
sw/source/ui/app/docshini.cxx
sw/source/ui/app/docstyle.cxx
sw/source/ui/app/makefile.mk
sw/source/ui/app/mn.src
sw/source/ui/app/swmodule.cxx
sw/source/ui/cctrl/makefile.mk
sw/source/ui/chrdlg/chardlg.cxx
sw/source/ui/chrdlg/drpcps.cxx
sw/source/ui/chrdlg/makefile.mk
sw/source/ui/chrdlg/swuiccoll.cxx
sw/source/ui/config/cfgitems.cxx
sw/source/ui/config/makefile.mk
sw/source/ui/config/modcfg.cxx
sw/source/ui/config/optdlg.src
sw/source/ui/config/optpage.cxx
sw/source/ui/config/prtopt.cxx
sw/source/ui/config/uinums.cxx
sw/source/ui/config/usrpref.cxx
sw/source/ui/config/viewopt.cxx
sw/source/ui/dbui/dbmgr.cxx
sw/source/ui/dbui/dbtree.cxx
sw/source/ui/dbui/makefile.mk
sw/source/ui/dbui/mmaddressblockpage.cxx
sw/source/ui/dbui/mmdocselectpage.cxx
sw/source/ui/dbui/mmgreetingspage.cxx
sw/source/ui/dbui/mmlayoutpage.cxx
sw/source/ui/dbui/mmoutputpage.cxx
sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
sw/source/ui/dialog/makefile.mk
sw/source/ui/dialog/regionsw.cxx
sw/source/ui/dialog/swdlgfact.cxx
sw/source/ui/dialog/swdlgfact.hxx
sw/source/ui/dialog/uiregionsw.cxx
sw/source/ui/dochdl/makefile.mk
sw/source/ui/dochdl/swdtflvr.cxx
sw/source/ui/docvw/AnchorOverlayObject.cxx
sw/source/ui/docvw/AnchorOverlayObject.hxx
sw/source/ui/docvw/AnnotationMenuButton.cxx
sw/source/ui/docvw/AnnotationMenuButton.hxx
sw/source/ui/docvw/AnnotationWin.cxx
sw/source/ui/docvw/PostItMgr.cxx
sw/source/ui/docvw/ShadowOverlayObject.cxx
sw/source/ui/docvw/ShadowOverlayObject.hxx
sw/source/ui/docvw/SidebarTxtControl.cxx
sw/source/ui/docvw/SidebarTxtControl.hxx
sw/source/ui/docvw/SidebarTxtControlAcc.cxx
sw/source/ui/docvw/SidebarTxtControlAcc.hxx
sw/source/ui/docvw/SidebarWin.cxx
sw/source/ui/docvw/SidebarWinAcc.cxx
sw/source/ui/docvw/SidebarWinAcc.hxx
sw/source/ui/docvw/annotation.hrc
sw/source/ui/docvw/annotation.src
sw/source/ui/docvw/edtdd.cxx
sw/source/ui/docvw/edtwin.cxx
sw/source/ui/docvw/edtwin2.cxx
sw/source/ui/docvw/frmsidebarwincontainer.cxx
sw/source/ui/docvw/frmsidebarwincontainer.hxx
sw/source/ui/docvw/makefile.mk
sw/source/ui/docvw/srcedtw.cxx
sw/source/ui/envelp/envfmt.cxx
sw/source/ui/envelp/makefile.mk
sw/source/ui/fldui/changedb.cxx
sw/source/ui/fldui/flddinf.cxx
sw/source/ui/fldui/fldmgr.cxx
sw/source/ui/fldui/inpdlg.cxx
sw/source/ui/fldui/makefile.mk
sw/source/ui/fmtui/makefile.mk
sw/source/ui/fmtui/tmpdlg.cxx
sw/source/ui/frmdlg/cption.cxx
sw/source/ui/frmdlg/frmdlg.cxx
sw/source/ui/frmdlg/frmmgr.cxx
sw/source/ui/frmdlg/frmpage.cxx
sw/source/ui/frmdlg/makefile.mk
sw/source/ui/frmdlg/wrap.cxx
sw/source/ui/frmdlg/wrap.hrc
sw/source/ui/globdoc/makefile.mk
sw/source/ui/inc/SidebarWindowsConsts.hxx
sw/source/ui/inc/app.hrc
sw/source/ui/inc/column.hxx
sw/source/ui/inc/dbtree.hxx
sw/source/ui/inc/envlop.hxx
sw/source/ui/inc/frmpage.hxx
sw/source/ui/inc/javaedit.hxx
sw/source/ui/inc/navipi.hxx
sw/source/ui/inc/optpage.hxx
sw/source/ui/inc/regionsw.hxx
sw/source/ui/inc/split.hxx
sw/source/ui/inc/swmn_tmpl.hrc
sw/source/ui/inc/swuicnttab.hxx
sw/source/ui/inc/swuiidxmrk.hxx
sw/source/ui/inc/tbxmgr.hxx
sw/source/ui/inc/utlui.hrc
sw/source/ui/inc/view.hxx
sw/source/ui/inc/workctrl.hxx
sw/source/ui/inc/wrap.hxx
sw/source/ui/inc/wrtsh.hxx
sw/source/ui/index/cnttab.cxx
sw/source/ui/index/cnttab.hrc
sw/source/ui/index/cnttab.src
sw/source/ui/index/makefile.mk
sw/source/ui/index/swuiidxmrk.cxx
sw/source/ui/lingu/hhcwrp.cxx
sw/source/ui/lingu/makefile.mk
sw/source/ui/lingu/olmenu.cxx
sw/source/ui/makefile.mk
sw/source/ui/misc/glossary.cxx
sw/source/ui/misc/insrule.cxx
sw/source/ui/misc/makefile.mk
sw/source/ui/misc/pggrid.cxx
sw/source/ui/ribbar/concustomshape.cxx
sw/source/ui/ribbar/inputwin.cxx
sw/source/ui/ribbar/makefile.mk
sw/source/ui/ribbar/tblctrl.src
sw/source/ui/ribbar/workctrl.cxx
sw/source/ui/ribbar/workctrl.hrc
sw/source/ui/ribbar/workctrl.src
sw/source/ui/shells/annotsh.cxx
sw/source/ui/shells/basesh.cxx
sw/source/ui/shells/drwtxtex.cxx
sw/source/ui/shells/drwtxtsh.cxx
sw/source/ui/shells/frmsh.cxx
sw/source/ui/shells/grfshex.cxx
sw/source/ui/shells/langhelper.cxx
sw/source/ui/shells/makefile.mk
sw/source/ui/shells/slotadd.cxx
sw/source/ui/shells/tabsh.cxx
sw/source/ui/shells/textfld.cxx
sw/source/ui/shells/textidx.cxx
sw/source/ui/shells/textsh.cxx
sw/source/ui/shells/textsh1.cxx
sw/source/ui/shells/txtattr.cxx
sw/source/ui/smartmenu/makefile.mk
sw/source/ui/table/chartins.cxx
sw/source/ui/table/makefile.mk
sw/source/ui/table/swtablerep.cxx
sw/source/ui/table/tabledlg.cxx
sw/source/ui/table/tablepg.hxx
sw/source/ui/uiview/makefile.mk
sw/source/ui/uiview/pview.cxx
sw/source/ui/uiview/pview.src
sw/source/ui/uiview/srcview.cxx
sw/source/ui/uiview/swcli.cxx
sw/source/ui/uiview/uivwimp.cxx
sw/source/ui/uiview/view.cxx
sw/source/ui/uiview/view0.cxx
sw/source/ui/uiview/view2.cxx
sw/source/ui/uiview/viewling.cxx
sw/source/ui/uiview/viewmdi.cxx
sw/source/ui/uiview/viewport.cxx
sw/source/ui/uiview/viewprt.cxx
sw/source/ui/uiview/viewsrch.cxx
sw/source/ui/uiview/viewtab.cxx
sw/source/ui/uno/SwXDocumentSettings.cxx
sw/source/ui/uno/SwXPrintPreviewSettings.cxx
sw/source/ui/uno/SwXPrintPreviewSettings.hxx
sw/source/ui/uno/makefile.mk
sw/source/ui/uno/unoatxt.cxx
sw/source/ui/uno/unomod.cxx
sw/source/ui/uno/unotxdoc.cxx
sw/source/ui/uno/unotxvw.cxx
sw/source/ui/utlui/content.cxx
sw/source/ui/utlui/glbltree.cxx
sw/source/ui/utlui/makefile.mk
sw/source/ui/utlui/navipi.cxx
sw/source/ui/utlui/navipi.hrc
sw/source/ui/utlui/uitool.cxx
sw/source/ui/utlui/utlui.src
sw/source/ui/vba/makefile.mk
sw/source/ui/vba/service.cxx
sw/source/ui/vba/vbaapplication.hxx
sw/source/ui/vba/vbaborders.cxx
sw/source/ui/vba/vbaeventshelper.cxx
sw/source/ui/vba/vbaeventshelper.hxx
sw/source/ui/vba/vbafield.cxx
sw/source/ui/vba/vbafield.hxx
sw/source/ui/vba/vbafind.cxx
sw/source/ui/vba/vbafind.hxx
sw/source/ui/vba/vbaglobals.hxx
sw/source/ui/vba/vbaheaderfooter.cxx
sw/source/ui/vba/vbaheaderfooterhelper.cxx
sw/source/ui/vba/vbaheaderfooterhelper.hxx
sw/source/ui/vba/vbarange.cxx
sw/source/ui/vba/vbarange.hxx
sw/source/ui/vba/vbaselection.cxx
sw/source/ui/vba/vbasystem.cxx
sw/source/ui/vba/vbatabstop.hxx
sw/source/ui/vba/vbawindow.cxx
sw/source/ui/vba/wordvbahelper.cxx
sw/source/ui/web/makefile.mk
sw/source/ui/web/wformsh.cxx
sw/source/ui/wrtsh/makefile.mk
sw/source/ui/wrtsh/wrtsh1.cxx
sw/source/ui/wrtsh/wrtundo.cxx
sw/uiconfig/sglobal/menubar/menubar.xml
sw/uiconfig/sweb/menubar/menubar.xml
sw/uiconfig/swform/menubar/menubar.xml
sw/uiconfig/swreport/menubar/menubar.xml
sw/uiconfig/swriter/menubar/menubar.xml
sw/uiconfig/swxform/menubar/menubar.xml
sw/util/hidother.src
sw/util/makefile.mk
sw/util/msword.map
sw/util/swui.map
Diffstat (limited to 'sw/source')
465 files changed, 7194 insertions, 10806 deletions
diff --git a/sw/source/core/SwNumberTree/SwNodeNum.cxx b/sw/source/core/SwNumberTree/SwNodeNum.cxx index 857ae2bd3f..32e670b17f 100644 --- a/sw/source/core/SwNumberTree/SwNodeNum.cxx +++ b/sw/source/core/SwNumberTree/SwNodeNum.cxx @@ -35,12 +35,9 @@ #include <ndtxt.hxx> #include <pam.hxx> #include <stdio.h> -// --> OD 2007-10-31 #i83479# #include <IDocumentListItems.hxx> -// <-- -// --> OD 2010-01-13 #b6912256# #include <doc.hxx> -// <-- + SwNodeNum::SwNodeNum( SwTxtNode* pTxtNode ) : SwNumberTreeNode(), diff --git a/sw/source/core/SwNumberTree/SwNumberTree.cxx b/sw/source/core/SwNumberTree/SwNumberTree.cxx index ec691a02c1..3816997a93 100644 --- a/sw/source/core/SwNumberTree/SwNumberTree.cxx +++ b/sw/source/core/SwNumberTree/SwNumberTree.cxx @@ -2,7 +2,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 diff --git a/sw/source/core/SwNumberTree/makefile.mk b/sw/source/core/SwNumberTree/makefile.mk deleted file mode 100644 index a7cfff9cec..0000000000 --- a/sw/source/core/SwNumberTree/makefile.mk +++ /dev/null @@ -1,50 +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. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=SwNumberTree - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(EXCEPTIONSFILES) - -EXCEPTIONSFILES = \ - $(SLO)$/SwNodeNum.obj \ - $(SLO)$/SwNumberTree.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx index 127820fe1f..44650dacf9 100644 --- a/sw/source/core/access/acccontext.cxx +++ b/sw/source/core/access/acccontext.cxx @@ -641,6 +641,10 @@ uno::Reference< XAccessible> SAL_CALL { xChild = aChild.GetWindow()->GetAccessible(); } + else if ( aChild.GetWindow() ) + { + xChild = aChild.GetWindow()->GetAccessible(); + } return xChild; } @@ -1165,6 +1169,15 @@ void SwAccessibleContext::DisposeChild( const SwAccessibleChild& rChildFrmOrObj, aEvent.OldValue <<= xAcc; FireAccessibleEvent( aEvent ); } + 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 ); @@ -1298,6 +1311,11 @@ void SwAccessibleContext::InvalidateChildPosOrSize( OSL_ENSURE( false, "<SwAccessibleContext::InvalidateChildPosOrSize(..)> - not expected to handle dispose of child of type <Window>." ); } + else if ( rChildFrmOrObj.GetWindow() ) + { + ASSERT( false, + "<SwAccessibleContext::InvalidateChildPosOrSize(..)> - not expected to handle dispose of child of type <Window>." ); + } } } } diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx index 1e72847fbe..e03c34dbfb 100644 --- a/sw/source/core/access/accfrmobj.cxx +++ b/sw/source/core/access/accfrmobj.cxx @@ -347,6 +347,99 @@ const SwFrm* SwAccessibleChild::GetParent( const sal_Bool bInPagePreview ) const { // 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 + +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(); OSL_ENSURE( SwAccessibleChild( pParent ).IsAccessible( bInPagePreview ), "parent is not accessible" ); } diff --git a/sw/source/core/access/accfrmobj.hxx b/sw/source/core/access/accfrmobj.hxx index 5bb470d2a4..cdc5e721de 100644 --- a/sw/source/core/access/accfrmobj.hxx +++ b/sw/source/core/access/accfrmobj.hxx @@ -27,7 +27,6 @@ ************************************************************************/ #ifndef _ACCFRMOBJ_HXX #define _ACCFRMOBJ_HXX - #include <sal/types.h> class SwAccessibleMap; diff --git a/sw/source/core/access/accfrmobjmap.cxx b/sw/source/core/access/accfrmobjmap.cxx index e7fd8644da..ad00de2487 100644 --- a/sw/source/core/access/accfrmobjmap.cxx +++ b/sw/source/core/access/accfrmobjmap.cxx @@ -168,4 +168,38 @@ SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea, rFrm.GetDrawObjs() ); } +::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() ); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/access/accfrmobjslist.cxx b/sw/source/core/access/accfrmobjslist.cxx index 846e06a043..07de9eee0f 100644 --- a/sw/source/core/access/accfrmobjslist.cxx +++ b/sw/source/core/access/accfrmobjslist.cxx @@ -73,11 +73,11 @@ SwAccessibleChildSList_const_iterator::SwAccessibleChildSList_const_iterator( } if ( !aCurr.IsValid() ) { - ::rtl::Reference < SwAccessibleContext > xAccImpl = + ::vos::ORef < SwAccessibleContext > xAccImpl = rAccMap.GetContextImpl( &rFrm, sal_False ); - if( xAccImpl.is() ) + if( xAccImpl.isValid() ) { - SwAccessibleContext* pAccImpl = xAccImpl.get(); + SwAccessibleContext* pAccImpl = xAccImpl.getBodyPtr(); aCurr = SwAccessibleChild( pAccImpl->GetAdditionalAccessibleChild( 0 ) ); ++nNextObj; } diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index 3c9a7d6794..7edf72ece9 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -560,6 +560,7 @@ typedef ::std::map< uno::WeakReference < XAccessible >, class SwAccessibleSelectedParas_Impl: public _SwAccessibleSelectedParas_Impl {}; + // helper class that stores preview data class SwAccPreviewData { @@ -574,6 +575,10 @@ class SwAccPreviewData /** 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. @@ -594,12 +599,16 @@ 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; @@ -610,6 +619,7 @@ public: * 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; @@ -627,6 +637,8 @@ 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, @@ -676,10 +688,12 @@ void SwAccPreviewData::Update( const SwAccessibleMap& rAccMap, } } +// 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; - OSL_ENSURE( mpSelPage, "selected page not found" ); + ASSERT( mpSelPage, "selected page not found" ); } struct ContainsPredicate @@ -726,7 +740,12 @@ void SwAccPreviewData::DisposePage(const SwPageFrm *pPageFrm ) mpSelPage = 0; } -// adjust logic page retangle to its visible part +/** adjust logic page retangle to its visible part + + OD 17.01.2003 #103492# + + @author OD +*/ void SwAccPreviewData::AdjustLogicPgRectToVisibleArea( SwRect& _iorLogicPgSwRect, const SwRect& _rPrevwPgSwRect, @@ -1639,6 +1658,8 @@ void SwAccessibleMap::Dispose( const SwFrm *pFrm, if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) ) { + if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) ) + { ::rtl::Reference< SwAccessibleContext > xAccImpl; ::rtl::Reference< SwAccessibleContext > xParentAccImpl; ::rtl::Reference< ::accessibility::AccessibleShape > xShapeAccImpl; @@ -2205,6 +2226,7 @@ sal_Int32 SwAccessibleMap::GetChildIndex( const SwFrm& rParentFrm, return nIndex; } + void SwAccessibleMap::UpdatePreview( const std::vector<PrevwPage*>& _rPrevwPages, const Fraction& _rScale, const SwPageFrm* _pSelectedPageFrm, diff --git a/sw/source/core/access/makefile.mk b/sw/source/core/access/makefile.mk deleted file mode 100644 index 72871314f7..0000000000 --- a/sw/source/core/access/makefile.mk +++ /dev/null @@ -1,100 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=access - -# --- Settings ----------------------------------------------------- -#ENABLE_EXCEPTIONS=TRUE - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/acccell.obj \ - $(SLO)$/acccontext.obj \ - $(SLO)$/accdoc.obj \ - $(SLO)$/accembedded.obj \ - $(SLO)$/accfootnote.obj \ - $(SLO)$/accframe.obj \ - $(SLO)$/accframebase.obj \ - $(SLO)$/accfrmobj.obj \ - $(SLO)$/accfrmobjmap.obj \ - $(SLO)$/accfrmobjslist.obj \ - $(SLO)$/accgraphic.obj \ - $(SLO)$/accheaderfooter.obj \ - $(SLO)$/acchyperlink.obj \ - $(SLO)$/acchypertextdata.obj \ - $(SLO)$/accmap.obj \ - $(SLO)$/accnotextframe.obj \ - $(SLO)$/accpage.obj \ - $(SLO)$/accpara.obj \ - $(SLO)$/accportions.obj \ - $(SLO)$/accpreview.obj \ - $(SLO)$/accselectionhelper.obj \ - $(SLO)$/acctable.obj \ - $(SLO)$/acctextframe.obj \ - $(SLO)$/textmarkuphelper.obj \ - $(SLO)$/parachangetrackinginfo.obj - -EXCEPTIONSFILES= \ - $(SLO)$/acccell.obj \ - $(SLO)$/acccontext.obj \ - $(SLO)$/accdoc.obj \ - $(SLO)$/accembedded.obj \ - $(SLO)$/accfootnote.obj \ - $(SLO)$/accframe.obj \ - $(SLO)$/accframebase.obj \ - $(SLO)$/accfrmobj.obj \ - $(SLO)$/accfrmobjmap.obj \ - $(SLO)$/accfrmobjslist.obj \ - $(SLO)$/accgraphic.obj \ - $(SLO)$/accheaderfooter.obj \ - $(SLO)$/acchyperlink.obj \ - $(SLO)$/acchypertextdata.obj \ - $(SLO)$/accmap.obj \ - $(SLO)$/accnotextframe.obj \ - $(SLO)$/accpage.obj \ - $(SLO)$/accpara.obj \ - $(SLO)$/accportions.obj \ - $(SLO)$/accpreview.obj \ - $(SLO)$/accselectionhelper.obj \ - $(SLO)$/acctable.obj \ - $(SLO)$/acctextframe.obj \ - $(SLO)$/textmarkuphelper.obj \ - $(SLO)$/parachangetrackinginfo.obj - -# --- Targets ------------------------------------------------------- - - -.INCLUDE : target.mk - diff --git a/sw/source/core/attr/makefile.mk b/sw/source/core/attr/makefile.mk deleted file mode 100644 index baf327dcac..0000000000 --- a/sw/source/core/attr/makefile.mk +++ /dev/null @@ -1,58 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=attr - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES = \ - $(SLO)$/cellatr.obj \ - $(SLO)$/format.obj \ - $(SLO)$/hints.obj \ - $(SLO)$/swatrset.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - $(SLO)$/calbck.obj \ - $(SLO)$/fmtfollowtextflow.obj \ - $(SLO)$/fmtwrapinfluenceonobjpos.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx index 00bd9630d5..ff25ce09a8 100644 --- a/sw/source/core/bastyp/calc.cxx +++ b/sw/source/core/bastyp/calc.cxx @@ -1570,14 +1570,15 @@ bool SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos, } bool SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos, - double& rVal, SwDoc* const pDoc ) + double& rVal, SwDoc* const pDoc ) { const SvtSysLocale aSysLocale; ::std::auto_ptr<const LocaleDataWrapper> pLclD; if( pDoc ) { LanguageType eLang = GetDocAppScriptLang( *pDoc ); - if( eLang != SvxLocaleToLanguage( aSysLocale.GetLocaleData().getLocale() ) ) + if (eLang != + SvxLocaleToLanguage(aSysLocale.GetLocaleData().getLocale())) { pLclD.reset( new LocaleDataWrapper( ::comphelper::getProcessServiceFactory(), diff --git a/sw/source/core/bastyp/makefile.mk b/sw/source/core/bastyp/makefile.mk deleted file mode 100644 index 513e34ba76..0000000000 --- a/sw/source/core/bastyp/makefile.mk +++ /dev/null @@ -1,79 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=bastyp - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -CXXFILES = \ - bparr.cxx \ - breakit.cxx \ - calc.cxx \ - checkit.cxx \ - index.cxx \ - init.cxx \ - ring.cxx \ - swcache.cxx \ - swrect.cxx \ - swregion.cxx \ - swtypes.cxx \ - tabcol.cxx \ - SwSmartTagMgr.cxx - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - $(SLO)$/bparr.obj \ - $(SLO)$/checkit.obj \ - $(SLO)$/index.obj \ - $(SLO)$/ring.obj \ - $(SLO)$/swcache.obj \ - $(SLO)$/swrect.obj \ - $(SLO)$/swregion.obj - -EXCEPTIONSFILES = \ - $(SLO)$/SwSmartTagMgr.obj \ - $(SLO)$/breakit.obj \ - $(SLO)$/calc.obj \ - $(SLO)$/init.obj \ - $(SLO)$/swtypes.obj \ - $(SLO)$/tabcol.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index c032664b0f..6a03978365 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -144,6 +144,17 @@ namespace sw { namespace mark return buf.makeStringAndClear( ); } + rtl::OUString MarkBase::ToString( ) const + { + rtl::OUStringBuffer buf; + buf.appendAscii( "Mark: ( Name, [ Node1, Index1 ] ): ( " ); + buf.append( m_aName ).appendAscii( ", [ " ); + buf.append( sal_Int32( GetMarkPos().nNode.GetIndex( ) ) ).appendAscii( ", " ); + buf.append( sal_Int32( GetMarkPos().nContent.GetIndex( ) ) ).appendAscii( " ] )" ); + + return buf.makeStringAndClear( ); + } + MarkBase::~MarkBase() { } diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index e610ed5042..0b4223680d 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -479,10 +479,10 @@ BOOL SwCrsrShell::GotoNxtPrvTblFormula( BOOL bNext, BOOL bOnlyErrors ) { const SfxPoolItem* pItem; const SwTableBox* pTBox; - USHORT n, nMaxItems = GetDoc()->GetAttrPool().GetItemCount( RES_BOXATR_FORMULA ); + sal_uInt32 n, nMaxItems = GetDoc()->GetAttrPool().GetItemCount2( RES_BOXATR_FORMULA ); for( n = 0; n < nMaxItems; ++n ) - if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem( + if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem2( RES_BOXATR_FORMULA, n ) ) && 0 != (pTBox = ((SwTblBoxFormula*)pItem)->GetTableBox() ) && pTBox->GetSttNd() && @@ -551,10 +551,10 @@ BOOL SwCrsrShell::GotoNxtPrvTOXMark( BOOL bNext ) const SwCntntFrm* pCFrm; const SwTxtNode* pTxtNd; const SwTxtTOXMark* pTxtTOX; - USHORT n, nMaxItems = GetDoc()->GetAttrPool().GetItemCount( RES_TXTATR_TOXMARK ); + sal_uInt32 n, nMaxItems = GetDoc()->GetAttrPool().GetItemCount2( RES_TXTATR_TOXMARK ); for( n = 0; n < nMaxItems; ++n ) - if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem( + if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem2( RES_TXTATR_TOXMARK, n ) ) && 0 != (pTxtTOX = ((SwTOXMark*)pItem)->GetTxtTOXMark() ) && ( pTxtNd = &pTxtTOX->GetTxtNode())->GetNodes().IsDocNodes() && diff --git a/sw/source/core/crsr/makefile.mk b/sw/source/core/crsr/makefile.mk deleted file mode 100644 index c5c59b8ba1..0000000000 --- a/sw/source/core/crsr/makefile.mk +++ /dev/null @@ -1,80 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=crsr - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(mydebug)" != "" -CDEFS+=-Dmydebug -.ENDIF - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES= \ - $(SLO)$/BlockCursor.obj \ - $(SLO)$/bookmrk.obj \ - $(SLO)$/callnk.obj \ - $(SLO)$/crbm.obj \ - $(SLO)$/crossrefbookmark.obj \ - $(SLO)$/crsrsh.obj \ - $(SLO)$/crstrvl.obj \ - $(SLO)$/crstrvl1.obj \ - $(SLO)$/findattr.obj \ - $(SLO)$/findcoll.obj \ - $(SLO)$/findfmt.obj \ - $(SLO)$/findtxt.obj \ - $(SLO)$/pam.obj \ - $(SLO)$/paminit.obj \ - $(SLO)$/swcrsr.obj \ - $(SLO)$/trvlcol.obj \ - $(SLO)$/trvlfnfl.obj \ - $(SLO)$/trvlreg.obj \ - $(SLO)$/trvltbl.obj \ - $(SLO)$/unocrsr.obj \ - $(SLO)$/viscrs.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) - -.IF "$(mydebug)" != "" -SLOFILES += \ - $(SLO)$/pamio.obj -.ENDIF - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index 5349974201..47c06bfd92 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -1236,6 +1236,20 @@ void SwPaM::InvalidatePaM() } } +void SwPaM::InvalidatePaM() +{ + const SwNode *_pNd=this->GetNode(); + const SwTxtNode *_pTxtNd=(_pNd!=NULL?_pNd->GetTxtNode():NULL); + if (_pTxtNd!=NULL) + { + // pretent that the PaM marks inserted text to recalc the portion... + SwInsTxt aHint( Start()->nContent.GetIndex(), + End()->nContent.GetIndex() - Start()->nContent.GetIndex() + 1 ); + SwModify *_pModify=(SwModify*)_pTxtNd; + _pModify->Modify( 0, &aHint); + } +} + BOOL SwPaM::LessThan(const SwPaM & a, const SwPaM & b) { return (*a.Start() < *b.Start()) || (*a.Start() == *b.Start() && *a.End() < *b.End()); diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 73ad556002..a845a27713 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -101,7 +101,6 @@ #include <fldupde.hxx> #include <swbaslnk.hxx> #include <printdata.hxx> -#include <swprtopt.hxx> #include <cmdid.h> // fuer den dflt - Printer in SetJob #include <statstr.hrc> // StatLine-String #include <comcore.hrc> @@ -205,6 +204,7 @@ bool SwDoc::get(/*[in]*/ DocumentSettingId id) const case PURGE_OLE: return mbPurgeOLE; case KERN_ASIAN_PUNCTUATION: return mbKernAsianPunctuation; case DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT: return mbDoNotResetParaAttrsForNumFont; + case MATH_BASELINE_ALIGNMENT: return mbMathBaselineAlignment; default: OSL_ENSURE(false, "Invalid setting id"); } @@ -358,7 +358,9 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value) case DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT: mbDoNotResetParaAttrsForNumFont = value; break; - + case MATH_BASELINE_ALIGNMENT: + mbMathBaselineAlignment = value; + break; default: OSL_ENSURE(false, "Invalid setting id"); } @@ -1192,7 +1194,7 @@ static void lcl_FormatPostIt( pIDCO->SplitNode( *aPam.GetPoint(), false ); aStr = pField->GetPar2(); -#if defined( WIN ) || defined( WNT ) || defined( PM2 ) +#if defined( WNT ) || defined( PM2 ) // Bei Windows und Co alle CR rausschmeissen aStr.EraseAllChars( '\r' ); #endif @@ -1215,6 +1217,23 @@ static sal_Int32 lcl_GetPaperBin( const SwPageFrm *pStartFrm ) return nRes; } +// provide the paper tray to use according to the page style in use, +// but do that only if the respective item is NOT just the default item +static sal_Int32 lcl_GetPaperBin( const SwPageFrm *pStartFrm ) +{ + sal_Int32 nRes = -1; + + const SwFrmFmt &rFmt = pStartFrm->GetPageDesc()->GetMaster(); + const SfxPoolItem *pItem = NULL; + SfxItemState eState = rFmt.GetItemState( RES_PAPER_BIN, FALSE, &pItem ); + const SvxPaperBinItem *pPaperBinItem = dynamic_cast< const SvxPaperBinItem * >(pItem); + if (eState > SFX_ITEM_DEFAULT && pPaperBinItem) + nRes = pPaperBinItem->GetValue(); + + return nRes; +} + + void SwDoc::CalculatePagesForPrinting( /* out */ SwRenderData &rData, const SwPrintUIOptions &rOptions, @@ -1839,10 +1858,10 @@ void SwDoc::DocInfoChgd( ) const SwFmtRefMark* SwDoc::GetRefMark( const String& rName ) const { const SfxPoolItem* pItem; - USHORT nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_REFMARK ); - for( USHORT n = 0; n < nMaxItems; ++n ) + sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_REFMARK ); + for( sal_uInt32 n = 0; n < nMaxItems; ++n ) { - if( 0 == (pItem = GetAttrPool().GetItem( RES_TXTATR_REFMARK, n ) )) + if( 0 == (pItem = GetAttrPool().GetItem2( RES_TXTATR_REFMARK, n ) )) continue; const SwFmtRefMark* pFmtRef = (SwFmtRefMark*)pItem; @@ -1861,10 +1880,10 @@ const SwFmtRefMark* SwDoc::GetRefMark( USHORT nIndex ) const const SwTxtRefMark* pTxtRef; const SwFmtRefMark* pRet = 0; - USHORT nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_REFMARK ); - USHORT nCount = 0; - for( USHORT n = 0; n < nMaxItems; ++n ) - if( 0 != (pItem = GetAttrPool().GetItem( RES_TXTATR_REFMARK, n )) && + sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_REFMARK ); + sal_uInt32 nCount = 0; + for( sal_uInt32 n = 0; n < nMaxItems; ++n ) + if( 0 != (pItem = GetAttrPool().GetItem2( RES_TXTATR_REFMARK, n )) && 0 != (pTxtRef = ((SwFmtRefMark*)pItem)->GetTxtRefMark()) && &pTxtRef->GetTxtNode().GetNodes() == &GetNodes() ) { @@ -1887,10 +1906,10 @@ USHORT SwDoc::GetRefMarks( SvStringsDtor* pNames ) const const SfxPoolItem* pItem; const SwTxtRefMark* pTxtRef; - USHORT nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_REFMARK ); - USHORT nCount = 0; - for( USHORT n = 0; n < nMaxItems; ++n ) - if( 0 != (pItem = GetAttrPool().GetItem( RES_TXTATR_REFMARK, n )) && + sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_REFMARK ); + sal_uInt32 nCount = 0; + for( sal_uInt32 n = 0; n < nMaxItems; ++n ) + if( 0 != (pItem = GetAttrPool().GetItem2( RES_TXTATR_REFMARK, n )) && 0 != (pTxtRef = ((SwFmtRefMark*)pItem)->GetTxtRefMark()) && &pTxtRef->GetTxtNode().GetNodes() == &GetNodes() ) { @@ -2128,9 +2147,9 @@ const SwFmtINetFmt* SwDoc::FindINetAttr( const String& rName ) const const SwFmtINetFmt* pItem; const SwTxtINetFmt* pTxtAttr; const SwTxtNode* pTxtNd; - USHORT n, nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_INETFMT ); + sal_uInt32 n, nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT ); for( n = 0; n < nMaxItems; ++n ) - if( 0 != (pItem = (SwFmtINetFmt*)GetAttrPool().GetItem( + if( 0 != (pItem = (SwFmtINetFmt*)GetAttrPool().GetItem2( RES_TXTATR_INETFMT, n ) ) && pItem->GetName().Equals( rName ) && 0 != ( pTxtAttr = pItem->GetTxtINetFmt()) && @@ -2388,6 +2407,54 @@ BOOL SwDoc::RemoveInvisibleContent() EndUndo( UNDO_UI_DELETE_INVISIBLECNTNT, NULL ); return bRet; } +/*-- 25.08.2010 14:18:12--------------------------------------------------- + + -----------------------------------------------------------------------*/ +BOOL SwDoc::HasInvisibleContent() const +{ + BOOL bRet = sal_False; + + SwClientIter aIter( *GetSysFldType( RES_HIDDENPARAFLD ) ); + if( aIter.First( TYPE( SwFmtFld ) ) ) + bRet = sal_True; + + // + // Search for any hidden paragraph (hidden text attribute) + // + if( ! bRet ) + { + for( ULONG n = GetNodes().Count(); !bRet && (n > 0); ) + { + SwTxtNode* pTxtNd = GetNodes()[ --n ]->GetTxtNode(); + if ( pTxtNd ) + { + SwPaM aPam( *pTxtNd, 0, *pTxtNd, pTxtNd->GetTxt().Len() ); + if( pTxtNd->HasHiddenCharAttribute( true ) || ( pTxtNd->HasHiddenCharAttribute( false ) ) ) + { + bRet = sal_True; + } + } + } + } + + if( ! bRet ) + { + const SwSectionFmts& rSectFmts = GetSections(); + USHORT n; + + for( n = rSectFmts.Count(); !bRet && (n > 0); ) + { + SwSectionFmt* pSectFmt = rSectFmts[ --n ]; + // don't add sections in Undo/Redo + if( !pSectFmt->IsInNodesArr()) + continue; + SwSection* pSect = pSectFmt->GetSection(); + if( pSect->IsHidden() ) + bRet = sal_True; + } + } + return bRet; +} BOOL SwDoc::ConvertFieldsToText() { @@ -2441,7 +2508,7 @@ BOOL SwDoc::ConvertFieldsToText() nWhich != RES_REFPAGEGETFLD&& nWhich != RES_REFPAGESETFLD)) { - String sText = pField->GetCntnt(); + String sText = pField->ExpandField(true); //database fields should not convert their command into text if( RES_DBFLD == pCurType->Which() && !static_cast<const SwDBField*>(pField)->IsInitialized()) sText.Erase(); @@ -2500,26 +2567,17 @@ bool SwDoc::LinksUpdated() const } // embedded alle lokalen Links (Bereiche/Grafiken) -bool SwDoc::EmbedAllLinks() +::sfx2::SvBaseLink* lcl_FindNextRemovableLink( const ::sfx2::SvBaseLinks& rLinks, sfx2::LinkManager& rLnkMgr ) { - BOOL bRet = FALSE; - sfx2::LinkManager& rLnkMgr = GetLinkManager(); - const ::sfx2::SvBaseLinks& rLnks = rLnkMgr.GetLinks(); - if( rLnks.Count() ) + for( USHORT n = 0; n < rLinks.Count(); ++n ) { - BOOL bDoesUndo = DoesUndo(); - DoUndo( FALSE ); - - for( USHORT n = 0; n < rLnks.Count(); ++n ) + ::sfx2::SvBaseLink* pLnk = &(*rLinks[ n ]); + if( pLnk && + ( OBJECT_CLIENT_GRF == pLnk->GetObjType() || + OBJECT_CLIENT_FILE == pLnk->GetObjType() ) && + pLnk->ISA( SwBaseLink ) ) { - ::sfx2::SvBaseLink* pLnk = &(*rLnks[ n ]); - if( pLnk && - ( OBJECT_CLIENT_GRF == pLnk->GetObjType() || - OBJECT_CLIENT_FILE == pLnk->GetObjType() ) && - pLnk->ISA( SwBaseLink ) ) - { ::sfx2::SvBaseLinkRef xLink = pLnk; - USHORT nCount = rLnks.Count(); String sFName; rLnkMgr.GetDisplayNames( xLink, 0, &sFName, 0, 0 ); @@ -2527,20 +2585,33 @@ bool SwDoc::EmbedAllLinks() INetURLObject aURL( sFName ); if( INET_PROT_FILE == aURL.GetProtocol() || INET_PROT_CID == aURL.GetProtocol() ) - { - // dem Link sagen, das er aufgeloest wird! - xLink->Closed(); + return pLnk; + } + } + return 0; +} +bool SwDoc::EmbedAllLinks() +{ + BOOL bRet = FALSE; + sfx2::LinkManager& rLnkMgr = GetLinkManager(); + const ::sfx2::SvBaseLinks& rLinks = rLnkMgr.GetLinks(); + if( rLinks.Count() ) + { + BOOL bDoesUndo = DoesUndo(); + DoUndo( FALSE ); - // falls einer vergessen hat sich auszutragen - if( xLink.Is() ) - rLnkMgr.Remove( xLink ); + ::sfx2::SvBaseLink* pLnk = 0; + while( 0 != (pLnk = lcl_FindNextRemovableLink( rLinks, rLnkMgr ) ) ) + { + ::sfx2::SvBaseLinkRef xLink = pLnk; + // dem Link sagen, das er aufgeloest wird! + xLink->Closed(); - if( nCount != rLnks.Count() + 1 ) - n = 0; // wieder von vorne anfangen, es wurden - // mehrere Links entfernt - bRet = TRUE; - } - } + // falls einer vergessen hat sich auszutragen + if( xLink.Is() ) + rLnkMgr.Remove( xLink ); + + bRet = TRUE; } DelAllUndoObj(); @@ -2712,6 +2783,27 @@ void SwDoc::ChkCondColls() } } +#ifdef FUTURE_VBA +uno::Reference< script::vba::XVBAEventProcessor > +SwDoc::GetVbaEventProcessor() +{ + if( !mxVbaEvents.is() && pDocShell && ooo::vba::isAlienWordDoc( *pDocShell ) ) + { + try + { + uno::Reference< frame::XModel > xModel( pDocShell->GetModel(), uno::UNO_SET_THROW ); + uno::Sequence< uno::Any > aArgs(1); + aArgs[0] <<= xModel; + mxVbaEvents.set( ooo::vba::createVBAUnoAPIServiceWithArgs( pDocShell, "com.sun.star.script.vba.VBATextEventProcessor" , aArgs ), uno::UNO_QUERY_THROW ); + } + catch( uno::Exception& ) + { + } + } + return mxVbaEvents; +} +#endif + uno::Reference< script::vba::XVBAEventProcessor > SwDoc::GetVbaEventProcessor() { diff --git a/sw/source/core/doc/docbasic.cxx b/sw/source/core/doc/docbasic.cxx index 1f3346ac84..d859705c67 100644 --- a/sw/source/core/doc/docbasic.cxx +++ b/sw/source/core/doc/docbasic.cxx @@ -158,9 +158,9 @@ USHORT SwDoc::CallEvent( USHORT nEvent, const SwCallMouseEvent& rCallEvent, if( bCheckPtr ) { const SfxPoolItem* pItem; - USHORT n, nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_INETFMT ); + sal_uInt32 n, nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT ); for( n = 0; n < nMaxItems; ++n ) - if( 0 != (pItem = GetAttrPool().GetItem( RES_TXTATR_INETFMT, n ) ) + if( 0 != (pItem = GetAttrPool().GetItem2( RES_TXTATR_INETFMT, n ) ) && rCallEvent.PTR.pINetAttr == pItem ) { bCheckPtr = FALSE; // als Flag missbrauchen diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx index 67f83f0f42..795c2b6f3b 100644 --- a/sw/source/core/doc/doccorr.cxx +++ b/sw/source/core/doc/doccorr.cxx @@ -74,9 +74,9 @@ namespace { - // find the relevant section in which the SwUnoCrsr may wander. returns NULL if - // no restrictions apply - const SwStartNode* lcl_FindUnoCrsrSection( const SwNode& rNode ) + // find the relevant section in which the SwUnoCrsr may wander. + // returns NULL if no restrictions apply + static const SwStartNode* lcl_FindUnoCrsrSection( const SwNode& rNode ) { const SwStartNode* pStartNode = rNode.StartOfSectionNode(); while( ( pStartNode != NULL ) && @@ -87,45 +87,28 @@ namespace return pStartNode; } - static inline void lcl_PaMCorrAbs1(SwPaM * pPam, - SwNode const * const pOldNode, - const SwPosition& rNewPos, - const xub_StrLen nOffset) - { - for(int nb = 0; nb < 2; ++nb) - if(&((pPam)->GetBound(BOOL(nb)).nNode.GetNode()) == pOldNode) - { - (pPam)->GetBound(BOOL(nb)) = rNewPos; - (pPam)->GetBound(BOOL(nb)).nContent += nOffset; - } - }; - - static inline bool lcl_PaMCorrAbs2(SwPaM* pPam, - const SwPosition& rNewPos, - ULONG nSttNode, - ULONG nEndNode) + static inline bool lcl_PosCorrAbs(SwPosition & rPos, + const SwPosition& rStart, + const SwPosition& rEnd, + const SwPosition& rNewPos) { - bool bRet = false; - - for(int nb = 0; nb < 2; ++nb) - if((pPam)->GetBound(BOOL(nb)).nNode >= nSttNode && - (pPam)->GetBound(BOOL(nb)).nNode <= nEndNode) - { - (pPam)->GetBound(BOOL(nb)) = rNewPos; - bRet = true; - } - return bRet; + if ((rStart <= rPos) && (rPos <= rEnd)) + { + rPos = rNewPos; + return true; + } + return false; }; - static inline void lcl_PaMCorrAbs3(SwPaM * pPam, + static inline bool lcl_PaMCorrAbs(SwPaM & rPam, const SwPosition& rStart, const SwPosition& rEnd, const SwPosition& rNewPos) { - for(int nb = 0; nb < 2; ++nb) - if(rStart <= (pPam)->GetBound(BOOL(nb)) && - (pPam)->GetBound(BOOL(nb)) <= rEnd ) - (pPam)->GetBound(BOOL(nb)) = rNewPos; + bool bRet = false; + bRet |= lcl_PosCorrAbs(rPam.GetBound(true ), rStart, rEnd, rNewPos); + bRet |= lcl_PosCorrAbs(rPam.GetBound(false), rStart, rEnd, rNewPos); + return bRet; }; static inline void lcl_PaMCorrRel1(SwPaM * pPam, @@ -144,119 +127,69 @@ namespace } } -void PaMCorrAbs( const SwNodeIndex &rOldNode, - const SwPosition &rNewPos, - const xub_StrLen nOffset) -{ - const SwNode* pOldNode = &rOldNode.GetNode(); - const SwPosition aNewPos( rNewPos ); - const SwDoc* pDoc = pOldNode->GetDoc(); - SwCrsrShell* pShell = pDoc->GetEditShell(); - - if( pShell ) - { - FOREACHSHELL_START( pShell ) - SwPaM *_pStkCrsr = PCURSH->GetStkCrsr(); - if( _pStkCrsr ) - do { - lcl_PaMCorrAbs1( _pStkCrsr, pOldNode, aNewPos, nOffset ); - } while ( (_pStkCrsr != 0 ) && - ((_pStkCrsr=(SwPaM *)_pStkCrsr->GetNext()) != PCURSH->GetStkCrsr()) ); - - FOREACHPAM_START( PCURSH->_GetCrsr() ) - lcl_PaMCorrAbs1( PCURCRSR, pOldNode, aNewPos, nOffset ); - FOREACHPAM_END() - - if( PCURSH->IsTableMode() ) - lcl_PaMCorrAbs1( PCURSH->GetTblCrs(), pOldNode, aNewPos, nOffset ); - - FOREACHSHELL_END( pShell ) - } - - { - SwUnoCrsrTbl& rTbl = (SwUnoCrsrTbl&)pDoc->GetUnoCrsrTbl(); - for( USHORT n = 0; n < rTbl.Count(); ++n ) - { - FOREACHPAM_START( rTbl[ n ] ) - lcl_PaMCorrAbs1( PCURCRSR, pOldNode, aNewPos, nOffset ); - FOREACHPAM_END() - SwUnoTableCrsr* pUnoTblCrsr = - dynamic_cast<SwUnoTableCrsr*>(rTbl[ n ]); - if( pUnoTblCrsr ) - { - FOREACHPAM_START( &pUnoTblCrsr->GetSelRing() ) - lcl_PaMCorrAbs1( PCURCRSR, pOldNode, aNewPos, nOffset ); - FOREACHPAM_END() - } - } - } -} - - -void PaMCorrAbs( const SwNodeIndex &rStartNode, - const SwNodeIndex &rEndNode, - const SwPosition &rNewPos ) +void PaMCorrAbs( const SwPaM& rRange, + const SwPosition& rNewPos ) { - const ULONG nSttNode = rStartNode.GetIndex(); - const ULONG nEndNode = rEndNode.GetIndex(); - const SwPosition aNewPos( rNewPos ); - SwDoc* pDoc = rStartNode.GetNode().GetDoc(); + SwPosition const aStart( *rRange.Start() ); + SwPosition const aEnd( *rRange.End() ); + SwPosition const aNewPos( rNewPos ); + SwDoc *const pDoc = aStart.nNode.GetNode().GetDoc(); + SwCrsrShell *const pShell = pDoc->GetEditShell(); - SwCrsrShell* pShell = pDoc->GetEditShell(); if( pShell ) { FOREACHSHELL_START( pShell ) SwPaM *_pStkCrsr = PCURSH->GetStkCrsr(); if( _pStkCrsr ) do { - lcl_PaMCorrAbs2( _pStkCrsr, aNewPos, nSttNode, nEndNode ); + lcl_PaMCorrAbs( *_pStkCrsr, aStart, aEnd, aNewPos ); } while ( (_pStkCrsr != 0 ) && ((_pStkCrsr=(SwPaM *)_pStkCrsr->GetNext()) != PCURSH->GetStkCrsr()) ); FOREACHPAM_START( PCURSH->_GetCrsr() ) - lcl_PaMCorrAbs2( PCURCRSR, aNewPos, nSttNode, nEndNode ); + lcl_PaMCorrAbs( *PCURCRSR, aStart, aEnd, aNewPos ); FOREACHPAM_END() if( PCURSH->IsTableMode() ) - lcl_PaMCorrAbs2( PCURSH->GetTblCrs(), aNewPos, nSttNode, nEndNode ); + lcl_PaMCorrAbs( *PCURSH->GetTblCrs(), aStart, aEnd, aNewPos ); FOREACHSHELL_END( pShell ) } - { - SwUnoCrsrTbl& rTbl = (SwUnoCrsrTbl&)pDoc->GetUnoCrsrTbl(); + SwUnoCrsrTbl& rTbl = const_cast<SwUnoCrsrTbl&>(pDoc->GetUnoCrsrTbl()); + for( USHORT n = 0; n < rTbl.Count(); ++n ) { - bool bChange = false; + SwUnoCrsr *const pUnoCursor = rTbl[ n ]; - SwUnoCrsr* pUnoCursor = rTbl[ n ]; + bool bChange = false; // has the UNO cursor been corrected? // determine whether the UNO cursor will leave it's designated // section - bool bLeaveSection = + bool const bLeaveSection = pUnoCursor->IsRemainInSection() && ( lcl_FindUnoCrsrSection( aNewPos.nNode.GetNode() ) != lcl_FindUnoCrsrSection( pUnoCursor->GetPoint()->nNode.GetNode() ) ); FOREACHPAM_START( pUnoCursor ) - bChange |= lcl_PaMCorrAbs2(PCURCRSR, aNewPos, nSttNode, nEndNode); + bChange |= lcl_PaMCorrAbs( *PCURCRSR, aStart, aEnd, aNewPos ); FOREACHPAM_END() - SwUnoTableCrsr* pUnoTblCrsr = - dynamic_cast<SwUnoTableCrsr*>(pUnoCursor); + SwUnoTableCrsr *const pUnoTblCrsr = + dynamic_cast<SwUnoTableCrsr *>(rTbl[ n ]); if( pUnoTblCrsr ) { FOREACHPAM_START( &pUnoTblCrsr->GetSelRing() ) bChange |= - lcl_PaMCorrAbs2( PCURCRSR, aNewPos, nSttNode, nEndNode ); + lcl_PaMCorrAbs( *PCURCRSR, aStart, aEnd, aNewPos ); FOREACHPAM_END() } // if a UNO cursor leaves its designated section, we must inform // (and invalidate) said cursor - if( bChange && bLeaveSection ) + if (bChange && bLeaveSection) { // the UNO cursor has left its section. We need to notify it! SwMsgPoolItem aHint( RES_UNOCURSOR_LEAVES_SECTION ); @@ -266,72 +199,31 @@ void PaMCorrAbs( const SwNodeIndex &rStartNode, } } - -void PaMCorrAbs( const SwPaM& rRange, - const SwPosition& rNewPos ) -{ - SwPosition aStart( *rRange.Start() ); - SwPosition aEnd( *rRange.End() ); - SwPosition aNewPos( rNewPos ); - SwDoc* pDoc = aStart.nNode.GetNode().GetDoc(); - SwCrsrShell* pShell = pDoc->GetEditShell(); - - if( pShell ) - { - FOREACHSHELL_START( pShell ) - SwPaM *_pStkCrsr = PCURSH->GetStkCrsr(); - if( _pStkCrsr ) - do { - lcl_PaMCorrAbs3( _pStkCrsr, aStart, aEnd, aNewPos ); - } while ( (_pStkCrsr != 0 ) && - ((_pStkCrsr=(SwPaM *)_pStkCrsr->GetNext()) != PCURSH->GetStkCrsr()) ); - - FOREACHPAM_START( PCURSH->_GetCrsr() ) - lcl_PaMCorrAbs3( PCURCRSR, aStart, aEnd, aNewPos ); - FOREACHPAM_END() - - if( PCURSH->IsTableMode() ) - lcl_PaMCorrAbs3( PCURSH->GetTblCrs(), aStart, aEnd, aNewPos ); - - FOREACHSHELL_END( pShell ) - } - { - SwUnoCrsrTbl& rTbl = (SwUnoCrsrTbl&)pDoc->GetUnoCrsrTbl(); - for( USHORT n = 0; n < rTbl.Count(); ++n ) - { - FOREACHPAM_START( rTbl[ n ] ) - lcl_PaMCorrAbs3( PCURCRSR, aStart, aEnd, aNewPos ); - FOREACHPAM_END() - - SwUnoTableCrsr* pUnoTblCrsr = - dynamic_cast<SwUnoTableCrsr*>(rTbl[ n ]); - if( pUnoTblCrsr ) - { - FOREACHPAM_START( &pUnoTblCrsr->GetSelRing() ) - lcl_PaMCorrAbs3( PCURCRSR, aStart, aEnd, aNewPos ); - FOREACHPAM_END() - } - } - } -} - void SwDoc::CorrAbs(const SwNodeIndex& rOldNode, const SwPosition& rNewPos, const xub_StrLen nOffset, BOOL bMoveCrsr) { + SwCntntNode *const pCntntNode( rOldNode.GetNode().GetCntntNode() ); + SwPaM const aPam(rOldNode, 0, + rOldNode, (pCntntNode) ? pCntntNode->Len() : 0); + SwPosition aNewPos(rNewPos); + aNewPos.nContent += nOffset; + getIDocumentMarkAccess()->correctMarksAbsolute(rOldNode, rNewPos, nOffset); - { // fix readlines + { // fix redlines SwRedlineTbl& rTbl = *pRedlineTbl; for( USHORT n = 0; n < rTbl.Count(); ++n ) { // is on position ?? - lcl_PaMCorrAbs1( rTbl[ n ], &rOldNode.GetNode(), SwPosition(rNewPos), nOffset ); + lcl_PaMCorrAbs(*rTbl[ n ], *aPam.Start(), *aPam.End(), aNewPos); } } if(bMoveCrsr) - ::PaMCorrAbs(rOldNode, rNewPos, nOffset); + { + ::PaMCorrAbs(aPam, aNewPos); + } } void SwDoc::CorrAbs(const SwPaM& rRange, @@ -353,12 +245,15 @@ void SwDoc::CorrAbs(const SwNodeIndex& rStartNode, const SwPosition& rNewPos, BOOL bMoveCrsr) { - SwPosition aNewPos(rNewPos); - _DelBookmarks(rStartNode, rEndNode); if(bMoveCrsr) - ::PaMCorrAbs(rStartNode, rEndNode, rNewPos); + { + SwCntntNode *const pCntntNode( rEndNode.GetNode().GetCntntNode() ); + SwPaM const aPam(rStartNode, 0, + rEndNode, (pCntntNode) ? pCntntNode->Len() : 0); + ::PaMCorrAbs(aPam, rNewPos); + } } diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 737c9019f1..1a73febed1 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -2627,6 +2627,7 @@ bool SwDoc::DelFullPara( SwPaM& rPam ) return sal_True; } + void SwDoc::TransliterateText( const SwPaM& rPaM, utl::TransliterationWrapper& rTrans ) @@ -2702,6 +2703,7 @@ void SwDoc::TransliterateText( SetModified(); } + #define MAX_REDLINE_COUNT 250 void SwDoc::checkRedlining(RedlineMode_t& _rReadlineMode) diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index 51d1b3ab36..2182bf6d0e 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -426,9 +426,8 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt ) "Was ist das fuer ein MessageItem?" ); SwFieldType* pFldType(0); - USHORT i; - for( i = 0; i < pFldTypes->Count(); ++i ) + for (USHORT i = 0; i < pFldTypes->Count(); ++i) { if( RES_TABLEFLD == ( pFldType = (*pFldTypes)[i] )->Which() ) { @@ -497,13 +496,15 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt ) // und dann noch alle Tabellen Box Formeln abklappern const SfxPoolItem* pItem; - USHORT nMaxItems = GetAttrPool().GetItemCount( RES_BOXATR_FORMULA ); - for( i = 0; i < nMaxItems; ++i ) - if( 0 != (pItem = GetAttrPool().GetItem( RES_BOXATR_FORMULA, i ) ) && + sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_BOXATR_FORMULA ); + for (sal_uInt32 i = 0; i < nMaxItems; ++i) + { + if( 0 != (pItem = GetAttrPool().GetItem2( RES_BOXATR_FORMULA, i ) ) && ((SwTblBoxFormula*)pItem)->GetDefinedIn() ) { ((SwTblBoxFormula*)pItem)->ChangeState( pHt ); } + } // alle Felder/Boxen sind jetzt invalide, also kann das Rechnen anfangen @@ -598,8 +599,9 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt ) } // dann berechene noch die Formeln an den Boxen - for( i = 0; i < nMaxItems; ++i ) - if( 0 != (pItem = GetAttrPool().GetItem( RES_BOXATR_FORMULA, i ) ) && + for (sal_uInt32 i = 0; i < nMaxItems; ++i ) + { + if( 0 != (pItem = GetAttrPool().GetItem2( RES_BOXATR_FORMULA, i ) ) && ((SwTblBoxFormula*)pItem)->GetDefinedIn() && !((SwTblBoxFormula*)pItem)->IsValid() ) { @@ -675,6 +677,7 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt ) } } } + } if( pCalc ) delete pCalc; @@ -1687,7 +1690,6 @@ String lcl_DBDataToString(const SwDBData& rData) void SwDoc::GetAllUsedDB( SvStringsDtor& rDBNameList, const SvStringsDtor* pAllDBNames ) { - USHORT n; SvStringsDtor aUsedDBNames; SvStringsDtor aAllDBNames; @@ -1698,7 +1700,7 @@ void SwDoc::GetAllUsedDB( SvStringsDtor& rDBNameList, } SwSectionFmts& rArr = GetSections(); - for( n = rArr.Count(); n; ) + for (USHORT n = rArr.Count(); n; ) { SwSection* pSect = rArr[ --n ]->GetSection(); @@ -1712,10 +1714,10 @@ void SwDoc::GetAllUsedDB( SvStringsDtor& rDBNameList, } const SfxPoolItem* pItem; - USHORT nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_FIELD ); - for( n = 0; n < nMaxItems; ++n ) + sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_FIELD ); + for (sal_uInt32 n = 0; n < nMaxItems; ++n) { - if( 0 == (pItem = GetAttrPool().GetItem( RES_TXTATR_FIELD, n ) )) + if( 0 == (pItem = GetAttrPool().GetItem2( RES_TXTATR_FIELD, n ) )) continue; const SwFmtFld* pFmtFld = (SwFmtFld*)pItem; @@ -1851,10 +1853,9 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames, aNewDBData.nCommandType = (short)rNewName.GetToken(2, DB_DELIM).ToInt32(); String sFormel; - USHORT n; SwSectionFmts& rArr = GetSections(); - for( n = rArr.Count(); n; ) + for (USHORT n = rArr.Count(); n; ) { SwSection* pSect = rArr[ --n ]->GetSection(); @@ -1867,11 +1868,11 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames, } const SfxPoolItem* pItem; - USHORT nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_FIELD ); + sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_FIELD ); - for( n = 0; n < nMaxItems; ++n ) + for (sal_uInt32 n = 0; n < nMaxItems; ++n ) { - if( 0 == (pItem = GetAttrPool().GetItem( RES_TXTATR_FIELD, n ) )) + if( 0 == (pItem = GetAttrPool().GetItem2( RES_TXTATR_FIELD, n ) )) continue; SwFmtFld* pFmtFld = (SwFmtFld*)pItem; @@ -2249,9 +2250,8 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode ) SwSectionNode* pSectNd; USHORT nArrStt = 0; ULONG nSttCntnt = rDoc.GetNodes().GetEndOfExtras().GetIndex(); - USHORT n; - for( n = rArr.Count(); n; ) + for (USHORT n = rArr.Count(); n; ) { SwSection* pSect = rArr[ --n ]->GetSection(); if( pSect && pSect->IsHidden() && pSect->GetCondition().Len() && @@ -2271,13 +2271,13 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode ) // erst alle anzeigen, damit die Frames vorhanden sind. Mit deren // Position wird das BodyAnchor ermittelt. // Dafuer erst den ContentBereich, dann die Sonderbereiche!!! - for( n = nArrStt; n < aTmpArr.Count(); ++n ) + for (USHORT n = nArrStt; n < aTmpArr.Count(); ++n) { pSectNd = rDoc.GetNodes()[ aTmpArr[ n ] ]->GetSectionNode(); OSL_ENSURE( pSectNd, "Wo ist mein SectionNode" ); pSectNd->GetSection().SetCondHidden( FALSE ); } - for( n = 0; n < nArrStt; ++n ) + for (USHORT n = 0; n < nArrStt; ++n) { pSectNd = rDoc.GetNodes()[ aTmpArr[ n ] ]->GetSectionNode(); OSL_ENSURE( pSectNd, "Wo ist mein SectionNode" ); @@ -2285,8 +2285,10 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode ) } // so, erst jetzt alle sortiert in die Liste eintragen - for( n = 0; n < aTmpArr.Count(); ++n ) + for (USHORT n = 0; n < aTmpArr.Count(); ++n) + { GetBodyNode( *rDoc.GetNodes()[ aTmpArr[ n ] ]->GetSectionNode() ); + } } String sTrue( String::CreateFromAscii( @@ -2298,10 +2300,10 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode ) USHORT nWhich, n; const String* pFormel = 0; const SfxPoolItem* pItem; - USHORT nMaxItems = rDoc.GetAttrPool().GetItemCount( RES_TXTATR_FIELD ); + sal_uInt32 nMaxItems = rDoc.GetAttrPool().GetItemCount2( RES_TXTATR_FIELD ); for( n = 0; n < nMaxItems; ++n ) { - if( 0 == (pItem = rDoc.GetAttrPool().GetItem( RES_TXTATR_FIELD, n )) ) + if( 0 == (pItem = rDoc.GetAttrPool().GetItem2( RES_TXTATR_FIELD, n )) ) continue; const SwFmtFld* pFmtFld = (SwFmtFld*)pItem; diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index a65b0feb23..658d07212f 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -1318,9 +1318,9 @@ void SwDoc::SetDefault( const SfxItemSet& rSet ) nOldWidth = ((SvxTabStopItem&)aOld.Get(RES_PARATR_TABSTOP))[ 0 ].GetTabPos(); int bChg = FALSE; - USHORT nMaxItems = GetAttrPool().GetItemCount( RES_PARATR_TABSTOP ); - for( USHORT n = 0; n < nMaxItems; ++n ) - if( 0 != (pTmpItem = GetAttrPool().GetItem( RES_PARATR_TABSTOP, n ) )) + sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_PARATR_TABSTOP ); + for( sal_uInt32 n = 0; n < nMaxItems; ++n ) + if( 0 != (pTmpItem = GetAttrPool().GetItem2( RES_PARATR_TABSTOP, n ) )) bChg |= lcl_SetNewDefTabStops( nOldWidth, nNewWidth, *(SvxTabStopItem*)pTmpItem ); diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx index f934f157c5..5df0bc754a 100644 --- a/sw/source/core/doc/docglbl.cxx +++ b/sw/source/core/doc/docglbl.cxx @@ -229,7 +229,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, String sFileName; if( pSttNd->GetIndex() + 1 < aEndIdx.GetIndex() ) { - SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL )); + SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL )); if( xDocSh->DoInitNew( 0 ) ) { SwDoc* pDoc = ((SwDocShell*)(&xDocSh))->GetDoc(); @@ -577,7 +577,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel ) String sFileName; if( pSttNd->GetIndex() + 1 < aEndIdx.GetIndex() ) { - SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL )); + SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL )); if( xDocSh->DoInitNew( 0 ) ) { SwDoc* pDoc = ((SwDocShell*)(&xDocSh))->GetDoc(); diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 1c8ffd0e36..45f56203b5 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -247,7 +247,6 @@ SwDoc::SwDoc() : pFtnIdxs( new SwFtnIdxs ), pDocStat( new SwDocStat ), pDocShell( 0 ), - pDocShRef( 0 ), pLinkMgr( new sfx2::LinkManager( 0 ) ), pACEWord( 0 ), pURLStateChgd( 0 ), @@ -355,6 +354,7 @@ SwDoc::SwDoc() : mbUseFormerObjectPos = aOptions.IsUseObjectPositioning(); mbUseFormerTextWrapping = aOptions.IsUseOurTextWrapping(); mbConsiderWrapOnObjPos = aOptions.IsConsiderWrappingStyle(); + mbMathBaselineAlignment = false; // default for *old* documents is 'off' mbAddFlyOffsets = false; // hidden mbOldNumbering = false; // hidden mbUseHiResolutionVirtualDevice = true; // hidden @@ -807,8 +807,8 @@ void SwDoc::ClearDoc() pFirstNd->SetAttr( SwFmtPageDesc( pDummyPgDsc )); SwPosition aPos( *pFirstNd, SwIndex( pFirstNd )); - ::PaMCorrAbs( aSttIdx, SwNodeIndex( GetNodes().GetEndOfContent() ), - aPos ); + SwPaM const tmpPaM(aSttIdx, SwNodeIndex(GetNodes().GetEndOfContent())); + ::PaMCorrAbs(tmpPaM, aPos); } GetNodes().Delete( aSttIdx, @@ -1111,15 +1111,19 @@ SfxObjectShell* SwDoc::CreateCopy(bool bCallInitNew ) const // COMPATIBILITY FLAGS END // 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 ); + // we have to use pointer here, since the callee has to decide whether SfxObjectShellLock or SfxObjectShellRef should be used + // sometimes the object will be returned with refcount set to 0 ( if no DoInitNew is done ) + SfxObjectShell* pRetShell = new SwDocShell( pRet, SFX_CREATE_MODE_STANDARD ); if( bCallInitNew ) - xRetShell->DoInitNew(); + // it could happen that DoInitNew creates model, that increases the refcount of the object + pRetShell->DoInitNew(); //copy content pRet->Paste( *this ); - pRet->SetRefForDocShell( 0 ); - return xRetShell; + + // remove the temporary shell if it is there as it was done before + pRet->SetTmpDocShell( (SfxObjectShell*)NULL ); + + return pRetShell; } /*-- 08.05.2009 10:52:40--------------------------------------------------- diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index 59eef0885f..a854b4c71a 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -928,7 +928,23 @@ void SwDoc::SetNumRule( const SwPaM& rPam, { SvUShortsSort aResetAttrsArray; aResetAttrsArray.Insert( RES_LR_SPACE ); - ResetAttrs( rPam, sal_True, &aResetAttrsArray ); + // --> OD 2010-10-05 #i114929# + // On a selection setup a corresponding Point-and-Mark in order to get + // the indentation attribute reset on all paragraphs touched by the selection + if ( rPam.HasMark() && + rPam.End()->nNode.GetNode().GetTxtNode() ) + { + SwPaM aPam( rPam.Start()->nNode, + rPam.End()->nNode ); + aPam.Start()->nContent = 0; + aPam.End()->nContent = rPam.End()->nNode.GetNode().GetTxtNode()->Len(); + ResetAttrs( aPam, FALSE, &aResetAttrsArray ); + } + else + { + ResetAttrs( rPam, FALSE, &aResetAttrsArray ); + } + // <-- } if (DoesUndo()) @@ -939,12 +955,27 @@ void SwDoc::SetNumRule( const SwPaM& rPam, void SwDoc::SetCounted(const SwPaM & rPam, bool bCounted) { - if ( bCounted ) { SvUShortsSort aResetAttrsArray; aResetAttrsArray.Insert( RES_PARATR_LIST_ISCOUNTED ); - ResetAttrs( rPam, sal_True, &aResetAttrsArray ); + // --> OD 2010-10-05 #i114929# + // On a selection setup a corresponding Point-and-Mark in order to get + // the list-is-counted attribute reset on all paragraphs touched by the selection + if ( rPam.HasMark() && + rPam.End()->nNode.GetNode().GetTxtNode() ) + { + SwPaM aPam( rPam.Start()->nNode, + rPam.End()->nNode ); + aPam.Start()->nContent = 0; + aPam.End()->nContent = rPam.End()->nNode.GetNode().GetTxtNode()->Len(); + ResetAttrs( aPam, FALSE, &aResetAttrsArray ); + } + else + { + ResetAttrs( rPam, FALSE, &aResetAttrsArray ); + } + // <-- } else { diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index ab040adfee..e44653b783 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -111,9 +111,9 @@ USHORT SwDoc::GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const const SwTxtTOXMark* pMark; const SfxPoolItem* pItem; const SwTOXType* pTOXType; - USHORT i, nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_TOXMARK ); + sal_uInt32 i, nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_TOXMARK ); for( i = 0; i < nMaxItems; ++i ) - if( 0 != (pItem = GetAttrPool().GetItem( RES_TXTATR_TOXMARK, i ) ) && + if( 0 != (pItem = GetAttrPool().GetItem2( RES_TXTATR_TOXMARK, i ) ) && 0!= ( pTOXType = ((SwTOXMark*)pItem)->GetTOXType()) && TOX_INDEX == pTOXType->GetType() && 0 != ( pMark = ((SwTOXMark*)pItem)->GetTxtTOXMark() ) && @@ -735,6 +735,7 @@ const SwTxtNode* lcl_FindChapterNode( const SwNode& rNd, BYTE nLvl = 0 ) /*-------------------------------------------------------------------- Beschreibung: Verzeichnis-Klasse --------------------------------------------------------------------*/ + SwTOXBaseSection::SwTOXBaseSection(SwTOXBase const& rBase, SwSectionFmt & rFmt) : SwTOXBase( rBase ) , SwSection( TOX_CONTENT_SECTION, aEmptyStr, rFmt ) @@ -2310,8 +2311,7 @@ Range SwTOXBaseSection::GetKeyRange(const String& rStr, const String& rStrReadin if( rIntl.IsEqual( sMyString, sMyStringReading, pBase->GetLocale(), sToCompare, sToCompareReading, rNew.GetLocale() ) && - pBase->GetLevel() == nLevel && - pBase->GetType() == TOX_SORT_CUSTOM ) + pBase->GetLevel() == nLevel ) break; } if(i == nMax) diff --git a/sw/source/core/doc/makefile.mk b/sw/source/core/doc/makefile.mk deleted file mode 100644 index 3399c694b8..0000000000 --- a/sw/source/core/doc/makefile.mk +++ /dev/null @@ -1,92 +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. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=doc - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES = \ - $(SLO)$/SwStyleNameMapper.obj \ - $(SLO)$/acmplwrd.obj \ - $(SLO)$/dbgoutsw.obj \ - $(SLO)$/doc.obj \ - $(SLO)$/docbasic.obj \ - $(SLO)$/docbm.obj \ - $(SLO)$/docchart.obj \ - $(SLO)$/doccomp.obj \ - $(SLO)$/doccorr.obj \ - $(SLO)$/docdde.obj \ - $(SLO)$/docdesc.obj \ - $(SLO)$/docdraw.obj \ - $(SLO)$/docedt.obj \ - $(SLO)$/docfld.obj \ - $(SLO)$/docfly.obj \ - $(SLO)$/docfmt.obj \ - $(SLO)$/docftn.obj \ - $(SLO)$/docglbl.obj \ - $(SLO)$/docglos.obj \ - $(SLO)$/doclay.obj \ - $(SLO)$/docnew.obj \ - $(SLO)$/docnum.obj \ - $(SLO)$/docredln.obj \ - $(SLO)$/docruby.obj \ - $(SLO)$/docsort.obj \ - $(SLO)$/doctxm.obj \ - $(SLO)$/docxforms.obj \ - $(SLO)$/extinput.obj \ - $(SLO)$/fmtcol.obj \ - $(SLO)$/ftnidx.obj \ - $(SLO)$/gctable.obj \ - $(SLO)$/htmltbl.obj \ - $(SLO)$/lineinfo.obj \ - $(SLO)$/list.obj \ - $(SLO)$/notxtfrm.obj \ - $(SLO)$/number.obj \ - $(SLO)$/poolfmt.obj \ - $(SLO)$/swserv.obj \ - $(SLO)$/swstylemanager.obj \ - $(SLO)$/tblafmt.obj \ - $(SLO)$/tblcpy.obj \ - $(SLO)$/tblrwcl.obj \ - $(SLO)$/visiturl.obj - -SLOFILES = $(EXCEPTIONSFILES) \ - $(SLO)$/docstat.obj \ - $(SLO)$/sortopt.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 62a036be6a..ef96ac621e 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -2,7 +2,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 @@ -245,7 +245,7 @@ void lcl_ClearArea( const SwFrm &rFrm, |* *************************************************************************/ -void SwNoTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/ ) const +void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const { if ( Frm().IsEmpty() ) return; diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index ee9e9e2d16..21339638f4 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -872,6 +872,7 @@ void SwNumRule::SetInvalidRule(BOOL bFlag) aLists.insert( pList ); } // <-- + // <-- } std::for_each( aLists.begin(), aLists.end(), std::mem_fun( &SwList::InvalidateListTree ) ); diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index a6c7f5e73e..540d61ac88 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -2887,10 +2887,10 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, if( rParam.bLeft ? ((nDist + nWidth / 2 ) <= rParam.nSide && (TBLFIX_CHGABS != rParam.nMode || - (n < rBoxes.Count() && + (n < rBoxes.Count() && (nDist + nWidth + rBoxes[ n+1 ]-> GetFrmFmt()->GetFrmSize().GetWidth() / 2) - > rParam.nSide ))) + > rParam.nSide) )) : (nDist + nWidth / 2 ) > rParam.nSide ) { @@ -2952,10 +2952,10 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, if( nLowerDiff || (rParam.bLeft ? ((nDist + nWidth / 2 ) <= rParam.nSide && (TBLFIX_CHGABS != rParam.nMode || - (n < rBoxes.Count() && + (n < rBoxes.Count() && (nDist + nWidth + rBoxes[ n+1 ]-> GetFrmFmt()->GetFrmSize().GetWidth() / 2) - > rParam.nSide ))) + > rParam.nSide) )) : (nDist + nWidth / 2 ) > rParam.nSide )) { if( !nLowerDiff ) @@ -3074,7 +3074,7 @@ void lcl_ChgBoxSize( SwTableBox& rBox, CR_SetBoxWidth& rParam, const SwFmtFrmSize& rOldSz, USHORT& rDelWidth, SwTwips nDist ) { - long nDiff; + long nDiff = 0; BOOL bSetSize = FALSE; switch( rParam.nMode ) diff --git a/sw/source/core/doc/visiturl.cxx b/sw/source/core/doc/visiturl.cxx index 387f6568a2..6b13a2ccda 100644 --- a/sw/source/core/doc/visiturl.cxx +++ b/sw/source/core/doc/visiturl.cxx @@ -72,9 +72,9 @@ void SwURLStateChanged::Notify( SfxBroadcaster& , const SfxHint& rHint ) const SwFmtINetFmt* pItem; const SwTxtINetFmt* pTxtAttr; const SwTxtNode* pTxtNd; - USHORT n, nMaxItems = pDoc->GetAttrPool().GetItemCount( RES_TXTATR_INETFMT ); + sal_uInt32 n, nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT ); for( n = 0; n < nMaxItems; ++n ) - if( 0 != (pItem = (SwFmtINetFmt*)pDoc->GetAttrPool().GetItem( + if( 0 != (pItem = (SwFmtINetFmt*)pDoc->GetAttrPool().GetItem2( RES_TXTATR_INETFMT, n ) ) && ( pItem->GetValue() == sURL || ( sBkmk.Len() && pItem->GetValue() == sBkmk )) && diff --git a/sw/source/core/docnode/makefile.mk b/sw/source/core/docnode/makefile.mk deleted file mode 100644 index e188c8d6ec..0000000000 --- a/sw/source/core/docnode/makefile.mk +++ /dev/null @@ -1,73 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=docnode - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES= \ - $(SLO)$/cancellablejob.obj \ - $(SLO)$/finalthreadmanager.obj \ - $(SLO)$/ndcopy.obj \ - $(SLO)$/ndindex.obj \ - $(SLO)$/ndnotxt.obj \ - $(SLO)$/ndnum.obj \ - $(SLO)$/ndsect.obj \ - $(SLO)$/ndtbl.obj \ - $(SLO)$/ndtbl1.obj \ - $(SLO)$/node.obj \ - $(SLO)$/node2lay.obj \ - $(SLO)$/nodes.obj \ - $(SLO)$/observablethread.obj \ - $(SLO)$/retrievedinputstreamdata.obj \ - $(SLO)$/retrieveinputstream.obj \ - $(SLO)$/retrieveinputstreamconsumer.obj \ - $(SLO)$/section.obj \ - $(SLO)$/swbaslnk.obj \ - $(SLO)$/swthreadmanager.obj \ - $(SLO)$/threadlistener.obj \ - $(SLO)$/threadmanager.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - $(SLO)$/pausethreadstarting.obj \ - $(SLO)$/swthreadjoiner.obj - - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index c9b442f13a..1e3c0f6bbe 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -334,6 +334,13 @@ BOOL SwNodes::InsBoxen( SwTableNode* pTblNd, rTabBoxes.C40_INSERT( SwTableBox, pPrvBox, nRealInsPos ); + SwTableBoxes & rTabBoxes = pLine->GetTabBoxes(); + USHORT nRealInsPos = nInsPos + n; + if (nRealInsPos > rTabBoxes.Count()) + nRealInsPos = rTabBoxes.Count(); + + rTabBoxes.C40_INSERT( SwTableBox, pPrvBox, nRealInsPos ); + if( ! pTxtColl->IsAssignedToListLevelOfOutlineStyle()//<-end,zhaojianwei //FEATURE::CONDCOLL && RES_CONDTXTFMTCOLL != pTxtColl->Which() @@ -1263,6 +1270,49 @@ SwNodeRange * SwNodes::ExpandRangeForTableBox(const SwNodeRange & rRange) ++aIndex; } +SwNodeRange * SwNodes::ExpandRangeForTableBox(const SwNodeRange & rRange) +{ + SwNodeRange * pResult = NULL; + bool bChanged = false; + + SwNodeIndex aNewStart = rRange.aStart; + SwNodeIndex aNewEnd = rRange.aEnd; + + SwNodeIndex aEndIndex = rRange.aEnd; + SwNodeIndex aIndex = rRange.aStart; + + while (aIndex < aEndIndex) + { + SwNode& rNode = aIndex.GetNode(); + + if (rNode.IsStartNode()) + { + // advance aIndex to the end node of this start node + SwNode * pEndNode = rNode.EndOfSectionNode(); + aIndex = *pEndNode; + + if (aIndex > aNewEnd) + { + aNewEnd = aIndex; + bChanged = true; + } + } + else if (rNode.IsEndNode()) + { + SwNode * pStartNode = rNode.StartOfSectionNode(); + SwNodeIndex aStartIndex = *pStartNode; + + if (aStartIndex < aNewStart) + { + aNewStart = aStartIndex; + bChanged = true; + } + } + + if (aIndex < aEndIndex) + ++aIndex; + } + SwNode * pNode = &aIndex.GetNode(); while (pNode->IsEndNode()) { @@ -1281,7 +1331,7 @@ SwNodeRange * SwNodes::ExpandRangeForTableBox(const SwNodeRange & rRange) return pResult; } - + SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes, SwTableFmt* pTblFmt, SwTableLineFmt* pLineFmt, @@ -2045,9 +2095,10 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn ) *aSavePaM.GetMark() = SwPosition( *pTblNd ); aSavePaM.Move( fnMoveBackward, fnGoNode ); } - ::PaMCorrAbs( SwNodeIndex( *pTblNd ), - SwNodeIndex( *pTblNd->EndOfSectionNode() ), - *aSavePaM.GetMark() ); + { + SwPaM const tmpPaM(*pTblNd, *pTblNd->EndOfSectionNode()); + ::PaMCorrAbs(tmpPaM, *aSavePaM.GetMark()); + } // harte SeitenUmbrueche am nachfolgenden Node verschieben BOOL bSavePageBreak = FALSE, bSavePageDesc = FALSE; @@ -2096,9 +2147,10 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn ) *aSavePaM.GetMark() = SwPosition( *pTblNd ); aSavePaM.Move( fnMoveBackward, fnGoNode ); } - ::PaMCorrAbs( SwNodeIndex( *pTblNd ), - SwNodeIndex( *pTblNd->EndOfSectionNode() ), - *aSavePaM.GetMark() ); + { + SwPaM const tmpPaM(*pTblNd, *pTblNd->EndOfSectionNode()); + ::PaMCorrAbs(tmpPaM, *aSavePaM.GetMark()); + } // harte SeitenUmbrueche am nachfolgenden Node verschieben SwCntntNode* pNextNd = GetNodes()[ pTblNd->EndOfSectionIndex()+1 ]->GetCntntNode(); @@ -4321,7 +4373,6 @@ BOOL SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes, } SwDoc* pCpyDoc = (SwDoc*)pSrcTblNd->GetDoc(); - SfxObjectShellRef* pRefForDocSh = 0; BOOL bDelCpyDoc = pCpyDoc == this; if( bDelCpyDoc ) @@ -4329,13 +4380,10 @@ BOOL SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes, // kopiere die Tabelle erstmal in ein temp. Doc pCpyDoc = new SwDoc; pCpyDoc->acquire(); - pRefForDocSh = new SfxObjectShellRef(); - pCpyDoc->SetRefForDocShell( pRefForDocSh ); SwPosition aPos( SwNodeIndex( pCpyDoc->GetNodes().GetEndOfContent() )); if( !pSrcTblNd->GetTable().MakeCopy( pCpyDoc, aPos, rBoxes, TRUE, TRUE )) { - delete pRefForDocSh; if( pCpyDoc->release() == 0 ) delete pCpyDoc; @@ -4348,8 +4396,6 @@ BOOL SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes, } aPos.nNode -= 1; // auf den EndNode der Tabelle pSrcTblNd = aPos.nNode.GetNode().FindTableNode(); - - pCpyDoc->SetRefForDocShell( NULL ); } const SwStartNode* pSttNd = rInsPos.nNode.GetNode().FindTableBoxStartNode(); @@ -4388,7 +4434,6 @@ BOOL SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes, if( bDelCpyDoc ) { - delete pRefForDocSh; if( pCpyDoc->release() == 0 ) delete pCpyDoc; } diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 586ac074d1..3fb29bc435 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -729,9 +729,9 @@ const SwPageDesc* SwNode::FindPageDesc( BOOL bCalcLay, SwFindNearestNode aInfo( *pNd ); // dann ueber alle Nodes aller PageDesc const SfxPoolItem* pItem; - USHORT i, nMaxItems = pDoc->GetAttrPool().GetItemCount( RES_PAGEDESC ); + sal_uInt32 i, nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_PAGEDESC ); for( i = 0; i < nMaxItems; ++i ) - if( 0 != (pItem = pDoc->GetAttrPool().GetItem( RES_PAGEDESC, i ) ) && + if( 0 != (pItem = pDoc->GetAttrPool().GetItem2( RES_PAGEDESC, i ) ) && ((SwFmtPageDesc*)pItem)->GetDefinedIn() ) { const SwModify* pMod = ((SwFmtPageDesc*)pItem)->GetDefinedIn(); diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index e0a3da77bb..8fed7bdc66 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -285,21 +285,20 @@ SwSection::~SwSection() m_RefObj->Closed(); } } - void SwSection::SetSectionData(SwSectionData const& rData) { 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... - { ImplSetHiddenFlag(m_Data.IsHidden(), m_Data.IsCondHidden()); - } } - +} bool SwSection::DataEquals(SwSectionData const& rCmp) const { // note that the old code compared the flags of the parameter with the @@ -1317,9 +1316,10 @@ void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) // Der Return-Wert gibt an, was mit der Shell zu geschehen hat: // 0 - Fehler, konnte DocShell nicht finden // 1 - DocShell ist ein existieren Document -// 2 - DocShell wurde neu angelegt, muss also wieder geschlossen werden +// 2 - DocShell wurde neu angelegt, muss also wieder geschlossen werden ( will be assigned to xLockRef additionaly ) int lcl_FindDocShell( SfxObjectShellRef& xDocSh, + SfxObjectShellLock& xLockRef, const String& rFileName, const String& rPasswd, String& rFilter, @@ -1405,7 +1405,9 @@ int lcl_FindDocShell( SfxObjectShellRef& xDocSh, // ohne Filter geht gar nichts pMed->SetFilter( pSfxFlt ); - xDocSh = new SwDocShell( SFX_CREATE_MODE_INTERNAL ); + // if the new shell is created, SfxObjectShellLock should be used to let it be closed later for sure + xLockRef = new SwDocShell( SFX_CREATE_MODE_INTERNAL ); + xDocSh = (SfxObjectShell*)xLockRef; if( xDocSh->DoLoad( pMed ) ) return 2; } @@ -1502,6 +1504,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType, RedlineMode_t eOldRedlineMode = nsRedlineMode_t::REDLINE_NONE; SfxObjectShellRef xDocSh; + SfxObjectShellLock xLockRef; int nRet; if( !sFileName.Len() ) { @@ -1510,7 +1513,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType, } else { - nRet = lcl_FindDocShell( xDocSh, sFileName, + nRet = lcl_FindDocShell( xDocSh, xLockRef, sFileName, rSection.GetLinkFilePassword(), sFilter, 0, pDoc->GetDocShell() ); if( nRet ) diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx index bbe87bac5c..00f03bf217 100644 --- a/sw/source/core/docnode/swbaslnk.cxx +++ b/sw/source/core/docnode/swbaslnk.cxx @@ -472,6 +472,7 @@ const SwNode* SwBaseLink::GetAnchor() const } return 0; } + } } OSL_ENSURE( !this, "GetAnchor nicht ueberlagert" ); diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index c417c0e810..cfea408774 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -536,6 +536,11 @@ const Rectangle& SwVirtFlyDrawObj::GetCurrentBoundRect() const return aOutRect; } +const Rectangle& __EXPORT SwVirtFlyDrawObj::GetLastBoundRect() const +{ + return GetCurrentBoundRect(); +} + const Rectangle& SwVirtFlyDrawObj::GetLastBoundRect() const { return GetCurrentBoundRect(); diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx index 69f485fc92..19e5a2c54b 100644 --- a/sw/source/core/draw/dview.cxx +++ b/sw/source/core/draw/dview.cxx @@ -33,6 +33,7 @@ #include <editeng/protitem.hxx> #include <svx/svdpagv.hxx> #include <svx/fmmodel.hxx> +#include <sot/exchange.hxx> #include "swtypes.hxx" #include "pagefrm.hxx" @@ -960,6 +961,14 @@ void SwDrawView::CheckPossibilities() bSzProtect |= ( embed::EmbedMisc::EMBED_NEVERRESIZE & xObj->getStatus( embed::Aspects::MSOLE_CONTENT ) ) ? TRUE : FALSE; // <-- + + // #i972: protect position if it is a Math object anchored 'as char' and baseline alignment is activated + SwDoc* pDoc = Imp().GetShell()->GetDoc(); + const bool bProtectMathPos = SotExchange::IsMath( xObj->getClassID() ) + && FLY_AS_CHAR == pFly->GetFmt()->GetAnchor().GetAnchorId() + && pDoc->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ); + if (bProtectMathPos) + bMoveProtect = true; } } } diff --git a/sw/source/core/draw/makefile.mk b/sw/source/core/draw/makefile.mk deleted file mode 100644 index 71d0cbdd25..0000000000 --- a/sw/source/core/draw/makefile.mk +++ /dev/null @@ -1,58 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=draw - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(EXCEPTIONSFILES) - -EXCEPTIONSFILES= \ - $(SLO)$/dcontact.obj \ - $(SLO)$/dflyobj.obj \ - $(SLO)$/dobjfac.obj \ - $(SLO)$/dpage.obj \ - $(SLO)$/drawdoc.obj \ - $(SLO)$/dview.obj \ - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx index ef75538348..dd35909849 100644 --- a/sw/source/core/edit/edattr.cxx +++ b/sw/source/core/edit/edattr.cxx @@ -439,7 +439,7 @@ BOOL lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos, const SwField* const pFld = pAttr->GetFld().GetFld(); if (pFld) { - sExp += pFld->ExpandField(rTNd.GetDoc()->IsClipBoard()); + sExp += pFld->ExpandField(true); } } } diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx index f946235d5d..5a5ec0552c 100644 --- a/sw/source/core/edit/edfld.cxx +++ b/sw/source/core/edit/edfld.cxx @@ -225,7 +225,7 @@ void SwEditShell::FieldToText( SwFieldType* pType ) *pFmtFld->GetTxtFld()->GetStart() ); // Feldinhalt durch Text ersetzen - String const aEntry( + String const aEntry( pFmtFld->GetFld()->ExpandField(true) ); pFmtFld->GetFld()->ExpandField(GetDoc()->IsClipBoard()) ); pPaM->SetMark(); pPaM->Move( fnMoveForward ); @@ -342,11 +342,11 @@ SwTxtFld* lcl_FindInputFld( SwDoc* pDoc, SwField& rFld ) ((SwSetExpField&)rFld).GetInputFlag() ) ) { const SfxPoolItem* pItem; - USHORT n, nMaxItems = - pDoc->GetAttrPool().GetItemCount( RES_TXTATR_FIELD ); + sal_uInt32 n, nMaxItems = + pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_FIELD ); for( n = 0; n < nMaxItems; ++n ) if( 0 != (pItem = - pDoc->GetAttrPool().GetItem( RES_TXTATR_FIELD, n ) ) + pDoc->GetAttrPool().GetItem2( RES_TXTATR_FIELD, n ) ) && ((SwFmtFld*)pItem)->GetFld() == &rFld ) { pTFld = ((SwFmtFld*)pItem)->GetTxtFld(); diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index 7e186f95df..071492870d 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -1272,6 +1272,7 @@ sal_uInt32 lcl_CountRedlines( } void SwEditShell::MoveContinuationPosToEndOfCheckedSentence() + { // give hint that continuation position for spell/grammar checking is // at the end of this sentence diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx index c887e3237a..604c52004a 100644 --- a/sw/source/core/edit/edsect.cxx +++ b/sw/source/core/edit/edsect.cxx @@ -144,8 +144,8 @@ BOOL SwEditShell::IsAnySectionInDoc( BOOL bChkReadOnly, BOOL bChkHidden, BOOL bC const SwSectionFmt* pFmt = rFmts[ n ]; if( pFmt->IsInNodesArr() && (bChkTOX || - ((eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION - && TOX_HEADER_SECTION != eTmpType ))) + ( (eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION + && TOX_HEADER_SECTION != eTmpType ) ) ) { const SwSection& rSect = *rFmts[ n ]->GetSection(); if( (!bChkReadOnly && !bChkHidden ) || diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx index 33c2685578..218750de13 100644 --- a/sw/source/core/edit/edtox.cxx +++ b/sw/source/core/edit/edtox.cxx @@ -57,6 +57,7 @@ #include <bookmrk.hxx> #include <xmloff/odffields.hxx> + using namespace ::com::sun::star; using namespace ::com::sun::star::i18n; diff --git a/sw/source/core/edit/makefile.mk b/sw/source/core/edit/makefile.mk deleted file mode 100644 index 355d667b82..0000000000 --- a/sw/source/core/edit/makefile.mk +++ /dev/null @@ -1,71 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=edit - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES=\ - $(SLO)$/acorrect.obj \ - $(SLO)$/autofmt.obj \ - $(SLO)$/edatmisc.obj \ - $(SLO)$/edattr.obj \ - $(SLO)$/eddel.obj \ - $(SLO)$/edfcol.obj \ - $(SLO)$/edfld.obj \ - $(SLO)$/edfldexp.obj \ - $(SLO)$/edfmt.obj \ - $(SLO)$/edglbldc.obj \ - $(SLO)$/edglss.obj \ - $(SLO)$/editsh.obj \ - $(SLO)$/edlingu.obj \ - $(SLO)$/ednumber.obj \ - $(SLO)$/edredln.obj \ - $(SLO)$/edsect.obj \ - $(SLO)$/edtab.obj \ - $(SLO)$/edtox.obj \ - $(SLO)$/edundo.obj \ - $(SLO)$/edws.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/except/dbgloop.cxx b/sw/source/core/except/dbgloop.cxx index ddb3a7b1a4..f28f0cdef1 100644 --- a/sw/source/core/except/dbgloop.cxx +++ b/sw/source/core/except/dbgloop.cxx @@ -31,7 +31,6 @@ #if !defined(OSL_DEBUG_LEVEL) || OSL_DEBUG_LEVEL == 0 #error Who broke the makefiles? -#endif #include <tools/stream.hxx> #include "dbgloop.hxx" #include "errhdl.hxx" @@ -166,5 +165,6 @@ int main() } #endif +#endif // DBG_UTIL /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/except/errhdl.cxx b/sw/source/core/except/errhdl.cxx index 544f52b072..41317c5764 100644 --- a/sw/source/core/except/errhdl.cxx +++ b/sw/source/core/except/errhdl.cxx @@ -28,6 +28,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + +#ifdef DBG_UTIL + #define _ERRHDL_CXX #include "stdlib.h" @@ -37,13 +40,6 @@ #include <errhdl.hxx> #include <error.h> // fuer die defines von ERR_SW6MSG_ ... -// break into CodeView -#if defined(ZTC) && defined(WIN) -#define CVBREAK asm( 0xCC ); -#endif -#if defined(MSC) && defined(WIN) -#define CVBREAK __asm int 3; -#endif #ifndef CVBREAK #define CVBREAK #endif @@ -85,5 +81,6 @@ void AssertFail( USHORT nErrorId, const sal_Char* pFileName ) OSL_ENSURE( pMsg, pFileName ); } +#endif // DBG_UTIL /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/except/makefile.mk b/sw/source/core/except/makefile.mk deleted file mode 100644 index 022862b3c2..0000000000 --- a/sw/source/core/except/makefile.mk +++ /dev/null @@ -1,60 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=except - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk - -# hier kein PCH! -prjpch= -PRJPCH= - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -CXXFILES = - -.IF "$(DBG_LEVEL)">="2" -CXXFILES += \ - errhdl.cxx \ - dbgloop.cxx - -SLOFILES += \ - $(SLO)$/errhdl.obj \ - $(SLO)$/dbgloop.obj -.ENDIF -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx index a9457f2bf9..397460ec12 100644 --- a/sw/source/core/fields/cellfml.cxx +++ b/sw/source/core/fields/cellfml.cxx @@ -201,7 +201,7 @@ double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const break; default: - String const value(pFld->ExpandField(pDoc->IsClipBoard())); + String const value(pFld->ExpandField(true)); nRet = rCalcPara.rCalc.Calculate(value).GetDouble(); } } diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx index ca29acbb5f..0ce607f199 100644 --- a/sw/source/core/fields/dbfld.cxx +++ b/sw/source/core/fields/dbfld.cxx @@ -29,7 +29,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include <float.h> #include <sfx2/app.hxx> #include <svl/zforlist.hxx> @@ -273,24 +272,20 @@ SwField* SwDBField::Copy() const return pTmp; } -String SwDBField::GetCntnt(BOOL bName) const +String SwDBField::GetFieldName() const { - if(bName) - { - const String& rDBName = ((SwDBFieldType*)GetTyp())->GetName(); + const String& rDBName = static_cast<SwDBFieldType*>(GetTyp())->GetName(); - String sContent( rDBName.GetToken(0, DB_DELIM) ); + String sContent( rDBName.GetToken(0, DB_DELIM) ); - if (sContent.Len() > 1) - { - sContent += DB_DELIM; - sContent += rDBName.GetToken(1, DB_DELIM); - sContent += DB_DELIM; - sContent += rDBName.GetToken(2, DB_DELIM); - } - return lcl_DBTrennConv(sContent); + if (sContent.Len() > 1) + { + sContent += DB_DELIM; + sContent += rDBName.GetToken(1, DB_DELIM); + sContent += DB_DELIM; + sContent += rDBName.GetToken(2, DB_DELIM); } - return Expand(); + return lcl_DBTrennConv(sContent); } //------------------------------------------------------------------------------ @@ -519,19 +514,15 @@ void SwDBNameInfField::SetDBData(const SwDBData & rDBData) //------------------------------------------------------------------------------ -String SwDBNameInfField::GetCntnt(BOOL bName) const +String SwDBNameInfField::GetFieldName() const { - String sStr(SwField::GetCntnt(bName)); - - if(bName) + String sStr( SwField::GetFieldName() ); + if (aDBData.sDataSource.getLength()) { - if (aDBData.sDataSource.getLength()) - { - sStr += ':'; - sStr += String(aDBData.sDataSource); - sStr += DB_DELIM; - sStr += String(aDBData.sCommand); - } + sStr += ':'; + sStr += String(aDBData.sDataSource); + sStr += DB_DELIM; + sStr += String(aDBData.sCommand); } return lcl_DBTrennConv(sStr); } diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index de08e84fc4..31e2133904 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -171,9 +171,9 @@ void SwPageNumberFieldType::ChangeExpansion( SwDoc* pDoc, sal_uInt16 nPage, // es NIE zurueck const SfxItemPool &rPool = pDoc->GetAttrPool(); const SwFmtPageDesc *pDesc; - sal_uInt16 nMaxItems = rPool.GetItemCount( RES_PAGEDESC ); - for( sal_uInt16 n = 0; n < nMaxItems; ++n ) - if( 0 != (pDesc = (SwFmtPageDesc*)rPool.GetItem( RES_PAGEDESC, n ) ) + sal_uInt32 nMaxItems = rPool.GetItemCount2( RES_PAGEDESC ); + for( sal_uInt32 n = 0; n < nMaxItems; ++n ) + if( 0 != (pDesc = (SwFmtPageDesc*)rPool.GetItem2( RES_PAGEDESC, n ) ) && pDesc->GetNumOffset() && pDesc->GetDefinedIn() ) { if( pDesc->GetDefinedIn()->ISA( SwCntntNode )) @@ -1171,30 +1171,30 @@ String SwDocInfoField::Expand() const /* --------------------------------------------------------------------------- ---------------------------------------------------------------------------*/ -String SwDocInfoField::GetCntnt(sal_Bool bName) const +String SwDocInfoField::GetFieldName() const { - if ( bName ) - { - String aStr(SwFieldType::GetTypeStr(GetTypeId())); - aStr += ':'; + String aStr(SwFieldType::GetTypeStr(GetTypeId())); + aStr += ':'; - sal_uInt16 nSub = nSubType & 0xff; + sal_uInt16 const nSub = nSubType & 0xff; - switch(nSub) - { - case DI_CUSTOM: - aStr += aName; - break; + switch (nSub) + { + case DI_CUSTOM: + aStr += aName; + break; - default: - aStr += *ViewShell::GetShellRes()->aDocInfoLst[ nSub - DI_SUBTYPE_BEGIN ]; - break; - } - if( IsFixed() ) - ( aStr += ' ' ) += ViewShell::GetShellRes()->aFixedStr; - return aStr; + default: + aStr += *ViewShell::GetShellRes() + ->aDocInfoLst[ nSub - DI_SUBTYPE_BEGIN ]; + break; } - return Expand(); + if (IsFixed()) + { + aStr += ' '; + aStr += ViewShell::GetShellRes()->aFixedStr; + } + return aStr; } /* --------------------------------------------------------------------------- @@ -1490,25 +1490,20 @@ void SwHiddenTxtField::Evaluate(SwDoc* pDoc) /* --------------------------------------------------------------------------- ---------------------------------------------------------------------------*/ -String SwHiddenTxtField::GetCntnt(sal_Bool bName) const +String SwHiddenTxtField::GetFieldName() const { - if ( bName ) - { - String aStr(SwFieldType::GetTypeStr(nSubType)); - aStr += ' '; - aStr += aCond; - aStr += ' '; - aStr += aTRUETxt; + String aStr(SwFieldType::GetTypeStr(nSubType)); + aStr += ' '; + aStr += aCond; + aStr += ' '; + aStr += aTRUETxt; - if(nSubType == TYP_CONDTXTFLD) - { -static char const cTmp[] = " : "; - aStr.AppendAscii(cTmp); - aStr += aFALSETxt; - } - return aStr; + if (nSubType == TYP_CONDTXTFLD) + { + aStr.AppendAscii(" : "); + aStr += aFALSETxt; } - return Expand(); + return aStr; } /* --------------------------------------------------------------------------- diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index 65d8917f91..c12b54957e 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -77,10 +77,18 @@ sal_Int16 lcl_SubTypeToAPI(USHORT nSubType) sal_Int16 nRet = 0; switch(nSubType) { - case nsSwGetSetExpType::GSE_EXPR : nRet = SetVariableType::VAR /*0*/; break; - case nsSwGetSetExpType::GSE_SEQ : nRet = SetVariableType::SEQUENCE /*1*/; break; - case nsSwGetSetExpType::GSE_FORMULA : nRet = SetVariableType::FORMULA /*2*/; break; - case nsSwGetSetExpType::GSE_STRING : nRet = SetVariableType::STRING /*3*/; break; + case nsSwGetSetExpType::GSE_EXPR: + nRet = SetVariableType::VAR; // 0 + break; + case nsSwGetSetExpType::GSE_SEQ: + nRet = SetVariableType::SEQUENCE; // 1 + break; + case nsSwGetSetExpType::GSE_FORMULA: + nRet = SetVariableType::FORMULA; // 2 + break; + case nsSwGetSetExpType::GSE_STRING: + nRet = SetVariableType::STRING; // 3 + break; } return nRet; } @@ -306,18 +314,15 @@ String SwGetExpField::Expand() const return sExpand; } -String SwGetExpField::GetCntnt(BOOL bName) const +String SwGetExpField::GetFieldName() const { - if ( bName ) - { - String aStr( SwFieldType::GetTypeStr( static_cast<USHORT>(nsSwGetSetExpType::GSE_FORMULA & nSubType - ? TYP_FORMELFLD - : TYP_GETFLD ) )); - aStr += ' '; - aStr += GetFormula(); - return aStr; - } - return Expand(); + String aStr( SwFieldType::GetTypeStr( + static_cast<USHORT>(((nsSwGetSetExpType::GSE_FORMULA & nSubType) != 0) + ? TYP_FORMELFLD + : TYP_GETFLD ) )); + aStr += ' '; + aStr += GetFormula(); + return aStr; } SwField* SwGetExpField::Copy() const @@ -827,35 +832,28 @@ String SwSetExpField::Expand() const } /*-------------------------------------------------------------------- - Beschreibung: liefert den Namen oder den Inhalt + @return the field name --------------------------------------------------------------------*/ -String SwSetExpField::GetCntnt(BOOL bName) const +String SwSetExpField::GetFieldName() const { - if( bName ) - { - USHORT nStrType; - - if( IsSequenceFld() ) - nStrType = TYP_SEQFLD; - else if( bInput ) - nStrType = TYP_SETINPFLD; - else - nStrType = TYP_SETFLD; + SwFldTypesEnum const nStrType( (IsSequenceFld()) + ? TYP_SEQFLD + : (bInput) + ? TYP_SETINPFLD + : TYP_SETFLD ); - String aStr( SwFieldType::GetTypeStr( nStrType ) ); - aStr += ' '; - aStr += GetTyp()->GetName(); + String aStr( SwFieldType::GetTypeStr( static_cast<USHORT>(nStrType) ) ); + aStr += ' '; + aStr += GetTyp()->GetName(); - if( TYP_SEQFLD != nStrType ) - { - // Sequence nicht die Formel ausgeben - aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " = " )); - aStr += GetFormula(); - } - return aStr; + // Sequence: without formula + if (TYP_SEQFLD != nStrType) + { + aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " = " ) ); + aStr += GetFormula(); } - return Expand(); + return aStr; } SwField* SwSetExpField::Copy() const @@ -1014,20 +1012,16 @@ SwInputField::SwInputField(SwInputFieldType* pTyp, const String& rContent, { } -String SwInputField::GetCntnt(BOOL bName) const +String SwInputField::GetFieldName() const { - if ( bName ) + String aStr(SwField::GetFieldName()); + if ((nSubType & 0x00ff) == INP_USR) { - String aStr(SwField::GetCntnt(bName)); - if ((nSubType & 0x00ff) == INP_USR) - { - aStr += GetTyp()->GetName(); - aStr += ' '; - aStr += aContent; - } - return aStr; + aStr += GetTyp()->GetName(); + aStr += ' '; + aStr += aContent; } - return Expand(); + return aStr; } SwField* SwInputField::Copy() const diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx index f7eb561c63..53fd18c8d0 100644 --- a/sw/source/core/fields/fldbas.cxx +++ b/sw/source/core/fields/fldbas.cxx @@ -53,9 +53,6 @@ #include <comcore.hrc> #include <math.h> -#ifdef MAC -#include <stdlib.h> -#endif using namespace ::com::sun::star; using namespace nsSwDocInfoSubType; @@ -262,21 +259,20 @@ USHORT SwField::GetTypeId() const Beschreibung: liefert den Namen oder den Inhalt --------------------------------------------------------------------*/ -String SwField::GetCntnt( BOOL bName ) const +String SwField::GetFieldName() const { - String sRet; - if( bName ) + USHORT nTypeId = GetTypeId(); + if (RES_DATETIMEFLD == GetTyp()->Which()) { - USHORT nTypeId = GetTypeId(); - if( RES_DATETIMEFLD == GetTyp()->Which() ) - nTypeId = static_cast<USHORT>(GetSubType() & DATEFLD ? TYP_DATEFLD : TYP_TIMEFLD); - - sRet = SwFieldType::GetTypeStr( nTypeId ); - if( IsFixed() ) - ( sRet += ' ' ) += ViewShell::GetShellRes()->aFixedStr; + nTypeId = static_cast<USHORT>( + ((GetSubType() & DATEFLD) != 0) ? TYP_DATEFLD : TYP_TIMEFLD); + } + String sRet = SwFieldType::GetTypeStr( nTypeId ); + if (IsFixed()) + { + sRet += ' '; + sRet += ViewShell::GetShellRes()->aFixedStr; } - else - sRet = Expand(); return sRet; } @@ -425,6 +421,24 @@ BOOL SwField::IsFixed() const return bRet; } +String SwField::ExpandField(bool const bCached) const +{ + if (!bCached) // #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) + // use this->cache, not this->Expand(): only text formatting calls Expand() + pNew->m_Cache = m_Cache; + return pNew; +} + String SwField::ExpandField(bool const bInClipboard) const { if (!bInClipboard) // #i85766# do not expand fields in clipboard documents diff --git a/sw/source/core/fields/macrofld.cxx b/sw/source/core/fields/macrofld.cxx index 73a61ae90f..893c180728 100644 --- a/sw/source/core/fields/macrofld.cxx +++ b/sw/source/core/fields/macrofld.cxx @@ -29,7 +29,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include <hintids.hxx> #include <doc.hxx> #include <docufld.hxx> @@ -39,8 +38,10 @@ #include <com/sun/star/uri/XVndSunStarScriptUrl.hpp> #include <comphelper/processfactory.hxx> + using namespace ::com::sun::star; using ::rtl::OUString; + /*-------------------------------------------------------------------- Beschreibung: MacroFeldtypen --------------------------------------------------------------------*/ @@ -78,16 +79,12 @@ SwField* SwMacroField::Copy() const return new SwMacroField((SwMacroFieldType*)GetTyp(), aMacro, aText); } -String SwMacroField::GetCntnt(BOOL bName) const +String SwMacroField::GetFieldName() const { - if(bName) - { - String aStr(GetTyp()->GetName()); - aStr += ' '; - aStr += aMacro; - return aStr; - } - return Expand(); + String aStr(GetTyp()->GetName()); + aStr += ' '; + aStr += aMacro; + return aStr; } String SwMacroField::GetLibName() const diff --git a/sw/source/core/fields/makefile.mk b/sw/source/core/fields/makefile.mk deleted file mode 100644 index 358b3f7afc..0000000000 --- a/sw/source/core/fields/makefile.mk +++ /dev/null @@ -1,92 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=fields - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -CXXFILES = \ - authfld.cxx \ - cellfml.cxx \ - chpfld.cxx \ - dbfld.cxx \ - ddefld.cxx \ - ddetbl.cxx \ - docufld.cxx \ - expfld.cxx \ - fldbas.cxx \ - flddat.cxx \ - flddropdown.cxx \ - scrptfld.cxx \ - macrofld.cxx \ - fldlst.cxx \ - postithelper.cxx \ - reffld.cxx \ - tblcalc.cxx \ - usrfld.cxx - - - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - $(SLO)$/scrptfld.obj - -EXCEPTIONSFILES = \ - $(SLO)$/authfld.obj \ - $(SLO)$/cellfml.obj \ - $(SLO)$/chpfld.obj \ - $(SLO)$/dbfld.obj \ - $(SLO)$/ddefld.obj \ - $(SLO)$/ddetbl.obj \ - $(SLO)$/docufld.obj \ - $(SLO)$/expfld.obj \ - $(SLO)$/fldbas.obj \ - $(SLO)$/flddat.obj \ - $(SLO)$/flddropdown.obj \ - $(SLO)$/fldlst.obj \ - $(SLO)$/macrofld.obj \ - $(SLO)$/postithelper.obj \ - $(SLO)$/reffld.obj \ - $(SLO)$/tblcalc.obj \ - $(SLO)$/textapi.obj \ - $(SLO)$/usrfld.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx index b7e4cdeca6..9b3fe63fe6 100644 --- a/sw/source/core/fields/postithelper.cxx +++ b/sw/source/core/fields/postithelper.cxx @@ -65,6 +65,41 @@ struct LayoutInfoOrder 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 + +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 OSL_ENSURE( rLayoutInfo.mpAnchorFrm->FindTabFrm(), "<LayoutInfoOrder::operator()> - table frame not found" ); OSL_ENSURE( rNewLayoutInfo.mpAnchorFrm->FindTabFrm(), diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index 23b0eec107..249e346444 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -275,11 +275,8 @@ String SwGetRefField::Expand() const } -String SwGetRefField::GetCntnt(BOOL bName) const +String SwGetRefField::GetFieldName() const { - if( !bName ) - return Expand(); - String aStr(GetTyp()->GetName()); aStr += ' '; aStr += sSetRefName; diff --git a/sw/source/core/fields/tblcalc.cxx b/sw/source/core/fields/tblcalc.cxx index 84f2f316d4..9dabc609a6 100644 --- a/sw/source/core/fields/tblcalc.cxx +++ b/sw/source/core/fields/tblcalc.cxx @@ -90,22 +90,12 @@ SwField* SwTblField::Copy() const } -String SwTblField::GetCntnt(BOOL bName) const +String SwTblField::GetFieldName() const { - if( bName ) - { - String aStr(GetTyp()->GetName()); - aStr += ' '; - - USHORT nOldSubType = nSubType; - SwTblField* pThis = (SwTblField*)this; - pThis->nSubType |= nsSwExtendedSubType::SUB_CMD; - aStr += Expand(); - pThis->nSubType = nOldSubType; - - return aStr; - } - return Expand(); + String aStr(GetTyp()->GetName()); + aStr += ' '; + aStr += const_cast<SwTblField *>(this)->GetCommand(); + return aStr; } // suche den TextNode, in dem das Feld steht @@ -126,21 +116,28 @@ const SwNode* SwTblField::GetNodeOfFormula() const return 0; } +String SwTblField::GetCommand() +{ + if (EXTRNL_NAME != GetNameType()) + { + SwNode const*const pNd = GetNodeOfFormula(); + SwTableNode const*const pTblNd = (pNd) ? pNd->FindTableNode() : 0; + if (pTblNd) + { + PtrToBoxNm( &pTblNd->GetTable() ); + } + } + return (EXTRNL_NAME == GetNameType()) + ? SwTableFormula::GetFormula() + : String(); +} String SwTblField::Expand() const { String aStr; if (nSubType & nsSwExtendedSubType::SUB_CMD) { - if( EXTRNL_NAME != GetNameType() ) - { - const SwNode* pNd = GetNodeOfFormula(); - const SwTableNode* pTblNd = pNd ? pNd->FindTableNode() : 0; - if( pTblNd ) - ((SwTblField*)this)->PtrToBoxNm( &pTblNd->GetTable() ); - } - if( EXTRNL_NAME == GetNameType() ) - aStr = SwTableFormula::GetFormula(); + aStr = const_cast<SwTblField *>(this)->GetCommand(); } else { diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx index f761ef3eaa..ba4fdf79fd 100644 --- a/sw/source/core/fields/usrfld.cxx +++ b/sw/source/core/fields/usrfld.cxx @@ -45,6 +45,7 @@ using namespace ::com::sun::star; using ::rtl::OUString; + /*-------------------------------------------------------------------- Beschreibung: Benutzerfelder --------------------------------------------------------------------*/ @@ -71,17 +72,14 @@ SwField* SwUserField::Copy() const return pTmp; } -String SwUserField::GetCntnt(sal_Bool bName) const +String SwUserField::GetFieldName() const { - if ( bName ) - { String aStr(SwFieldType::GetTypeStr(TYP_USERFLD)); - aStr += ' '; - aStr += GetTyp()->GetName(); - aStr.AppendAscii(" = "); - aStr += ((SwUserFieldType*)GetTyp())->GetContent(); - return aStr; - } - return Expand(); + String aStr(SwFieldType::GetTypeStr(TYP_USERFLD)); + aStr += ' '; + aStr += GetTyp()->GetName(); + aStr.AppendAscii(" = "); + aStr += static_cast<SwUserFieldType*>(GetTyp())->GetContent(); + return aStr; } double SwUserField::GetValue() const diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index f2d21c67ea..ef1bb8e580 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -880,9 +880,8 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) SwCntntNode* pCNd = GetDoc()->GetNodes().GoNext( &aNdIdx ); SwPosition aPos( aNdIdx, SwIndex( pCNd, 0 )); // #i59539: Don't remove all redline - ::PaMCorrAbs( SwNodeIndex( *pDestNd ), - SwNodeIndex( *pDestNd->EndOfSectionNode() ), - aPos ); + SwPaM const tmpPaM(*pDestNd, *pDestNd->EndOfSectionNode()); + ::PaMCorrAbs(tmpPaM, aPos); } bRet = GetDoc()->InsCopyOfTbl( aDestPos, aBoxes, &pSrcNd->GetTable(), @@ -897,7 +896,11 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) SwCntntNode* pCNd = GetDoc()->GetNodes().GoNext( &aNdIdx ); SwPosition aPos( aNdIdx, SwIndex( pCNd, 0 )); // #i59539: Don't remove all redline - ::PaMCorrAbs( PCURCRSR->GetPoint()->nNode, aPos ); + SwNode & rNode(PCURCRSR->GetPoint()->nNode.GetNode()); + SwCntntNode *const pCntntNode( rNode.GetCntntNode() ); + SwPaM const tmpPam(rNode, 0, + rNode, (pCntntNode) ? pCntntNode->Len() : 0); + ::PaMCorrAbs(tmpPam, aPos); } break; // aus der "while"-Schleife heraus diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 7063ab7778..cf89006add 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -28,6 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include <hintids.hxx> #include <svl/itemiter.hxx> #include <svtools/imapobj.hxx> @@ -70,14 +71,15 @@ #include <fldbas.hxx> #include <fmtfld.hxx> #include <swundo.hxx> +#include <frame.hxx> +#include <notxtfrm.hxx> // --> OD 2006-03-06 #125892# #include <HandleAnchorNodeChg.hxx> // <-- #include <frmatr.hxx> -// --> OD 2009-12-29 #i89920# +#include <ndole.hxx> #include <fmtsrnd.hxx> #include <editeng/opaqitem.hxx> -// <-- using ::rtl::OUString; using namespace ::com::sun::star; @@ -1463,6 +1465,12 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference < pFly->ChgRelPos( aTmp ); } } + + SwFlyFrmFmt *pFlyFrmFmt = pFly->GetFmt(); + ASSERT( pFlyFrmFmt, "fly frame format missing!" ); + if ( pFlyFrmFmt ) + pFlyFrmFmt->SetLastFlyFrmPrtRectPos( pFly->Prt().Pos() ); //stores the value of last Prt rect + EndAllAction(); return aResult; @@ -1526,6 +1534,20 @@ const String& SwFEShell::GetFlyName() const } +const uno::Reference < embed::XEmbeddedObject > SwFEShell::GetOleRef() const +{ + uno::Reference < embed::XEmbeddedObject > xObj; + SwFlyFrm * pFly = FindFlyFrm(); + if (pFly && pFly->Lower() && pFly->Lower()->IsNoTxtFrm()) + { + SwOLENode *pNd = ((SwNoTxtFrm*)pFly->Lower())->GetNode()->GetOLENode(); + if (pNd) + xObj = pNd->GetOLEObj().GetOleRef(); + } + return xObj; +} + + String SwFEShell::GetUniqueGrfName() const { return GetDoc()->GetUniqueGrfName(); @@ -2087,6 +2109,95 @@ void SwFEShell::SetObjDescription( const String& rDescription ) } } } -// <-- + + +void SwFEShell::AlignFormulaToBaseline( const uno::Reference < embed::XEmbeddedObject >& xObj, SwFlyFrm * pFly ) +{ +#if OSL_DEBUG_LEVEL > 1 + SvGlobalName aCLSID( xObj->getClassID() ); + const bool bStarMath = ( SotExchange::IsMath( aCLSID ) != 0 ); + ASSERT( bStarMath, "AlignFormulaToBaseline should only be called for Math objects" ); + + if ( !bStarMath ) + return; +#endif + + if (!pFly) + pFly = FindFlyFrm( xObj ); + ASSERT( pFly , "No fly frame!" ); + SwFrmFmt * pFrmFmt = pFly ? pFly->GetFmt() : 0; + + // baseline to baseline alignment should only be applied to formulas anchored as char + if ( pFly && pFrmFmt && FLY_AS_CHAR == pFrmFmt->GetAnchor().GetAnchorId() ) + { + // get baseline from Math object + uno::Any aBaseline; + if( svt::EmbeddedObjectRef::TryRunningState( xObj ) ) + { + uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY ); + if ( xSet.is() ) + { + try + { + aBaseline = xSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BaseLine") ) ); + } + catch ( uno::Exception& ) + { + ASSERT( FALSE , "Baseline could not be retrieved from Starmath!" ); + } + } + } + + sal_Int32 nBaseline = ::comphelper::getINT32(aBaseline); + const MapMode aSourceMapMode( MAP_100TH_MM ); + const MapMode aTargetMapMode( MAP_TWIP ); + nBaseline = OutputDevice::LogicToLogic( nBaseline, aSourceMapMode.GetMapUnit(), aTargetMapMode.GetMapUnit() ); + + ASSERT( nBaseline > 0, "Wrong value of Baseline while retrieving from Starmath!" ); + //nBaseline must be moved by aPrt position + const SwFlyFrmFmt *pFlyFrmFmt = pFly->GetFmt(); + ASSERT( pFlyFrmFmt, "fly frame format missing!" ); + if ( pFlyFrmFmt ) + nBaseline += pFlyFrmFmt->GetLastFlyFrmPrtRectPos().Y(); + + const SwFmtVertOrient &rVert = pFrmFmt->GetVertOrient(); + SwFmtVertOrient aVert( rVert ); + aVert.SetPos( -nBaseline ); + aVert.SetVertOrient( com::sun::star::text::VertOrientation::NONE ); + + pFrmFmt->LockModify(); + pFrmFmt->SetFmtAttr( aVert ); + pFrmFmt->UnlockModify(); + pFly->InvalidatePos(); + } +} + + +void SwFEShell::AlignAllFormulasToBaseline() +{ + StartAllAction(); + + SwStartNode *pStNd; + SwNodeIndex aIdx( *GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 ); + while ( 0 != (pStNd = aIdx.GetNode().GetStartNode()) ) + { + ++aIdx; + SwOLENode *pOleNode = dynamic_cast< SwOLENode * >( &aIdx.GetNode() ); + if ( pOleNode ) + { + const uno::Reference < embed::XEmbeddedObject > & xObj( pOleNode->GetOLEObj().GetOleRef() ); + if (xObj.is()) + { + SvGlobalName aCLSID( xObj->getClassID() ); + if ( SotExchange::IsMath( aCLSID ) ) + AlignFormulaToBaseline( xObj ); + } + } + + aIdx.Assign( *pStNd->EndOfSectionNode(), + 1 ); + } + + EndAllAction(); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index c562aa9f15..3f3771d2d5 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -28,12 +28,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include <com/sun/star/embed/EmbedMisc.hpp> -#include "hintids.hxx" -#ifdef WIN -#define _FESHVIEW_ONLY_INLINE_NEEDED -#endif +#include "hintids.hxx" #include <svx/sdrobjectfilter.hxx> #include <svx/svditer.hxx> @@ -53,6 +51,8 @@ #include <svx/svdpage.hxx> #include <svx/svdpagv.hxx> +#include <IDocumentSettingAccess.hxx> +#include <cmdid.h> #include <poolfmt.hrc> // fuer InitFldTypes #include <frmfmt.hxx> #include <frmatr.hxx> @@ -1211,7 +1211,7 @@ sal_Bool SwFEShell::ShouldObjectBeSelected(const Point& rPt) } } } - // <-- + if ( bRet ) { @@ -1425,10 +1425,12 @@ const SdrObject* SwFEShell::GetBestObject( BOOL bNext, USHORT eType, BOOL bFlat, break; } - if(((bNext? (aPos.Y() < aCurPos.Y()) : // nur unter mir + 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())) + ) || // " reverse (aBestPos.Y() == aCurPos.Y() && (bNext? (aBestPos.X() > aCurPos.X()) : // weiter links (aBestPos.X() < aCurPos.X())))) // " reverse @@ -2470,26 +2472,32 @@ BYTE SwFEShell::IsSelObjProtected( USHORT eType ) const nChk |= ( pObj->IsMoveProtect() ? FLYPROTECT_POS : 0 ) | ( pObj->IsResizeProtect()? FLYPROTECT_SIZE : 0 ); - if( FLYPROTECT_CONTENT & eType && pObj->ISA(SwVirtFlyDrawObj) ) + if( pObj->ISA(SwVirtFlyDrawObj) ) { SwFlyFrm *pFly = ((SwVirtFlyDrawObj*)pObj)->GetFlyFrm(); - if ( pFly->GetFmt()->GetProtect().IsCntntProtected() ) + if ( (FLYPROTECT_CONTENT & eType) && pFly->GetFmt()->GetProtect().IsCntntProtected() ) nChk |= FLYPROTECT_CONTENT; if ( pFly->Lower() && pFly->Lower()->IsNoTxtFrm() ) { SwOLENode *pNd = ((SwCntntFrm*)pFly->Lower())->GetNode()->GetOLENode(); - if ( pNd ) + uno::Reference < embed::XEmbeddedObject > xObj( pNd ? pNd->GetOLEObj().GetOleRef() : 0 ); + if ( xObj.is() ) { - uno::Reference < embed::XEmbeddedObject > xObj = pNd->GetOLEObj().GetOleRef(); - // TODO/LATER: use correct aspect - if ( xObj.is() && - embed::EmbedMisc::EMBED_NEVERRESIZE & xObj->getStatus( embed::Aspects::MSOLE_CONTENT ) ) + const bool bNeverResize = (embed::EmbedMisc::EMBED_NEVERRESIZE & xObj->getStatus( embed::Aspects::MSOLE_CONTENT )); + if ( (FLYPROTECT_CONTENT & eType) && bNeverResize ) { nChk |= FLYPROTECT_SIZE; nChk |= FLYPROTECT_FIXED; } + + // set FLYPROTECT_POS if it is a Math object anchored 'as char' and baseline alignment is activated + const bool bProtectMathPos = SotExchange::IsMath( xObj->getClassID() ) + && FLY_AS_CHAR == pFly->GetFmt()->GetAnchor().GetAnchorId() + && pDoc->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ); + if ((FLYPROTECT_POS & eType) && bProtectMathPos) + nChk |= FLYPROTECT_POS; } } } diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index f2fd211c77..8c7029f2fb 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -37,6 +37,7 @@ #include <basegfx/vector/b2dvector.hxx> #include <svx/svxids.hrc> #include <editeng/protitem.hxx> +#include <editeng/protitem.hxx> #include <editeng/brshitem.hxx> #include <editeng/frmdiritem.hxx> #include <svtools/ruler.hxx> diff --git a/sw/source/core/frmedt/makefile.mk b/sw/source/core/frmedt/makefile.mk deleted file mode 100644 index 57baf675aa..0000000000 --- a/sw/source/core/frmedt/makefile.mk +++ /dev/null @@ -1,76 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=frmedt - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - - -.IF "$(mydebug)" != "" -CDEFS+=-Dmydebug -.ENDIF - -# --- Files -------------------------------------------------------- - -CXXFILES = \ - fecopy.cxx \ - fedesc.cxx \ - fefly1.cxx \ - feflyole.cxx \ - feshview.cxx \ - fetab.cxx \ - fews.cxx \ - tblsel.cxx - - - -SLOFILES = $(EXCEPTIONSFILES) - -EXCEPTIONSFILES=\ - $(SLO)$/fecopy.obj \ - $(SLO)$/fedesc.obj \ - $(SLO)$/fefly1.obj \ - $(SLO)$/feflyole.obj \ - $(SLO)$/feshview.obj \ - $(SLO)$/fetab.obj \ - $(SLO)$/fews.obj \ - $(SLO)$/tblsel.obj - - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 633d354ad2..817c2b9579 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -56,6 +56,7 @@ // OD 26.08.2003 #i18103# #include <sectfrm.hxx> #include <frmtool.hxx> +#include <deque> //siehe auch swtable.cxx #define COLFUZZY 20L @@ -153,8 +154,7 @@ struct _Sort_CellFrm : pFrm( &rCFrm ) {} }; -SV_DECL_VARARR( _Sort_CellFrms, _Sort_CellFrm, 16, 16 ) -SV_IMPL_VARARR( _Sort_CellFrms, _Sort_CellFrm ) +typedef std::deque< _Sort_CellFrm > _Sort_CellFrms; SV_IMPL_PTRARR( SwChartBoxes, SwTableBoxPtr ); SV_IMPL_PTRARR( SwChartLines, SwChartBoxes* ); @@ -617,9 +617,8 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, rUnion.Top() <= nFrmBottom && nFrmBottom <= nUnionBottom+ nYFuzzy ) - aCellFrms.Insert( - _Sort_CellFrm( *(SwCellFrm*)pCell ), - aCellFrms.Count() ); + aCellFrms.push_back( + _Sort_CellFrm( *(SwCellFrm*)pCell) ); else { bValidChartSel = FALSE; @@ -644,12 +643,12 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, // alle Zellen der (Teil-)Tabelle zusammen. Dann teste mal ob // all huebsch nebeneinander liegen. - USHORT n, nEnd, nCellCnt = 0; + size_t n, nCellCnt = 0; long nYPos = LONG_MAX; long nXPos = 0; long nHeight = 0; - for( n = 0, nEnd = aCellFrms.Count(); n < nEnd; ++n ) + for( n = 0 ; n < aCellFrms.size(); ++n ) { const _Sort_CellFrm& rCF = aCellFrms[ n ]; if( (rCF.pFrm->Frm().*fnRect->fnGetTop)() != nYPos ) @@ -700,7 +699,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, { nYPos = LONG_MAX; SwChartBoxes* pBoxes = 0; - for( n = 0, nEnd = aCellFrms.Count(); n < nEnd; ++n ) + for( n = 0; n < aCellFrms.size(); ++n ) { const _Sort_CellFrm& rCF = aCellFrms[ n ]; if( (rCF.pFrm->Frm().*fnRect->fnGetTop)() != nYPos ) @@ -1722,8 +1721,8 @@ void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart, (!pTmp->IsCellFrm() || ( ( ! bRTL && (pTmp->Frm().*fnRect->fnGetLeft)() < nSX && (pTmp->Frm().*fnRect->fnGetRight)()< nSX2 ) || - (bRTL && (pTmp->Frm().*fnRect->fnGetLeft)() > nSX && - (pTmp->Frm().*fnRect->fnGetRight)()> nSX2) ) ) ) + ( bRTL && (pTmp->Frm().*fnRect->fnGetLeft)() > nSX && + (pTmp->Frm().*fnRect->fnGetRight)()> nSX2 ) ) ) ) pTmp = pTmp->GetNextLayoutLeaf(); if ( pTmp ) diff --git a/sw/source/core/graphic/makefile.mk b/sw/source/core/graphic/makefile.mk deleted file mode 100644 index bb637de666..0000000000 --- a/sw/source/core/graphic/makefile.mk +++ /dev/null @@ -1,53 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=graphic - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/grfatr.obj \ - $(SLO)$/ndgrf.obj - -EXCEPTIONSFILES= \ - $(SLO)$/ndgrf.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/inc/bookmrk.hxx b/sw/source/core/inc/bookmrk.hxx index 88683ca2e8..b5168b2b27 100644 --- a/sw/source/core/inc/bookmrk.hxx +++ b/sw/source/core/inc/bookmrk.hxx @@ -40,7 +40,6 @@ #include <IMark.hxx> - namespace com { namespace sun { namespace star { namespace text { class XTextContent; } } } } diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx index 1de092aa96..09b2874de6 100644 --- a/sw/source/core/inc/cellfrm.hxx +++ b/sw/source/core/inc/cellfrm.hxx @@ -25,8 +25,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _CELLFRM_HXX -#define _CELLFRM_HXX +#ifndef SW_CELLFRM_HXX +#define SW_CELLFRM_HXX #include <tools/mempool.hxx> @@ -49,7 +49,8 @@ public: virtual BOOL GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* = 0 ) const; virtual void Modify( SfxPoolItem*, SfxPoolItem* ); - virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const; + virtual void Paint( SwRect const&, + SwPrintData const*const pPrintData = NULL ) const; virtual void CheckDirection( BOOL bVert ); // --> OD 2010-02-17 #i103961# diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx index 0a5cad49bc..3b5f57ec12 100644 --- a/sw/source/core/inc/flyfrm.hxx +++ b/sw/source/core/inc/flyfrm.hxx @@ -25,13 +25,13 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _FLYFRM_HXX -#define _FLYFRM_HXX +#ifndef SW_FLYFRM_HXX +#define SW_FLYFRM_HXX #include "layfrm.hxx" +#include "frmfmt.hxx" class SwPageFrm; -class SwFlyFrmFmt; class SwFmtFrmSize; struct SwCrsrMoveState; class SwBorderAttrs; @@ -159,7 +159,8 @@ public: virtual void Modify( SfxPoolItem*, SfxPoolItem* ); // erfrage vom Client Informationen virtual BOOL GetInfo( SfxPoolItem& ) const; - virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const; + virtual void Paint( SwRect const&, + SwPrintData const*const pPrintData = NULL ) const; virtual Size ChgSize( const Size& aNewSize ); virtual BOOL GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* = 0 ) const; @@ -284,6 +285,12 @@ public: @author OD */ virtual bool IsFormatPossible() const; + + // overwriting "SwFrmFmt *SwLayoutFrm::GetFmt" to provide the correct derived return type. + // (This is in order to skip on the otherwise necessary casting of the result to + // 'SwFlyFrmFmt *' after calls to this function. The casting is now done in this function.) + virtual const SwFlyFrmFmt *GetFmt() const; + virtual SwFlyFrmFmt *GetFmt(); }; #endif diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx index 20aaf569b9..afcaa814dd 100644 --- a/sw/source/core/inc/frame.hxx +++ b/sw/source/core/inc/frame.hxx @@ -25,8 +25,9 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _FRAME_HXX -#define _FRAME_HXX +#ifndef SW_FRAME_HXX +#define SW_FRAME_HXX + #include <svl/svarray.hxx> #include <editeng/borderline.hxx> #include "swtypes.hxx" // fuer SwTwips @@ -60,7 +61,7 @@ class SvxBrushItem; class SwSelectionList; struct SwPosition; struct SwCrsrMoveState; -class SwPrtOptions; +class SwPrintData; // --> OD 2004-07-06 #i28701# class SwSortedObjs; @@ -830,7 +831,8 @@ public: SwCrsrMoveState* = 0 ) const; virtual BOOL GetCharRect( SwRect &, const SwPosition&, SwCrsrMoveState* = 0 ) const; - virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const; + virtual void Paint( SwRect const&, + SwPrintData const*const pPrintData = NULL ) const; // der "kurze Dienstweg" zwischen den Frames und der Formatierung. // Wer den void* falsch Casted ist selbst schuld! diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx index f4684e56f0..1ddc3c63fa 100644 --- a/sw/source/core/inc/layfrm.hxx +++ b/sw/source/core/inc/layfrm.hxx @@ -25,8 +25,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _LAYFRM_HXX -#define _LAYFRM_HXX +#ifndef SW_LAYFRM_HXX +#define SW_LAYFRM_HXX #include "frame.hxx" @@ -106,7 +106,8 @@ public: SwLayoutFrm( SwFrmFmt* ); ~SwLayoutFrm(); - virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const; + virtual void Paint( SwRect const&, + SwPrintData const*const pPrintData = NULL ) const; const SwFrm *Lower() const { return pLower; } SwFrm *Lower() { return pLower; } const SwCntntFrm *ContainsCntnt() const; @@ -124,9 +125,9 @@ public: // <-- BOOL IsAnLower( const SwFrm * ) const; - const SwFrmFmt *GetFmt() const { return (const SwFrmFmt*)GetDep(); } - SwFrmFmt *GetFmt() { return (SwFrmFmt*)GetDep(); } - void SetFrmFmt( SwFrmFmt* ); + virtual const SwFrmFmt *GetFmt() const; + virtual SwFrmFmt *GetFmt(); + void SetFrmFmt( SwFrmFmt* ); //Verschieben der Ftns aller Lower - ab dem StartCntnt. //TRUE wenn mindestens eine Ftn verschoben wurde. @@ -207,6 +208,6 @@ inline SwFrm* SwLayoutFrm::GetLastLower() return const_cast<SwFrm*>(static_cast<const SwLayoutFrm*>(this)->GetLastLower()); } -#endif //_LAYFRM_HXX +#endif // SW_LAYFRM_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/inc/makefile.mk b/sw/source/core/inc/makefile.mk deleted file mode 100644 index 1b35ca4954..0000000000 --- a/sw/source/core/inc/makefile.mk +++ /dev/null @@ -1,26 +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. -# -#************************************************************************* diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx index da9a4389d5..4d651b528c 100644 --- a/sw/source/core/inc/mvsave.hxx +++ b/sw/source/core/inc/mvsave.hxx @@ -25,9 +25,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _MVSAVE_HXX -#define _MVSAVE_HXX - +#ifndef SW_MVSAVE_HXX +#define SW_MVSAVE_HXX #include <tools/string.hxx> #include <vcl/keycod.hxx> @@ -149,25 +148,10 @@ public: // Crsr verschieben kann // die Funktionen rufen nicht die SwDoc::Corr - Methoden! - // Setzt alle PaMs an OldPos auf NewPos + Offset -void PaMCorrAbs( const SwPosition &rOldPos, - const SwPosition &rNewPos, - const xub_StrLen nOffset = 0 ); - - // Setzt alle PaMs in OldNode auf NewPos + Offset -void PaMCorrAbs( const SwNodeIndex &rOldNode, - const SwPosition &rNewPos, - const xub_StrLen nOffset = 0 ); - // Setzt alle PaMs im Bereich vom Range nach NewPos void PaMCorrAbs( const SwPaM& rRange, const SwPosition& rNewPos ); - // Setzt alle PaMs im Bereich von [StartNode, EndNode] nach NewPos -void PaMCorrAbs( const SwNodeIndex &rStartNode, - const SwNodeIndex &rEndNode, - const SwPosition &rNewPos ); - // Setzt alle PaMs in OldNode auf relative Pos void PaMCorrRel( const SwNodeIndex &rOldNode, const SwPosition &rNewPos, @@ -226,6 +210,6 @@ public: }; -#endif // _MVSAVE_HXX +#endif // SW_MVSAVE_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/inc/notxtfrm.hxx b/sw/source/core/inc/notxtfrm.hxx index 394149a5d8..00c6a604ca 100644 --- a/sw/source/core/inc/notxtfrm.hxx +++ b/sw/source/core/inc/notxtfrm.hxx @@ -25,8 +25,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _NOTXTFRM_HXX -#define _NOTXTFRM_HXX +#ifndef SW_NOTXTFRM_HXX +#define SW_NOTXTFRM_HXX #include <cntfrm.hxx> @@ -57,7 +57,8 @@ public: ~SwNoTxtFrm(); virtual void Modify( SfxPoolItem*, SfxPoolItem* ); - virtual void Paint(const SwRect&, const SwPrtOptions *pPrintData = NULL ) const; + virtual void Paint( SwRect const&, + SwPrintData const*const pPrintData = NULL ) const; virtual BOOL GetCharRect( SwRect &, const SwPosition&, SwCrsrMoveState* = 0) const; BOOL GetCrsrOfst(SwPosition* pPos, Point& aPoint, diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx index 89c73b4bbf..9732ee27d3 100644 --- a/sw/source/core/inc/rootfrm.hxx +++ b/sw/source/core/inc/rootfrm.hxx @@ -25,8 +25,9 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _ROOTFRM_HXX -#define _ROOTFRM_HXX +#ifndef SW_ROOTFRM_HXX +#define SW_ROOTFRM_HXX + #include "layfrm.hxx" class SwCntntFrm; @@ -198,7 +199,8 @@ public: virtual BOOL GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* = 0 ) const; - virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const; + virtual void Paint( SwRect const&, + SwPrintData const*const pPrintData = NULL ) const; virtual SwTwips ShrinkFrm( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE ); virtual SwTwips GrowFrm ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE ); #if OSL_DEBUG_LEVEL > 1 @@ -362,6 +364,6 @@ inline void SwRootFrm::SetVirtPageNum( const BOOL bOf) const ((SwRootFrm*)this)->bIsVirtPageNum = bOf; } -#endif //_ROOTFRM_HXX +#endif // SW_ROOTFRM_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx index 5b46b8d078..43e0f3d9dd 100644 --- a/sw/source/core/inc/scriptinfo.hxx +++ b/sw/source/core/inc/scriptinfo.hxx @@ -140,24 +140,24 @@ public: inline BYTE GetDefaultDir() const { return nDefaultDir; }; // array operations, nCnt refers to array position - inline USHORT CountScriptChg() const; - inline xub_StrLen GetScriptChg( const USHORT nCnt ) const; + inline size_t CountScriptChg() const; + inline xub_StrLen GetScriptChg( const size_t nCnt ) const; inline BYTE GetScriptType( const USHORT nCnt ) const; - inline USHORT CountDirChg() const; - inline xub_StrLen GetDirChg( const USHORT nCnt ) const; - inline BYTE GetDirType( const USHORT nCnt ) const; + inline size_t CountDirChg() const; + inline xub_StrLen GetDirChg( const size_t nCnt ) const; + inline BYTE GetDirType( const size_t nCnt ) const; - inline USHORT CountKashida() const; - inline xub_StrLen GetKashida( const USHORT nCnt ) const; + inline size_t CountKashida() const; + inline xub_StrLen GetKashida( const size_t nCnt ) const; - inline USHORT CountCompChg() const; - inline xub_StrLen GetCompStart( const USHORT nCnt ) const; - inline xub_StrLen GetCompLen( const USHORT nCnt ) const; - inline BYTE GetCompType( const USHORT nCnt ) const; + inline size_t CountCompChg() const; + inline xub_StrLen GetCompStart( const size_t nCnt ) const; + inline xub_StrLen GetCompLen( const size_t nCnt ) const; + inline BYTE GetCompType( const size_t nCnt ) const; - inline USHORT CountHiddenChg() const; - inline xub_StrLen GetHiddenChg( const USHORT nCnt ) const; + inline size_t CountHiddenChg() const; + inline xub_StrLen GetHiddenChg( const size_t nCnt ) const; static void CalcHiddenRanges( const SwTxtNode& rNode, MultiSelection& rHiddenMulti ); @@ -357,8 +357,8 @@ inline void SwScriptInfo::SetInvalidity( const xub_StrLen nPos ) if ( nPos < nInvalidityPos ) nInvalidityPos = nPos; }; -inline USHORT SwScriptInfo::CountScriptChg() const { return aScriptChg.Count(); } -inline xub_StrLen SwScriptInfo::GetScriptChg( const USHORT nCnt ) const +inline size_t SwScriptInfo::CountScriptChg() const { return aScriptChg.size(); } +inline xub_StrLen SwScriptInfo::GetScriptChg( const size_t nCnt ) const { OSL_ENSURE( nCnt < aScriptChg.Count(),"No ScriptChange today!"); return aScriptChg[ nCnt ]; @@ -369,45 +369,45 @@ inline BYTE SwScriptInfo::GetScriptType( const xub_StrLen nCnt ) const return aScriptType[ nCnt ]; } -inline USHORT SwScriptInfo::CountDirChg() const { return aDirChg.Count(); } -inline xub_StrLen SwScriptInfo::GetDirChg( const USHORT nCnt ) const +inline size_t SwScriptInfo::CountDirChg() const { return aDirChg.size(); } +inline xub_StrLen SwScriptInfo::GetDirChg( const size_t nCnt ) const { OSL_ENSURE( nCnt < aDirChg.Count(),"No DirChange today!"); return aDirChg[ nCnt ]; } -inline BYTE SwScriptInfo::GetDirType( const xub_StrLen nCnt ) const +inline BYTE SwScriptInfo::GetDirType( const size_t nCnt ) const { OSL_ENSURE( nCnt < aDirChg.Count(),"No DirType today!"); return aDirType[ nCnt ]; } -inline USHORT SwScriptInfo::CountKashida() const { return aKashida.Count(); } -inline xub_StrLen SwScriptInfo::GetKashida( const USHORT nCnt ) const +inline size_t SwScriptInfo::CountKashida() const { return aKashida.size(); } +inline xub_StrLen SwScriptInfo::GetKashida( const size_t nCnt ) const { OSL_ENSURE( nCnt < aKashida.Count(),"No Kashidas today!"); return aKashida[ nCnt ]; } -inline USHORT SwScriptInfo::CountCompChg() const { return aCompChg.Count(); }; -inline xub_StrLen SwScriptInfo::GetCompStart( const USHORT nCnt ) const +inline size_t SwScriptInfo::CountCompChg() const { return aCompChg.size(); }; +inline xub_StrLen SwScriptInfo::GetCompStart( const size_t nCnt ) const { OSL_ENSURE( nCnt < aCompChg.Count(),"No CompressionStart today!"); return aCompChg[ nCnt ]; } -inline xub_StrLen SwScriptInfo::GetCompLen( const USHORT nCnt ) const +inline xub_StrLen SwScriptInfo::GetCompLen( const size_t nCnt ) const { OSL_ENSURE( nCnt < aCompChg.Count(),"No CompressionLen today!"); return aCompLen[ nCnt ]; } -inline BYTE SwScriptInfo::GetCompType( const USHORT nCnt ) const +inline BYTE SwScriptInfo::GetCompType( const size_t nCnt ) const { OSL_ENSURE( nCnt < aCompChg.Count(),"No CompressionType today!"); return aCompType[ nCnt ]; } -inline USHORT SwScriptInfo::CountHiddenChg() const { return aHiddenChg.Count(); }; -inline xub_StrLen SwScriptInfo::GetHiddenChg( const USHORT nCnt ) const +inline size_t SwScriptInfo::CountHiddenChg() const { return aHiddenChg.size(); }; +inline xub_StrLen SwScriptInfo::GetHiddenChg( const size_t nCnt ) const { OSL_ENSURE( nCnt < aHiddenChg.Count(),"No HiddenChg today!"); return aHiddenChg[ nCnt ]; diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx index fda31c5f3b..e03a903737 100644 --- a/sw/source/core/inc/tabfrm.hxx +++ b/sw/source/core/inc/tabfrm.hxx @@ -25,8 +25,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _TABFRM_HXX -#define _TABFRM_HXX +#ifndef SW_TABFRM_HXX +#define SW_TABFRM_HXX #include <tools/mempool.hxx> #include "layfrm.hxx" @@ -130,7 +130,8 @@ public: virtual void Modify( SfxPoolItem*, SfxPoolItem* ); virtual BOOL GetInfo( SfxPoolItem &rHnt ) const; - virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const; + virtual void Paint( SwRect const&, + SwPrintData const*const pPrintData = NULL ) const; virtual void CheckDirection( BOOL bVert ); virtual void Cut(); @@ -231,6 +232,6 @@ inline SwTabFrm *SwTabFrm::GetFollow() return (SwTabFrm*)SwFlowFrm::GetFollow(); } -#endif //_TABFRM_HXX +#endif // SW_TABFRM_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/inc/txmsrt.hxx b/sw/source/core/inc/txmsrt.hxx index f6459b4b55..324db37979 100644 --- a/sw/source/core/inc/txmsrt.hxx +++ b/sw/source/core/inc/txmsrt.hxx @@ -25,8 +25,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _TXMSRT_HXX -#define _TXMSRT_HXX +#ifndef SW_TXMSRT_HXX +#define SW_TXMSRT_HXX #include <i18npool/lang.h> #include <tox.hxx> @@ -155,7 +155,7 @@ private: String sSortTxt; String sSortTxtReading; - virtual void _GetText( String&, String& ) = 0; + virtual void GetText_Impl( String&, String& ) const = 0; }; inline void SwTOXSortTabBase::GetTxt( String& rSortTxt, @@ -164,7 +164,7 @@ inline void SwTOXSortTabBase::GetTxt( String& rSortTxt, if( !bValidTxt ) { SwTOXSortTabBase* pThis = (SwTOXSortTabBase*)this; - pThis->_GetText( pThis->sSortTxt, pThis->sSortTxtReading ); + pThis->GetText_Impl( pThis->sSortTxt, pThis->sSortTxtReading ); pThis->bValidTxt = TRUE; } @@ -195,7 +195,7 @@ struct SwTOXIndex : public SwTOXSortTabBase virtual BOOL operator<( const SwTOXSortTabBase& ); private: - virtual void _GetText( String&, String& ); + virtual void GetText_Impl( String&, String& ) const; BYTE nKeyLevel; }; @@ -212,7 +212,7 @@ struct SwTOXCustom : public SwTOXSortTabBase virtual BOOL operator<( const SwTOXSortTabBase& ); private: - virtual void _GetText( String&, String& ); + virtual void GetText_Impl( String&, String& ) const; String aKey; String sReading; @@ -232,7 +232,7 @@ struct SwTOXContent : public SwTOXSortTabBase virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT nAuthField = 0 ) const; virtual USHORT GetLevel() const; private: - virtual void _GetText( String&, String& ); + virtual void GetText_Impl( String&, String& ) const; }; @@ -249,7 +249,7 @@ struct SwTOXPara : public SwTOXSortTabBase virtual String GetURL() const; private: - virtual void _GetText( String&, String& ); + virtual void GetText_Impl( String&, String& ) const; SwTOXElement eType; USHORT m_nLevel; @@ -268,7 +268,7 @@ struct SwTOXTable : public SwTOXSortTabBase virtual String GetURL() const; private: - virtual void _GetText( String&, String& ); + virtual void GetText_Impl( String&, String& ) const; USHORT nLevel; }; @@ -278,7 +278,7 @@ struct SwTOXAuthority : public SwTOXSortTabBase private: SwFmtFld& m_rField; virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT nAuthField = 0 ) const; - virtual void _GetText( String&, String& ); + virtual void GetText_Impl( String&, String& ) const; public: SwTOXAuthority( const SwCntntNode& rNd, SwFmtFld& rField, const SwTOXInternational& rIntl ); @@ -292,6 +292,6 @@ public: }; -#endif // _TXMSRT_HXX +#endif // SW_TXMSRT_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx index 6190259f09..a37417cf17 100644 --- a/sw/source/core/inc/txtfrm.hxx +++ b/sw/source/core/inc/txtfrm.hxx @@ -25,8 +25,9 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _TXTFRM_HXX -#define _TXTFRM_HXX +#ifndef SW_TXTFRM_HXX +#define SW_TXTFRM_HXX + #include <tools/mempool.hxx> #include <tools/string.hxx> #include "cntfrm.hxx" @@ -291,7 +292,8 @@ public: void PaintExtraData( const SwRect & rRect ) const; //Seitennummer usw. SwRect Paint(); - virtual void Paint( const SwRect &, const SwPrtOptions *pPrintData = NULL ) const; + virtual void Paint( SwRect const&, + SwPrintData const*const pPrintData = NULL ) const; virtual void Modify( SfxPoolItem*, SfxPoolItem* ); virtual sal_Bool GetInfo( SfxPoolItem & ) const; diff --git a/sw/source/core/inc/unometa.hxx b/sw/source/core/inc/unometa.hxx index b7c73f7930..b7c73f7930 100644..100755 --- a/sw/source/core/inc/unometa.hxx +++ b/sw/source/core/inc/unometa.hxx diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx index c235c2f61c..e7895c1484 100644 --- a/sw/source/core/inc/viewimp.hxx +++ b/sw/source/core/inc/viewimp.hxx @@ -25,8 +25,10 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _VIEWIMP_HXX -#define _VIEWIMP_HXX +#ifndef SW_VIEWIMP_HXX +#define SW_VIEWIMP_HXX + +#include <vector> #include <vcl/timer.hxx> #include <tools/color.hxx> @@ -54,10 +56,9 @@ struct SdrPaintProcRec; class SwAccessibleMap; class SdrObject; class Fraction; -class SwPrtOptions; +class SwPrintData; class SwPagePreviewLayout; struct PrevwPage; -#include <vector> class SwTxtFrm; class SwViewImp @@ -216,7 +217,7 @@ public: // and <heaven>. // OD 25.06.2003 #108784# - correct type of 1st parameter void PaintLayer( const SdrLayerID _nLayerID, - const SwPrtOptions *pPrintData, + SwPrintData const*const pPrintData, const SwRect& _rRect, const Color* _pPageBackgrdColor = 0, const bool _bIsPageRightToLeft = false ) const; @@ -361,6 +362,6 @@ inline void SwViewImp::AddAccessibleObj( const SdrObject *pObj ) SwRect aEmptyRect; MoveAccessible( 0, pObj, aEmptyRect ); } -#endif //_VIEWIMP_HXX +#endif // SW_VIEWIMP_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx index 44cafd0203..074f5efc00 100644 --- a/sw/source/core/layout/dbg_lay.cxx +++ b/sw/source/core/layout/dbg_lay.cxx @@ -30,6 +30,7 @@ #include "precompiled_sw.hxx" /* -------------------------------------------------- + * Und hier die Beschreibung: * * Durch die PROTOCOL-Makros wird es ermoeglicht, Ereignisse im Frame-Methoden zu protokollieren. @@ -864,5 +865,6 @@ void SwFrmChangesLeave::Leave() SwProtocol::Record( pFrm, PROT_FRMCHANGES, 0, &aFrm ); } +#endif // DBG_UTIL /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index 386b1ad494..cd8e114e5c 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -1240,6 +1240,7 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos ) aHori.SetPos( nTmpX ); aSet.Put( aHori ); } + SetCurrRelPos( rNewPos ); pFmt->GetDoc()->SetAttr( aSet, *pFmt ); } } @@ -2761,4 +2762,14 @@ bool SwFlyFrm::IsFormatPossible() const !IsLocked() && !IsColLocked(); } +const SwFlyFrmFmt * SwFlyFrm::GetFmt() const +{ + return static_cast< const SwFlyFrmFmt * >( GetDep() ); +} + +SwFlyFrmFmt * SwFlyFrm::GetFmt() +{ + return static_cast< SwFlyFrmFmt * >( GetDep() ); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 2f1c9ca4c6..bcc84ee406 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -1049,7 +1049,7 @@ static bool lcl_IsInvaLay( const SwFrm *pFrm, long nBottom ) { if ( !pFrm->IsValid() || - (pFrm->IsCompletePaint() && pFrm->Frm().Top() < nBottom) + (pFrm->IsCompletePaint() && ( pFrm->Frm().Top() < nBottom ) ) ) { return true; @@ -1059,7 +1059,15 @@ static bool lcl_IsInvaLay( const SwFrm *pFrm, long nBottom ) static const SwFrm *lcl_FindFirstInvaLay( const SwFrm *pFrm, long nBottom ) { - OSL_ENSURE( pFrm->IsLayoutFrm(), "FindFirstInvaLay, no LayFrm" ); + if ( + !pFrm->IsValid() || + (pFrm->IsCompletePaint() && pFrm->Frm().Top() < nBottom) + ) + { + return true; + } + return false; +} if (lcl_IsInvaLay(pFrm, nBottom)) return pFrm; @@ -2383,7 +2391,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) : #endif bVis = ((SwCrsrShell*)pSh)->GetCharRect().IsOver(pSh->VisArea()); } - aBools.Insert( bVis, aBools.Count() ); + aBools.push_back( bVis ); pSh = (ViewShell*)pSh->GetNext(); } while ( pSh != pImp->GetShell() ); diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx index a2ec1d26dc..4170f3e433 100644 --- a/sw/source/core/layout/laycache.cxx +++ b/sw/source/core/layout/laycache.cxx @@ -103,7 +103,7 @@ void SwLayCacheImpl::Insert( USHORT nType, ULONG nIndex, xub_StrLen nOffset ) { aType.Insert( nType, aType.Count() ); SvULongs::Insert( nIndex, SvULongs::Count() ); - aOffset.Insert( nOffset, aOffset.Count() ); + aOffset.push_back( nOffset ); } BOOL SwLayCacheImpl::Read( SvStream& rStream ) @@ -1186,12 +1186,12 @@ SwLayCacheIoImpl::SwLayCacheIoImpl( SvStream& rStrm, BOOL bWrtMd ) : BOOL SwLayCacheIoImpl::OpenRec( BYTE cType ) { BOOL bRes = TRUE; - UINT16 nLvl = aRecTypes.Count(); + size_t nLvl = aRecTypes.size(); OSL_ENSURE( nLvl == aRecSizes.Count(), "OpenRec: Level" ); UINT32 nPos = pStream->Tell(); if( bWriteMode ) { - aRecTypes.Insert( cType, nLvl ); + aRecTypes.push_back( cType ); aRecSizes.Insert( nPos, nLvl ); *pStream << (UINT32) 0; } @@ -1200,7 +1200,7 @@ BOOL SwLayCacheIoImpl::OpenRec( BYTE cType ) UINT32 nVal; *pStream >> nVal; BYTE cRecTyp = (BYTE)nVal; - aRecTypes.Insert( cRecTyp, nLvl ); + aRecTypes.push_back( cRecTyp ); sal_uInt32 nSize = nVal >> 8; aRecSizes.Insert( nPos + nSize, nLvl ); if( !nVal || cRecTyp != cType || @@ -1209,7 +1209,7 @@ BOOL SwLayCacheIoImpl::OpenRec( BYTE cType ) OSL_ENSURE( nVal, "OpenRec: Record-Header is 0" ); OSL_ENSURE( cRecTyp == cType, "OpenRec: Wrong Record Type" ); - aRecTypes[nLvl] = 0; + aRecTypes.back() = 0; aRecSizes[nLvl] = pStream->Tell(); bRes = sal_False; bError = TRUE; @@ -1223,7 +1223,7 @@ BOOL SwLayCacheIoImpl::OpenRec( BYTE cType ) BOOL SwLayCacheIoImpl::CloseRec( BYTE ) { BOOL bRes = TRUE; - UINT16 nLvl = aRecTypes.Count(); + size_t nLvl = aRecTypes.size(); OSL_ENSURE( nLvl == aRecSizes.Count(), "CloseRec: wrong Level" ); OSL_ENSURE( nLvl, "CloseRec: no levels" ); if( nLvl ) @@ -1235,7 +1235,7 @@ BOOL SwLayCacheIoImpl::CloseRec( BYTE ) UINT32 nBgn = aRecSizes[nLvl]; pStream->Seek( nBgn ); UINT32 nSize = nPos - nBgn; - UINT32 nVal = ( nSize << 8 ) | aRecTypes[nLvl]; + UINT32 nVal = ( nSize << 8 ) | aRecTypes.back(); *pStream << nVal; pStream->Seek( nPos ); if( pStream->GetError() != SVSTREAM_OK ) @@ -1255,7 +1255,7 @@ BOOL SwLayCacheIoImpl::CloseRec( BYTE ) bRes = FALSE; } - aRecTypes.Remove( nLvl, 1 ); + aRecTypes.pop_back(); aRecSizes.Remove( nLvl, 1 ); } diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx index 71f74a2d7a..baa3b81e26 100644 --- a/sw/source/core/layout/layhelp.hxx +++ b/sw/source/core/layout/layhelp.hxx @@ -72,11 +72,11 @@ class SwLayCacheImpl : public SvULongs void Insert( USHORT nType, ULONG nIndex, xub_StrLen nOffset ); public: - SwLayCacheImpl() : SvULongs( 20, 10 ), aOffset( 20, 10 ), aType( 20, 10 ) {} + SwLayCacheImpl() : SvULongs( 20, 10 ), aType( 20, 10 ) {} BOOL Read( SvStream& rStream ); ULONG GetBreakIndex( USHORT nIdx ) const { return GetObject( nIdx ); } - xub_StrLen GetBreakOfst( USHORT nIdx ) const { return aOffset[ nIdx ]; } + xub_StrLen GetBreakOfst( size_t nIdx ) const { return aOffset[ nIdx ]; } USHORT GetBreakType( USHORT nIdx ) const { return aType[ nIdx ]; } USHORT GetFlyCount() const { return aFlyCache.Count(); } diff --git a/sw/source/core/layout/makefile.mk b/sw/source/core/layout/makefile.mk deleted file mode 100644 index e986ec8cf4..0000000000 --- a/sw/source/core/layout/makefile.mk +++ /dev/null @@ -1,101 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=layout - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(mydebug)" != "" -CDEFS+=-Dmydebug -.ENDIF - -.IF "$(madebug)" != "" -CDEFS+=-DDEBUG -.ENDIF - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES = \ - $(SLO)$/anchoreddrawobject.obj \ - $(SLO)$/anchoredobject.obj \ - $(SLO)$/atrfrm.obj \ - $(SLO)$/calcmove.obj \ - $(SLO)$/colfrm.obj \ - $(SLO)$/findfrm.obj \ - $(SLO)$/flowfrm.obj \ - $(SLO)$/fly.obj \ - $(SLO)$/flycnt.obj \ - $(SLO)$/flyincnt.obj \ - $(SLO)$/flylay.obj \ - $(SLO)$/flypos.obj \ - $(SLO)$/frmtool.obj \ - $(SLO)$/ftnfrm.obj \ - $(SLO)$/hffrm.obj \ - $(SLO)$/layact.obj \ - $(SLO)$/laycache.obj \ - $(SLO)$/layouter.obj \ - $(SLO)$/movedfwdfrmsbyobjpos.obj \ - $(SLO)$/newfrm.obj \ - $(SLO)$/objectformatter.obj \ - $(SLO)$/objstmpconsiderwrapinfl.obj \ - $(SLO)$/pagechg.obj \ - $(SLO)$/pagedesc.obj \ - $(SLO)$/paintfrm.obj \ - $(SLO)$/sectfrm.obj \ - $(SLO)$/softpagebreak.obj \ - $(SLO)$/sortedobjsimpl.obj \ - $(SLO)$/ssfrm.obj \ - $(SLO)$/tabfrm.obj \ - $(SLO)$/trvlfrm.obj \ - $(SLO)$/virtoutp.obj \ - $(SLO)$/wsfrm.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - $(SLO)$/objectformattertxtfrm.obj \ - $(SLO)$/objectformatterlayfrm.obj \ - $(SLO)$/sortedobjs.obj \ - $(SLO)$/swselectionlist.obj \ - $(SLO)$/unusedf.obj - -.IF "$(DBG_LEVEL)">="2" -SLOFILES += \ - $(SLO)$/dbg_lay.obj -.ENDIF - - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index da3d71a2fd..49a309366f 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -31,9 +31,6 @@ #include <com/sun/star/text/HoriOrientation.hpp> - -#include <hintids.hxx> - #include <vcl/sound.hxx> #include <tools/poly.hxx> #define _SVSTDARR_LONGS @@ -50,9 +47,9 @@ // <-- #include <vcl/graph.hxx> #include <svx/svdpagv.hxx> -#include <tgrditem.hxx> - +#include <hintids.hxx> +#include <tgrditem.hxx> #include <fmtsrnd.hxx> #include <fmtclds.hxx> #include <tools/shl.hxx> @@ -530,7 +527,7 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut ) if ( rL2.GetTab() != rL1.GetTab() || rL2.IsPainted() || rL2.IsLocked() || - bVert == (rL2.Height() > rL2.Width()) ) + (bVert == (rL2.Height() > rL2.Width())) ) continue; long nL2a, nL2b, nL2c, nL2d; @@ -949,7 +946,7 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut, SwLineRect &rLk = operator[](k); if ( rLi.SSize() == rLk.SSize() ) { - if ( bVerticalSubs == (rLk.Height() > rLk.Width()) ) + if ( (bVerticalSubs == (rLk.Height() > rLk.Width())) ) { if ( bVerticalSubs ) { @@ -2769,7 +2766,8 @@ void SwTabFrmPainter::Insert( SwLineEntry& rNew, bool bHori ) |* |*************************************************************************/ -void SwRootFrm::Paint( const SwRect& rRect, const SwPrtOptions *pPrintData ) const +void +SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const { OSL_ENSURE( Lower() && Lower()->IsPageFrm(), "Lower der Root keine Seite." ); @@ -3154,7 +3152,7 @@ SwShortCut::SwShortCut( const SwFrm& rFrm, const SwRect& rRect ) } } -void SwLayoutFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const +void SwLayoutFrm::Paint(SwRect const& rRect, SwPrintData const*const) const { ViewShell *pSh = GetShell(); @@ -3439,7 +3437,7 @@ BOOL SwFlyFrm::IsPaint( SdrObject *pObj, const ViewShell *pSh ) /************************************************************************* |* SwCellFrm::Paint( const SwRect& ) const |*************************************************************************/ -void SwCellFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const +void SwCellFrm::Paint(SwRect const& rRect, SwPrintData const*const) const { if ( GetLayoutRowSpan() >= 1 ) SwLayoutFrm::Paint( rRect ); @@ -3455,7 +3453,7 @@ void SwCellFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ void MA_FASTCALL lcl_PaintLowerBorders( const SwLayoutFrm *pLay, const SwRect &rRect, const SwPageFrm *pPage ); -void SwFlyFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const +void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const { //wegen der Ueberlappung von Rahmen und Zeichenobjekten muessen die //Flys ihre Umrandung (und die der Innenliegenden) direkt ausgeben. @@ -3687,7 +3685,7 @@ void SwFlyFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ |* |*************************************************************************/ -void SwTabFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const +void SwTabFrm::Paint(SwRect const& rRect, SwPrintData const*const) const { if ( pGlobalShell->GetViewOptions()->IsTable() ) { diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx index ee2314ac8e..ea08badcfc 100644 --- a/sw/source/core/layout/ssfrm.cxx +++ b/sw/source/core/layout/ssfrm.cxx @@ -412,6 +412,19 @@ SwFrm::~SwFrm() #endif } +/*************************************************************************/ + +const SwFrmFmt * SwLayoutFrm::GetFmt() const +{ + return static_cast< const SwFlyFrmFmt * >( GetDep() ); +} + +SwFrmFmt * SwLayoutFrm::GetFmt() +{ + return static_cast< SwFlyFrmFmt * >( GetDep() ); +} + + /************************************************************************* |* |* SwLayoutFrm::SetFrmFmt() diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index 4712d0f03c..77a2cee8e0 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -569,8 +569,8 @@ const SwCntntFrm * MA_FASTCALL lcl_MissProtectedFrames( const SwCntntFrm *pCnt, if ( !pCell || (( ( bInReadOnly || !pCell->GetFmt()->GetProtect().IsCntntProtected() ) && ( !bMissHeadline || !lcl_IsInRepeatedHeadline( pCell ) ) && - ( !bMissFollowFlowLine || !pCell->IsInFollowFlowRow() ) ) && - !pCell->IsCoveredCell()) ) + ( !bMissFollowFlowLine || !pCell->IsInFollowFlowRow() ) && + !pCell->IsCoveredCell() ) ) bProtect = FALSE; else pCnt = (*fnNxtPrv)( pCnt ); @@ -689,14 +689,14 @@ BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart, const long nPrtLeft = bRTL ? (pTable->*fnRect->fnGetPrtRight)() : (pTable->*fnRect->fnGetPrtLeft)(); - if ( bRTL != (nX < nPrtLeft) ) + if ( (bRTL != (nX < nPrtLeft)) ) nX = nPrtLeft; else { const long nPrtRight = bRTL ? (pTable->*fnRect->fnGetPrtLeft)() : (pTable->*fnRect->fnGetPrtRight)(); - if ( bRTL != (nX > nPrtRight) ) + if ( (bRTL != (nX > nPrtRight)) ) nX = nPrtRight; } } @@ -1777,10 +1777,10 @@ USHORT SwFrm::GetVirtPageNum() const const SwFrm *pFrm = 0; const SfxItemPool &rPool = pPage->GetFmt()->GetDoc()->GetAttrPool(); const SfxPoolItem* pItem; - USHORT nMaxItems = rPool.GetItemCount( RES_PAGEDESC ); - for( USHORT n = 0; n < nMaxItems; ++n ) + sal_uInt32 nMaxItems = rPool.GetItemCount2( RES_PAGEDESC ); + for( sal_uInt32 n = 0; n < nMaxItems; ++n ) { - if( 0 == (pItem = rPool.GetItem( RES_PAGEDESC, n ) )) + if( 0 == (pItem = rPool.GetItem2( RES_PAGEDESC, n ) )) continue; const SwFmtPageDesc *pDesc = (SwFmtPageDesc*)pItem; diff --git a/sw/source/core/layout/unusedf.cxx b/sw/source/core/layout/unusedf.cxx index db056e5edf..1581ed16ca 100644 --- a/sw/source/core/layout/unusedf.cxx +++ b/sw/source/core/layout/unusedf.cxx @@ -29,8 +29,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - - #include "rootfrm.hxx" #include "cntfrm.hxx" #include "flyfrm.hxx" @@ -42,7 +40,7 @@ void SwFrm::Format( const SwBorderAttrs * ) OSL_ENSURE( FALSE, "Format() der Basisklasse gerufen." ); } -void SwFrm::Paint(const SwRect &, const SwPrtOptions * ) const +void SwFrm::Paint(SwRect const&, SwPrintData const*const) const { OSL_ENSURE( FALSE, "Paint() der Basisklasse gerufen." ); } diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index cd143b7002..1b2eb24fb3 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -3059,7 +3059,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize ) // Finally adjust the columns if width is set to auto // Possible optimisation: execute this code earlier in this function and // return??? - if ( ( (bVert && bHeightChgd) || (!bVert && bWidthChgd) ) && + if ( ( (bVert && bHeightChgd) || (! bVert && bWidthChgd) ) && Lower()->IsColumnFrm() ) { // get column attribute diff --git a/sw/source/core/makefile.mk b/sw/source/core/makefile.mk deleted file mode 100644 index 04022c30cb..0000000000 --- a/sw/source/core/makefile.mk +++ /dev/null @@ -1,110 +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. -# -#************************************************************************* - -PRJ=..$/.. -PRJNAME=sw - -TARGET=core - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(CALLTARGETS)"=="core" -RC_SUBDIRS= -.ENDIF - -# --- Files -------------------------------------------------------- - - -SUBLIBS1= \ - $(SLB)$/access.lib \ - $(SLB)$/graphic.lib \ - $(SLB)$/para.lib \ - $(SLB)$/attr.lib \ - $(SLB)$/edit.lib \ - $(SLB)$/crsr.lib \ - $(SLB)$/view.lib - - -SUBLIBS2= \ - $(SLB)$/draw.lib \ - $(SLB)$/sw3io.lib \ - $(SLB)$/swg.lib \ - $(SLB)$/layout.lib \ - $(SLB)$/text.lib \ - $(SLB)$/doc.lib \ - $(SLB)$/txtnode.lib - -SUBLIBS3= \ - $(SLB)$/docnode.lib \ - $(SLB)$/unocore.lib \ - $(SLB)$/objectpositioning.lib \ - $(SLB)$/SwNumberTree.lib \ - $(SLB)$/tablecore.lib - -.IF "$(DBG_LEVEL)">="2" -SUBLIBS3+= \ - $(SLB)$/except.lib -.ENDIF - -SUBLIBS4= \ - $(SLB)$/frmedt.lib \ - $(SLB)$/ole.lib \ - $(SLB)$/fields.lib \ - $(SLB)$/tox.lib \ - $(SLB)$/undo.lib \ - $(SLB)$/bastyp.lib -#------------------------------------------------------------------------- - -################################################################ - -LIB1TARGET=$(SLB)$/core1.lib -LIB1FILES= \ - $(SUBLIBS1) - -LIB2TARGET=$(SLB)$/core2.lib -LIB2FILES= \ - $(SUBLIBS2) - -LIB3TARGET=$(SLB)$/core3.lib -LIB3FILES= \ - $(SUBLIBS3) - -LIB4TARGET=$(SLB)$/core4.lib -LIB4FILES= \ - $(SUBLIBS4) - -.INCLUDE : target.mk - -################################################################ - -#------------------------------------------------------------------------- - - diff --git a/sw/source/core/objectpositioning/makefile.mk b/sw/source/core/objectpositioning/makefile.mk deleted file mode 100644 index 59d5e0201f..0000000000 --- a/sw/source/core/objectpositioning/makefile.mk +++ /dev/null @@ -1,62 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=objectpositioning - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(mydebug)" != "" -CDEFS+=-Dmydebug -.ENDIF - -.IF "$(madebug)" != "" -CDEFS+=-DDEBUG -.ENDIF - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - $(SLO)$/ascharanchoredobjectposition.obj \ - $(SLO)$/environmentofanchoredobject.obj \ - $(SLO)$/tolayoutanchoredobjectposition.obj - -EXCEPTIONSFILES = \ - $(SLO)$/anchoredobjectposition.obj \ - $(SLO)$/tocntntanchoredobjectposition.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/ole/makefile.mk b/sw/source/core/ole/makefile.mk deleted file mode 100644 index 8aaf9ed419..0000000000 --- a/sw/source/core/ole/makefile.mk +++ /dev/null @@ -1,55 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=ole - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -CXXFILES = \ - ndole.cxx - -SLOFILES = \ - $(SLO)$/ndole.obj - -EXCEPTIONSFILES = \ - $(SLO)$/ndole.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index 25bbbe2478..33035be7a8 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -2,7 +2,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 @@ -424,16 +424,14 @@ Size SwOLENode::GetTwipSize() const SwCntntNode* SwOLENode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const { // Falls bereits eine SvPersist-Instanz existiert, nehmen wir diese - SfxObjectShell* p = pDoc->GetPersist(); - if( !p ) + SfxObjectShell* pPersistShell = pDoc->GetPersist(); + if( !pPersistShell ) { - // TODO/LATER: reicht hier nicht ein EmbeddedObjectContainer? Was passiert mit - // diesem Dokument? + // TODO/LATER: is EmbeddedObjectContainer not enough? + // the created document will be closed by pDoc ( should use SfxObjectShellLock ) OSL_ENSURE( pDoc->GetRefForDocShell(), "wo ist die Ref-Klasse fuer die DocShell?"); - p = new SwDocShell( pDoc, SFX_CREATE_MODE_INTERNAL ); - *pDoc->GetRefForDocShell() = p; - p->DoInitNew( NULL ); + pPersistShell->DoInitNew( NULL ); } // Wir hauen das Ding auf SvPersist-Ebene rein @@ -441,7 +439,7 @@ SwCntntNode* SwOLENode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const ::rtl::OUString aNewName/*( Sw3Io::UniqueName( p->GetStorage(), "Obj" ) )*/; SfxObjectShell* pSrc = GetDoc()->GetPersist(); - p->GetEmbeddedObjectContainer().CopyAndGetEmbeddedObject( + pPersistShell->GetEmbeddedObjectContainer().CopyAndGetEmbeddedObject( pSrc->GetEmbeddedObjectContainer(), pSrc->GetEmbeddedObjectContainer().GetEmbeddedObject( aOLEObj.aName ), aNewName ); @@ -765,7 +763,7 @@ BOOL SwOLEObj::IsOleRef() const return xOLERef.is(); } -uno::Reference < embed::XEmbeddedObject > SwOLEObj::GetOleRef() +const uno::Reference < embed::XEmbeddedObject > SwOLEObj::GetOleRef() { if( !xOLERef.is() ) { diff --git a/sw/source/core/para/makefile.mk b/sw/source/core/para/makefile.mk deleted file mode 100644 index aee61949b5..0000000000 --- a/sw/source/core/para/makefile.mk +++ /dev/null @@ -1,57 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=para - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -CXXFILES = \ - paratr.cxx - - - -SLOFILES = \ - $(EXCEPTIONSFILES) - -EXCEPTIONSFILES = \ - $(SLO)$/paratr.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/sw3io/makefile.mk b/sw/source/core/sw3io/makefile.mk deleted file mode 100644 index 352953e85b..0000000000 --- a/sw/source/core/sw3io/makefile.mk +++ /dev/null @@ -1,52 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=sw3io - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES = \ - $(SLO)$/sw3convert.obj \ - $(SLO)$/swacorr.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) - - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/swg/makefile.mk b/sw/source/core/swg/makefile.mk deleted file mode 100644 index 4c838b45cb..0000000000 --- a/sw/source/core/swg/makefile.mk +++ /dev/null @@ -1,57 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=swg - -#ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- -SLOFILES = \ - $(EXCEPTIONSFILES) - -EXCEPTIONSFILES = \ - $(SLO)$/SwXMLBlockExport.obj \ - $(SLO)$/SwXMLBlockImport.obj \ - $(SLO)$/SwXMLBlockListContext.obj \ - $(SLO)$/SwXMLSectionList.obj \ - $(SLO)$/SwXMLTextBlocks.obj \ - $(SLO)$/SwXMLTextBlocks1.obj \ - $(SLO)$/swblocks.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/table/makefile.mk b/sw/source/core/table/makefile.mk deleted file mode 100644 index d63101e30a..0000000000 --- a/sw/source/core/table/makefile.mk +++ /dev/null @@ -1,48 +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. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=tablecore -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/swtable.obj \ - $(SLO)$/swnewtable.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx index 723fcf5fde..b227ffd453 100644 --- a/sw/source/core/text/frmcrsr.cxx +++ b/sw/source/core/text/frmcrsr.cxx @@ -781,7 +781,7 @@ sal_Bool SwTxtFrm::RightMargin(SwPaM *pPam, sal_Bool bAPI) const if( aLine.GetCurr()->GetLen() && CH_BREAK == aInf.GetTxt().GetChar( nRightMargin - 1 ) ) --nRightMargin; - if( !bAPI && (aLine.GetNext() || pFrm->GetFollow()) ) + else if( !bAPI && (aLine.GetNext() || pFrm->GetFollow()) ) { while( nRightMargin > aLine.GetStart() && ' ' == aInf.GetTxt().GetChar( nRightMargin - 1 ) ) diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx index 10804a6368..880826be91 100644 --- a/sw/source/core/text/frmpaint.cxx +++ b/sw/source/core/text/frmpaint.cxx @@ -597,7 +597,7 @@ sal_Bool SwTxtFrm::PaintEmpty( const SwRect &rRect, sal_Bool bCheck ) const * SwTxtFrm::Paint() *************************************************************************/ -void SwTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/ ) const +void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const { ResetRepaint(); diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx index 717a791d79..d99183f785 100644 --- a/sw/source/core/text/itratr.cxx +++ b/sw/source/core/text/itratr.cxx @@ -780,7 +780,7 @@ void SwTxtNode::GetMinMaxSize( ULONG nIndex, ULONG& rMin, ULONG &rMax, case RES_TXTATR_FIELD : { SwField *pFld = (SwField*)pHint->GetFld().GetFld(); - const String aTxt = pFld->GetCntnt( FALSE ); + const String aTxt = pFld->ExpandField(true); if( lcl_MinMaxString( aArg, aIter.GetFnt(), aTxt, 0, aTxt.Len() ) ) nAdd = 20; @@ -983,7 +983,7 @@ USHORT SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd ) case RES_TXTATR_FIELD : { SwField *pFld = (SwField*)pHint->GetFld().GetFld(); - const String aTxt = pFld->GetCntnt( FALSE ); + String const aTxt = pFld->ExpandField(true); SwDrawTextInfo aDrawInf( pSh, *pOut, 0, aTxt, 0, aTxt.Len() ); nProWidth += aIter.GetFnt()->_GetTxtSize( aDrawInf ).Width(); diff --git a/sw/source/core/text/makefile.mk b/sw/source/core/text/makefile.mk deleted file mode 100644 index 7e1cc176dd..0000000000 --- a/sw/source/core/text/makefile.mk +++ /dev/null @@ -1,104 +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. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=text - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(mydebug)" != "" -CDEFS+=-Dmydebug -.ENDIF - -.IF "$(ENABLE_GRAPHITE)" == "TRUE" -CFLAGS+=-DENABLE_GRAPHITE -.ENDIF -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - $(SLO)$/txtcache.obj \ - $(SLO)$/txtinit.obj - -.IF "$(DBG_LEVEL)">="2" -SLOFILES += \ - $(SLO)$/xmldump.obj \ - $(SLO)$/txtio.obj -.ENDIF - -EXCEPTIONSFILES = \ - $(SLO)$/EnhancedPDFExportHelper.obj \ - $(SLO)$/SwGrammarMarkUp.obj \ - $(SLO)$/atrstck.obj \ - $(SLO)$/blink.obj \ - $(SLO)$/frmcrsr.obj \ - $(SLO)$/frmform.obj \ - $(SLO)$/frminf.obj \ - $(SLO)$/frmpaint.obj \ - $(SLO)$/guess.obj \ - $(SLO)$/inftxt.obj \ - $(SLO)$/itradj.obj \ - $(SLO)$/itratr.obj \ - $(SLO)$/itrcrsr.obj \ - $(SLO)$/itrform2.obj \ - $(SLO)$/itrpaint.obj \ - $(SLO)$/itrtxt.obj \ - $(SLO)$/noteurl.obj \ - $(SLO)$/porexp.obj \ - $(SLO)$/porfld.obj \ - $(SLO)$/porfly.obj \ - $(SLO)$/porglue.obj \ - $(SLO)$/porlay.obj \ - $(SLO)$/porlin.obj \ - $(SLO)$/pormulti.obj \ - $(SLO)$/porref.obj \ - $(SLO)$/porrst.obj \ - $(SLO)$/portox.obj \ - $(SLO)$/portxt.obj \ - $(SLO)$/redlnitr.obj \ - $(SLO)$/txtdrop.obj \ - $(SLO)$/txtfld.obj \ - $(SLO)$/txtfly.obj \ - $(SLO)$/txtfrm.obj \ - $(SLO)$/txtftn.obj \ - $(SLO)$/txthyph.obj \ - $(SLO)$/txtpaint.obj \ - $(SLO)$/txttab.obj \ - $(SLO)$/widorp.obj \ - $(SLO)$/wrong.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 7c6a4b3347..0e2a3b58c6 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -805,8 +805,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) MultiSelection aHiddenMulti( aRange ); CalcHiddenRanges( rNode, aHiddenMulti ); - aHiddenChg.Remove( 0, aHiddenChg.Count() ); - USHORT nHiddenIdx = 0; + aHiddenChg.clear(); USHORT i = 0; for( i = 0; i < aHiddenMulti.GetRangeCount(); ++i ) { @@ -814,8 +813,8 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) const xub_StrLen nStart = (xub_StrLen)rRange.Min(); const xub_StrLen nEnd = (xub_StrLen)rRange.Max() + 1; - aHiddenChg.Insert( nStart, nHiddenIdx++ ); - aHiddenChg.Insert( nEnd, nHiddenIdx++ ); + aHiddenChg.push_back( nStart ); + aHiddenChg.push_back( nEnd ); } // @@ -915,9 +914,9 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) // // remove invalid entries from script information arrays - const USHORT nScriptRemove = aScriptChg.Count() - nCnt; - aScriptChg.Remove( nCnt, nScriptRemove ); - aScriptType.Remove( nCnt, nScriptRemove ); + const size_t nScriptRemove = aScriptChg.size() - nCnt; + aScriptChg.erase( aScriptChg.begin() + nCnt, aScriptChg.end() ); + aScriptType.erase( aScriptType.begin() + nCnt, aScriptType.begin() + (nCnt + nScriptRemove) ); // get the start of the last compression group USHORT nLastCompression = nChg; @@ -933,10 +932,10 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) } // remove invalid entries from compression information arrays - const USHORT nCompRemove = aCompChg.Count() - nCntComp; - aCompChg.Remove( nCntComp, nCompRemove ); - aCompLen.Remove( nCntComp, nCompRemove ); - aCompType.Remove( nCntComp, nCompRemove ); + const size_t nCompRemove = aCompChg.size() - nCntComp; + aCompChg.erase( aCompChg.begin() + nCntComp, aCompChg.end() ); + aCompLen.erase( aCompLen.begin() + nCntComp, aCompLen.begin() + (nCntComp + nCompRemove) ); + aCompType.erase( aCompType.begin() + nCntComp, aCompType.end() ); // get the start of the last kashida group USHORT nLastKashida = nChg; @@ -947,7 +946,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) } // remove invalid entries from kashida array - aKashida.Remove( nCntKash, aKashida.Count() - nCntKash ); + aKashida.erase( aKashida.begin() + nCntKash, aKashida.end() ); // // TAKE CARE OF WEAK CHARACTERS: WE MUST FIND AN APPROPRIATE @@ -981,8 +980,9 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) if ( nScript != nNextScript ) { - aScriptChg.Insert( nEnd, nCnt ); - aScriptType.Insert( nScript, nCnt++ ); + aScriptChg.insert( aScriptChg.begin() + nCnt, nEnd ); + aScriptType.insert( aScriptType.begin() + nCnt, nScript ); + nCnt++; nScript = nNextScript; } } @@ -991,7 +991,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) // UPDATE THE SCRIPT INFO ARRAYS: // - while ( nChg < rTxt.Len() || ( !aScriptChg.Count() && !rTxt.Len() ) ) + while ( nChg < rTxt.Len() || ( aScriptChg.empty() && !rTxt.Len() ) ) { OSL_ENSURE( i18n::ScriptType::WEAK != nScript, "Inserting WEAK into SwScriptInfo structure" ); @@ -1032,18 +1032,19 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) if (nType == U_NON_SPACING_MARK || nType == U_ENCLOSING_MARK || nType == U_COMBINING_SPACING_MARK ) { - aScriptChg.Insert( nChg - 1, nCnt ); + aScriptChg.insert( aScriptChg.begin() + nCnt, nChg - 1 ); } else { - aScriptChg.Insert( nChg, nCnt ); + aScriptChg.insert( aScriptChg.begin() + nCnt, nChg ); } } else { - aScriptChg.Insert( nChg, nCnt ); + aScriptChg.insert( aScriptChg.begin() + nCnt, nChg ); } - aScriptType.Insert( nScript, nCnt++ ); + aScriptType.insert( aScriptType.begin() + nCnt, nScript ); + nCnt++; // if current script is asian, we search for compressable characters // in this range @@ -1087,10 +1088,11 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) if ( CHARCOMPRESS_PUNCTUATION_KANA == aCompEnum || ePrevState != KANA ) { - aCompChg.Insert( nPrevChg, nCntComp ); + aCompChg.insert( aCompChg.begin() + nCntComp, nPrevChg ); BYTE nTmpType = ePrevState; - aCompType.Insert( nTmpType, nCntComp ); - aCompLen.Insert( nLastCompression - nPrevChg, nCntComp++ ); + aCompType.insert( aCompType.begin() + nCntComp, nTmpType ); + aCompLen.insert( aCompLen.begin() + nCntComp, nLastCompression - nPrevChg ); + nCntComp++; } } @@ -1108,10 +1110,11 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) if ( CHARCOMPRESS_PUNCTUATION_KANA == aCompEnum || ePrevState != KANA ) { - aCompChg.Insert( nPrevChg, nCntComp ); + aCompChg.insert( aCompChg.begin() + nCntComp, nPrevChg ); BYTE nTmpType = ePrevState; - aCompType.Insert( nTmpType, nCntComp ); - aCompLen.Insert( nLastCompression - nPrevChg, nCntComp++ ); + aCompType.insert( aCompType.begin() + nCntComp, nTmpType ); + aCompLen.insert( aCompLen.begin() + nCntComp, nLastCompression - nPrevChg ); + nCntComp++; } } } @@ -1277,7 +1280,10 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) } // end of current word if ( STRING_LEN != nKashidaPos ) - aKashida.Insert( nKashidaPos, nCntKash++ ); + { + aKashida.insert( aKashida.begin() + nCntKash, nKashidaPos); + nCntKash++; + } } // end of kashida search } @@ -1292,7 +1298,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) // check kashida data long nTmpKashidaPos = -1; sal_Bool bWrongKash = sal_False; - for (i = 0; i < aKashida.Count(); ++i ) + for (i = 0; i < aKashida.size(); ++i ) { long nCurrKashidaPos = GetKashida( i ); if ( nCurrKashidaPos <= nTmpKashidaPos ) @@ -1306,9 +1312,8 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) #endif // remove invalid entries from direction information arrays - const USHORT nDirRemove = aDirChg.Count(); - aDirChg.Remove( 0, nDirRemove ); - aDirType.Remove( 0, nDirRemove ); + aDirChg.clear(); + aDirType.clear(); // Perform Unicode Bidi Algorithm for text direction information bool bPerformUBA = UBIDI_LTR != nDefaultDir; @@ -1328,7 +1333,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) // 1. All text in RTL runs will use the CTL font // #i89825# change the script type also to CTL (hennerdrewes) // 2. Text in embedded LTR runs that does not have any strong LTR characters (numbers!) - for ( USHORT nDirIdx = 0; nDirIdx < aDirChg.Count(); ++nDirIdx ) + for ( size_t nDirIdx = 0; nDirIdx < aDirChg.size(); ++nDirIdx ) { const BYTE nCurrDirType = GetDirType( nDirIdx ); // nStart ist start of RTL run: @@ -1340,7 +1345,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) ( nCurrDirType > UBIDI_LTR && !lcl_HasStrongLTR( rTxt, nStart, nEnd ) ) ) // non-strong text in embedded LTR run { // nScriptIdx points into the ScriptArrays: - USHORT nScriptIdx = 0; + size_t nScriptIdx = 0; // Skip entries in ScriptArray which are not inside the RTL run: // Make nScriptIdx become the index of the script group with @@ -1360,21 +1365,21 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) // we have to insert a new script change: if ( nStart > 0 && nStartPosOfGroup < nStart ) { - aScriptChg.Insert( nStart, nScriptIdx ); - aScriptType.Insert( nScriptTypeOfGroup, nScriptIdx ); + aScriptChg.insert( aScriptChg.begin() + nScriptIdx, nStart ); + aScriptType.insert( aScriptType.begin() + nScriptIdx, nScriptTypeOfGroup ); ++nScriptIdx; } // Remove entries in ScriptArray which end inside the RTL run: - while ( nScriptIdx < aScriptChg.Count() && GetScriptChg( nScriptIdx ) <= nEnd ) + while ( nScriptIdx < aScriptChg.size() && GetScriptChg( nScriptIdx ) <= nEnd ) { - aScriptChg.Remove( nScriptIdx, 1 ); - aScriptType.Remove( nScriptIdx, 1 ); + aScriptChg.erase( aScriptChg.begin() + nScriptIdx ); + aScriptType.erase( aScriptType.begin() + nScriptIdx ); } // Insert a new entry in ScriptArray for the end of the RTL run: - aScriptChg.Insert( nEnd, nScriptIdx ); - aScriptType.Insert( i18n::ScriptType::COMPLEX, nScriptIdx ); + aScriptChg.insert( aScriptChg.begin() + nScriptIdx, nEnd ); + aScriptType.insert( aScriptType.begin() + nScriptIdx, i18n::ScriptType::COMPLEX ); #if OSL_DEBUG_LEVEL > 1 BYTE nScriptType; @@ -1384,7 +1389,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) (void) nLastScriptChg; (void) nLastScriptType; - for ( USHORT i2 = 0; i2 < aScriptChg.Count(); ++i2 ) + for ( size_t i2 = 0; i2 < aScriptChg.size(); ++i2 ) { nScriptChg = GetScriptChg( i2 ); nScriptType = GetScriptType( i2 ); @@ -1401,9 +1406,8 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL ) void SwScriptInfo::UpdateBidiInfo( const String& rTxt ) { // remove invalid entries from direction information arrays - const USHORT nDirRemove = aDirChg.Count(); - aDirChg.Remove( 0, nDirRemove ); - aDirType.Remove( 0, nDirRemove ); + aDirChg.clear(); + aDirType.clear(); // // Bidi functions from icu 2.0 @@ -1420,13 +1424,12 @@ void SwScriptInfo::UpdateBidiInfo( const String& rTxt ) int32_t nEnd; UBiDiLevel nCurrDir; // counter for direction information arrays - USHORT nCntDir = 0; for ( USHORT nIdx = 0; nIdx < nCount; ++nIdx ) { ubidi_getLogicalRun( pBidi, nStart, &nEnd, &nCurrDir ); - aDirChg.Insert( (USHORT)nEnd, nCntDir ); - aDirType.Insert( (BYTE)nCurrDir, nCntDir++ ); + aDirChg.push_back( (USHORT)nEnd ); + aDirType.push_back( (BYTE)nCurrDir ); nStart = nEnd; } @@ -2011,7 +2014,7 @@ sal_Bool SwScriptInfo::IsArabicText( const XubString& rTxt, xub_StrLen nStt, xub sal_Bool SwScriptInfo::IsKashidaValid ( xub_StrLen nKashPos ) const { - for ( xub_StrLen i = 0; i < aKashidaInvalid.Count(); ++i ) + for ( size_t i = 0; i < aKashidaInvalid.size(); ++i ) { if ( aKashidaInvalid [ i ] == nKashPos ) return false; @@ -2023,13 +2026,13 @@ sal_Bool SwScriptInfo::IsKashidaValid ( xub_StrLen nKashPos ) const * SwScriptInfo::ClearKashidaInvalid() *************************************************************************/ -void SwScriptInfo::ClearKashidaInvalid ( xub_StrLen nKashPos ) +void SwScriptInfo::ClearKashidaInvalid ( xub_StrLen nKashPos ) { - for ( xub_StrLen i = 0; i < aKashidaInvalid.Count(); ++i ) + for ( size_t i = 0; i < aKashidaInvalid.size(); ++i ) { if ( aKashidaInvalid [ i ] == nKashPos ) { - aKashidaInvalid.Remove (i, 1); + aKashidaInvalid.erase ( aKashidaInvalid.begin() + i ); return; } } @@ -2085,7 +2088,7 @@ bool SwScriptInfo::MarkOrClearKashidaInvalid ( xub_StrLen nStt, xub_StrLen nLen, void SwScriptInfo::MarkKashidaInvalid ( xub_StrLen nKashPos ) { - aKashidaInvalid.Insert( nKashPos, aKashidaInvalid.Count() ); + aKashidaInvalid.push_back( nKashPos ); } /************************************************************************* @@ -2122,8 +2125,8 @@ USHORT SwScriptInfo::GetKashidaPositions ( xub_StrLen nStt, xub_StrLen nLen, void SwScriptInfo::SetNoKashidaLine ( xub_StrLen nStt, xub_StrLen nLen ) { - aNoKashidaLine.Insert( nStt, aNoKashidaLine.Count()); - aNoKashidaLineEnd.Insert( nStt+nLen, aNoKashidaLineEnd.Count()); + aNoKashidaLine.push_back( nStt ); + aNoKashidaLineEnd.push_back( nStt+nLen ); } /************************************************************************* @@ -2133,7 +2136,7 @@ void SwScriptInfo::SetNoKashidaLine ( xub_StrLen nStt, xub_StrLen nLen ) bool SwScriptInfo::IsKashidaLine ( xub_StrLen nCharIdx ) const { - for( xub_StrLen i = 0; i < aNoKashidaLine.Count(); ++i ) + for( size_t i = 0; i < aNoKashidaLine.size(); ++i ) { if( nCharIdx >= aNoKashidaLine[ i ] && nCharIdx < aNoKashidaLineEnd[ i ]) return false; @@ -2146,13 +2149,13 @@ bool SwScriptInfo::IsKashidaLine ( xub_StrLen nCharIdx ) const void SwScriptInfo::ClearNoKashidaLine ( xub_StrLen nStt, xub_StrLen nLen ) { - xub_StrLen i = 0; - while( i < aNoKashidaLine.Count()) + size_t i = 0; + while( i < aNoKashidaLine.size()) { if( nStt + nLen >= aNoKashidaLine[ i ] && nStt < aNoKashidaLineEnd [ i ] ) { - aNoKashidaLine.Remove(i, 1); - aNoKashidaLineEnd.Remove(i, 1); + aNoKashidaLine.erase(aNoKashidaLine.begin() + i); + aNoKashidaLineEnd.erase(aNoKashidaLineEnd.begin() + i); } else ++i; diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx index 277d21cb92..d0128f8f1b 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -1023,10 +1023,10 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos, { pRet->pItem = NULL; pRet->pAttr = (*pHints)[n2Lines]; - aEnd.Insert( *pRet->pAttr->GetEnd(), 0 ); + aEnd.push_front( *pRet->pAttr->GetEnd() ); if( pItem ) { - aEnd[ 0 ] = GetTxt().Len(); + aEnd.front() = GetTxt().Len(); bOn = ((SvxTwoLinesItem*)pItem)->GetEndBracket() == p2Lines->GetEndBracket() && ((SvxTwoLinesItem*)pItem)->GetStartBracket() == @@ -1037,7 +1037,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos, { pRet->pItem = pItem; pRet->pAttr = NULL; - aEnd.Insert( GetTxt().Len(), 0 ); + aEnd.push_front( GetTxt().Len() ); } pRet->nId = SW_MC_DOUBLE; pRet->nLevel = GetTxtFrm()->IsRightToLeft() ? 1 : 0; @@ -1071,23 +1071,23 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos, // If the start of the next atribute is behind the end of // the last attribute on the aEnd-stack, this is the endposition // on the stack is the end of the 2-line portion. - if( !bOn || aEnd[ aEnd.Count()-1 ] < *pTmp->GetStart() ) + if( !bOn || aEnd.back() < *pTmp->GetStart() ) break; // At this moment, bOn is TRUE and the next attribute starts // behind rPos, so we could move rPos to the next startpoint rPos = *pTmp->GetStart(); // We clean up the aEnd-stack, endpositions equal to rPos are // superfluous. - while( aEnd.Count() && aEnd[ aEnd.Count()-1 ] <= rPos ) + while( !aEnd.empty() && aEnd.back() <= rPos ) { bOn = !bOn; - aEnd.Remove( aEnd.Count()-1, 1 ); + aEnd.pop_back(); } // If the endstack is empty, we simulate an attribute with // state TRUE and endposition rPos - if( !aEnd.Count() ) + if( aEnd.empty() ) { - aEnd.Insert( rPos, 0 ); + aEnd.push_front( rPos ); bOn = sal_True; } } @@ -1099,8 +1099,8 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos, if( bTwo == bOn ) { // .. with the same state, so the last attribute could // be continued. - if( aEnd[ aEnd.Count()-1 ] < *pTmp->GetEnd() ) - aEnd[ aEnd.Count()-1 ] = *pTmp->GetEnd(); + if( aEnd.back() < *pTmp->GetEnd() ) + aEnd.back() = *pTmp->GetEnd(); } else { // .. with a different state. @@ -1108,17 +1108,17 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos, // If this is smaller than the last on the stack, we put // it on the stack. If it has the same endposition, the last // could be removed. - if( aEnd[ aEnd.Count()-1 ] > *pTmp->GetEnd() ) - aEnd.Insert( *pTmp->GetEnd(), aEnd.Count() ); - else if( aEnd.Count() > 1 ) - aEnd.Remove( aEnd.Count()-1, 1 ); + if( aEnd.back() > *pTmp->GetEnd() ) + aEnd.push_back( *pTmp->GetEnd() ); + else if( aEnd.size() > 1 ) + aEnd.pop_back(); else - aEnd[ aEnd.Count()-1 ] = *pTmp->GetEnd(); + aEnd.back() = *pTmp->GetEnd(); } } } - if( bOn && aEnd.Count() ) - rPos = aEnd[ aEnd.Count()-1 ]; + if( bOn && !aEnd.empty() ) + rPos = aEnd.back(); return pRet; } if( nRotate < nCount || ( pRotItem && pRotItem == pRotate && @@ -1134,7 +1134,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos, // The bOn flag signs the state of the last 2-line attribute in the // aEnd-stack, which could interrupts the winning rotation attribute. sal_Bool bOn = pItem ? sal_True : sal_False; - aEnd.Insert( GetTxt().Len(), 0 ); + aEnd.push_front( GetTxt().Len() ); // n2Lines is the index of the last 2-line-attribute, which contains // the actual position. i = 0; @@ -1146,17 +1146,17 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos, continue; if( n2Start < *pTmp->GetStart() ) { - if( bOn || aEnd[ aEnd.Count()-1 ] < *pTmp->GetStart() ) + if( bOn || aEnd.back() < *pTmp->GetStart() ) break; n2Start = *pTmp->GetStart(); - while( aEnd.Count() && aEnd[ aEnd.Count()-1 ] <= n2Start ) + while( !aEnd.empty() && aEnd.back() <= n2Start ) { bOn = !bOn; - aEnd.Remove( aEnd.Count()-1, 1 ); + aEnd.pop_back(); } - if( !aEnd.Count() ) + if( aEnd.empty() ) { - aEnd.Insert( n2Start, 0 ); + aEnd.push_front( n2Start ); bOn = sal_False; } } @@ -1171,36 +1171,36 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos, { if( bTwo == bOn ) { - if( aEnd[ aEnd.Count()-1 ] < *pTmp->GetEnd() ) - aEnd[ aEnd.Count()-1 ] = *pTmp->GetEnd(); + if( aEnd.back() < *pTmp->GetEnd() ) + aEnd.back() = *pTmp->GetEnd(); } else { bOn = bTwo; - if( aEnd[ aEnd.Count()-1 ] > *pTmp->GetEnd() ) - aEnd.Insert( *pTmp->GetEnd(), aEnd.Count() ); - else if( aEnd.Count() > 1 ) - aEnd.Remove( aEnd.Count()-1, 1 ); + if( aEnd.back() > *pTmp->GetEnd() ) + aEnd.push_back( *pTmp->GetEnd() ); + else if( aEnd.size() > 1 ) + aEnd.pop_back(); else - aEnd[ aEnd.Count()-1 ] = *pTmp->GetEnd(); + aEnd.back() = *pTmp->GetEnd(); } } } - if( !bOn && aEnd.Count() ) - n2Start = aEnd[ aEnd.Count()-1 ]; + if( !bOn && !aEnd.empty() ) + n2Start = aEnd.back(); - if( aEnd.Count() ) - aEnd.Remove( 0, aEnd.Count() ); + if( !aEnd.empty() ) + aEnd.clear(); bOn = sal_True; if( nRotate < nCount ) { pRet->pItem = NULL; pRet->pAttr = (*pHints)[nRotate]; - aEnd.Insert( *pRet->pAttr->GetEnd(), 0 ); + aEnd.push_front( *pRet->pAttr->GetEnd() ); if( pRotItem ) { - aEnd[ 0 ] = GetTxt().Len(); + aEnd.front() = GetTxt().Len(); bOn = ((SvxCharRotateItem*)pRotItem)->GetValue() == pRotate->GetValue(); } @@ -1209,7 +1209,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos, { pRet->pItem = pRotItem; pRet->pAttr = NULL; - aEnd.Insert( GetTxt().Len(), 0 ); + aEnd.push_front( GetTxt().Len() ); } i = 0; while( i < nCount ) @@ -1219,17 +1219,17 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos, continue; if( rPos < *pTmp->GetStart() ) { - if( !bOn || aEnd[ aEnd.Count()-1 ] < *pTmp->GetStart() ) + if( !bOn || aEnd.back() < *pTmp->GetStart() ) break; rPos = *pTmp->GetStart(); - while( aEnd.Count() && aEnd[ aEnd.Count()-1 ] <= rPos ) + while( !aEnd.empty() && aEnd.back() <= rPos ) { bOn = !bOn; - aEnd.Remove( aEnd.Count()-1, 1 ); + aEnd.pop_back(); } - if( !aEnd.Count() ) + if( aEnd.empty() ) { - aEnd.Insert( rPos, 0 ); + aEnd.push_front( rPos ); bOn = sal_True; } } @@ -1242,23 +1242,23 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos, { if( bTwo == bOn ) { - if( aEnd[ aEnd.Count()-1 ] < *pTmp->GetEnd() ) - aEnd[ aEnd.Count()-1 ] = *pTmp->GetEnd(); + if( aEnd.back() < *pTmp->GetEnd() ) + aEnd.back() = *pTmp->GetEnd(); } else { bOn = bTwo; - if( aEnd[ aEnd.Count()-1 ] > *pTmp->GetEnd() ) - aEnd.Insert( *pTmp->GetEnd(), aEnd.Count() ); - else if( aEnd.Count() > 1 ) - aEnd.Remove( aEnd.Count()-1, 1 ); + if( aEnd.back() > *pTmp->GetEnd() ) + aEnd.push_back( *pTmp->GetEnd() ); + else if( aEnd.size() > 1 ) + aEnd.pop_back(); else - aEnd[ aEnd.Count()-1 ] = *pTmp->GetEnd(); + aEnd.back() = *pTmp->GetEnd(); } } } - if( bOn && aEnd.Count() ) - rPos = aEnd[ aEnd.Count()-1 ]; + if( bOn && !aEnd.empty() ) + rPos = aEnd.back(); if( rPos > n2Start ) rPos = n2Start; return pRet; diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx index 1d9b92a2f0..c4a82b47bb 100644 --- a/sw/source/core/text/txtfld.cxx +++ b/sw/source/core/text/txtfld.cxx @@ -107,6 +107,8 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf, } ViewShell *pSh = rInf.GetVsh(); + SwDoc *const pDoc( (pSh) ? pSh->GetDoc() : 0 ); + bool const bInClipboard( (pDoc) ? pDoc->IsClipBoard() : true ); sal_Bool bPlaceHolder = sal_False; switch( pFld->GetTyp()->Which() ) @@ -118,16 +120,26 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf, case RES_COMBINED_CHARS: { - String sStr( pFld->GetCntnt( bName )); if( bName ) - pRet = new SwFldPortion( sStr ); + { + String const sName( pFld->GetFieldName() ); + pRet = new SwFldPortion(sName); + } else - pRet = new SwCombinedPortion( sStr ); + { + String const sContent( pFld->ExpandField(bInClipboard) ); + pRet = new SwCombinedPortion(sContent); + } } break; case RES_HIDDENTXTFLD: - pRet = new SwHiddenPortion(pFld->GetCntnt( bName )); + { + String const str( (bName) + ? pFld->GetFieldName() + : pFld->ExpandField(bInClipboard) ); + pRet = new SwHiddenPortion(str); + } break; case RES_CHAPTERFLD: @@ -136,13 +148,25 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf, ((SwChapterField*)pFld)->ChangeExpansion( pFrame, &((SwTxtFld*)pHint)->GetTxtNode() ); } - pRet = new SwFldPortion( pFld->GetCntnt( bName ) ); + { + String const str( (bName) + ? pFld->GetFieldName() + : pFld->ExpandField(bInClipboard) ); + pRet = new SwFldPortion( str ); + } break; case RES_DOCSTATFLD: if( !bName && pSh && !pSh->Imp()->IsUpdateExpFlds() ) + { ((SwDocStatField*)pFld)->ChangeExpansion( pFrame ); - pRet = new SwFldPortion( pFld->GetCntnt( bName ) ); + } + { + String const str( (bName) + ? pFld->GetFieldName() + : pFld->ExpandField(bInClipboard) ); + pRet = new SwFldPortion( str ); + } break; case RES_PAGENUMBERFLD: @@ -154,7 +178,6 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf, const SwRootFrm* pTmpRootFrm = pSh->GetLayout(); const sal_Bool bVirt = pTmpRootFrm->IsVirtPageNum(); - SwDoc* pDoc = pSh->GetDoc(); MSHORT nVirtNum = pFrame->GetVirtPageNum(); MSHORT nNumPages = pTmpRootFrm->GetPageNum(); sal_Int16 nNumFmt = -1; @@ -164,7 +187,12 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf, pPageNr->ChangeExpansion( pDoc, nVirtNum, nNumPages, bVirt, nNumFmt > -1 ? &nNumFmt : 0); } - pRet = new SwFldPortion( pFld->GetCntnt( bName ) ); + { + String const str( (bName) + ? pFld->GetFieldName() + : pFld->ExpandField(bInClipboard) ); + pRet = new SwFldPortion( str ); + } break; } case RES_GETEXPFLD: @@ -184,7 +212,12 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf, pExpFld->ChgBodyTxtFlag( sal_True ); } } - pRet = new SwFldPortion( pFld->GetCntnt( bName ) ); + { + String const str( (bName) + ? pFld->GetFieldName() + : pFld->ExpandField(bInClipboard) ); + pRet = new SwFldPortion( str ); + } break; } case RES_DBFLD: @@ -208,13 +241,25 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf, } */ } - pRet = new SwFldPortion( pFld->GetCntnt( bName ) ); + { + String const str( (bName) + ? pFld->GetFieldName() + : pFld->ExpandField(bInClipboard) ); + pRet = new SwFldPortion(str); + } break; } case RES_REFPAGEGETFLD: if( !bName && pSh && !pSh->Imp()->IsUpdateExpFlds() ) + { ((SwRefPageGetField*)pFld)->ChangeExpansion( pFrame, (SwTxtFld*)pHint ); - pRet = new SwFldPortion( pFld->GetCntnt( bName ) ); + } + { + String const str( (bName) + ? pFld->GetFieldName() + : pFld->ExpandField(bInClipboard) ); + pRet = new SwFldPortion(str); + } break; case RES_JUMPEDITFLD: @@ -225,9 +270,12 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf, break; default: - { - pRet = new SwFldPortion(pFld->GetCntnt( bName ) ); - } + { + String const str( (bName) + ? pFld->GetFieldName() + : pFld->ExpandField(bInClipboard) ); + pRet = new SwFldPortion(str); + } } if( bNewFlyPor ) @@ -250,7 +298,12 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf, else pTmpFnt->SetDiffFnt( &pChFmt->GetAttrSet(), pFrm->GetTxtNode()->getIDocumentSettingAccess() ); } - pRet = new SwFldPortion( pFld->GetCntnt( bName ), pTmpFnt, bPlaceHolder ); + { + String const str( (bName) + ? pFld->GetFieldName() + : pFld->ExpandField(bInClipboard) ); + pRet = new SwFldPortion(str, pTmpFnt, bPlaceHolder); + } } return pRet; @@ -485,13 +538,7 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const } else { - // --> OD 2006-06-02 #b6432095# - // use method <SwNumRule::MakeNumString(..)> instead of - // method <SwTxtNode::GetNumString()>, because for levels with - // numbering none the prefix and the suffix strings have to be provided. -// XubString aTxt( pTxtNd->GetNumString() ); - XubString aTxt( pNumRule->MakeNumString( *(pTxtNd->GetNum()) ) ); - // <-- + XubString aTxt( pTxtNd->GetNumString() ); if ( aTxt.Len() > 0 ) { aTxt.Insert( pTxtNd->GetLabelFollowedBy() ); diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx index 821f899a4d..36da923440 100644 --- a/sw/source/core/text/txtfly.cxx +++ b/sw/source/core/text/txtfly.cxx @@ -74,6 +74,10 @@ #include <IDocumentDrawModelAccess.hxx> #include <IDocumentLayoutAccess.hxx> #include <IDocumentSettingAccess.hxx> +#include <editeng/txtrange.hxx> +#include <editeng/lrspitem.hxx> +#include <editeng/ulspitem.hxx> +#include <editeng/lspcitem.hxx> #include <svx/svdoedge.hxx> #include "doc.hxx" @@ -82,6 +86,7 @@ #endif + using namespace ::com::sun::star; /***************************************************************************** @@ -2349,6 +2354,7 @@ SwSurround SwTxtFly::_GetSurroundForTextWrap( const SwAnchoredObject* pAnchoredO { return SURROUND_NONE; } + } } // Beim Durchlauf und Nowrap wird smart ignoriert. diff --git a/sw/source/core/text/txtio.cxx b/sw/source/core/text/txtio.cxx index 010ee89c7e..317e7fed4c 100644 --- a/sw/source/core/text/txtio.cxx +++ b/sw/source/core/text/txtio.cxx @@ -29,10 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - -#if !defined(OSL_DEBUG_LEVEL) || OSL_DEBUG_LEVEL == 0 -#error Who broke the makefiles? -#endif +#ifdef DBG_UTIL #include "viewsh.hxx" // IsDbg() #include "viewopt.hxx" // IsDbg() @@ -737,5 +734,6 @@ SvStream &SwDropPortion::operator<<( SvStream &rOs ) const //$ ostream #endif /* OSL_DEBUG_LEVEL */ +#endif // DBG_UTIL /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/tox/makefile.mk b/sw/source/core/tox/makefile.mk deleted file mode 100644 index 3bbc9866b5..0000000000 --- a/sw/source/core/tox/makefile.mk +++ /dev/null @@ -1,56 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=tox - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(mydebug)" != "" -CDEFS+=-Dmydebug -.ENDIF - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(EXCEPTIONSFILES) - -EXCEPTIONSFILES= \ - $(SLO)$/tox.obj \ - $(SLO)$/toxhlp.obj \ - $(SLO)$/txmsrt.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx index 63152fb759..2a7a380f8a 100644 --- a/sw/source/core/tox/txmsrt.cxx +++ b/sw/source/core/tox/txmsrt.cxx @@ -402,7 +402,7 @@ BOOL SwTOXIndex::operator<( const SwTOXSortTabBase& rCmpBase ) // -void SwTOXIndex::_GetText( String& rTxt, String& rTxtReading ) +void SwTOXIndex::GetText_Impl( String& rTxt, String& rTxtReading ) const { OSL_ENSURE(pTxtMark, "pTxtMark == 0, Kein Stichwort"); const SwTOXMark& rTOXMark = pTxtMark->GetTOXMark(); @@ -529,7 +529,7 @@ USHORT SwTOXCustom::GetLevel() const } -void SwTOXCustom::_GetText( String& rTxt, String &rTxtReading ) +void SwTOXCustom::GetText_Impl( String& rTxt, String &rTxtReading ) const { rTxt = aKey; rTxtReading = sReading; @@ -552,7 +552,7 @@ SwTOXContent::SwTOXContent( const SwTxtNode& rNd, const SwTxtTOXMark* pMark, // Der Text des Inhalts // -void SwTOXContent::_GetText( String& rTxt, String& rTxtReading ) +void SwTOXContent::GetText_Impl( String& rTxt, String& rTxtReading ) const { const xub_StrLen* pEnd = pTxtMark->GetEnd(); if( pEnd && !pTxtMark->GetTOXMark().IsAlternativeText() ) @@ -611,7 +611,7 @@ SwTOXPara::SwTOXPara( const SwCntntNode& rNd, SwTOXElement eT, USHORT nLevel ) } -void SwTOXPara::_GetText( String& rTxt, String& ) +void SwTOXPara::GetText_Impl( String& rTxt, String& ) const { const SwCntntNode* pNd = aTOXSources[0].pNd; switch( eType ) @@ -800,7 +800,7 @@ SwTOXTable::SwTOXTable( const SwCntntNode& rNd ) } -void SwTOXTable::_GetText( String& rTxt, String& ) +void SwTOXTable::GetText_Impl( String& rTxt, String& ) const { const SwNode* pNd = aTOXSources[0].pNd; if( pNd && 0 != ( pNd = pNd->FindTableNode() ) ) @@ -862,11 +862,14 @@ USHORT SwTOXAuthority::GetLevel() const return nRet; } -void SwTOXAuthority::_GetText( String& rTxt, String& ) +static String lcl_GetText(SwFmtFld const& rField) { - bool const isClipBoard( - m_rField.GetTxtFld()->GetTxtNode().GetDoc()->IsClipBoard()); - rTxt = m_rField.GetFld()->ExpandField(isClipBoard); + return rField.GetFld()->ExpandField(true); +} + +void SwTOXAuthority::GetText_Impl( String& rTxt, String& ) const +{ + rTxt = lcl_GetText(m_rField); } void SwTOXAuthority::FillText( SwTxtNode& rNd, @@ -876,7 +879,7 @@ void SwTOXAuthority::FillText( SwTxtNode& rNd, String sText; if(AUTH_FIELD_IDENTIFIER == nAuthField) { - sText = pField->Expand(); + sText = lcl_GetText(m_rField); const SwAuthorityFieldType* pType = (const SwAuthorityFieldType*)pField->GetTyp(); sal_Unicode cChar = pType->GetPrefix(); if(cChar && cChar != ' ') diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx index b70a205ccb..4f09acde65 100644 --- a/sw/source/core/txtnode/atrfld.cxx +++ b/sw/source/core/txtnode/atrfld.cxx @@ -258,10 +258,10 @@ BOOL SwFmtFld::IsProtect() const |* *************************************************************************/ -SwTxtFld::SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStartPos, +SwTxtFld::SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStartPos) bool const bInClipboard) : SwTxtAttr( rAttr, nStartPos ) - , m_aExpand( rAttr.GetFld()->ExpandField(bInClipboard) ) + , m_aExpand( rAttr.GetFld()->ExpandField(true) ) , m_pTxtNode( 0 ) { rAttr.pTxtAttr = this; diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index c9fd7a6515..59d8bca9de 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -512,7 +512,7 @@ void SwFntObj::CreateScrFont( const ViewShell& rSh, const OutputDevice& rOut ) void SwFntObj::GuessLeading( const ViewShell& -#if defined(WNT) || defined(WIN) || defined(PM2) +#if defined(WNT) || defined(PM2) rSh #endif , const FontMetric& rMet ) @@ -525,7 +525,7 @@ void SwFntObj::GuessLeading( const ViewShell& return; } -#if defined(WNT) || defined(WIN) || defined(PM2) +#if defined(WNT) || defined(PM2) OutputDevice *pWin = rSh.GetWin() ? rSh.GetWin() : GetpApp()->GetDefaultDevice(); diff --git a/sw/source/core/txtnode/makefile.mk b/sw/source/core/txtnode/makefile.mk deleted file mode 100644 index 066abd7517..0000000000 --- a/sw/source/core/txtnode/makefile.mk +++ /dev/null @@ -1,77 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=txtnode - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(mydebug)" != "" -CDEFS+=-Dmydebug -.ENDIF - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - $(SLO)$/atrref.obj \ - $(SLO)$/chrfmt.obj \ - $(SLO)$/modeltoviewhelper.obj \ - $(SLO)$/ndhints.obj \ - $(SLO)$/txatbase.obj - -EXCEPTIONSFILES = \ - $(SLO)$/SwGrammarContact.obj \ - $(SLO)$/atrfld.obj \ - $(SLO)$/atrflyin.obj \ - $(SLO)$/atrftn.obj \ - $(SLO)$/atrtox.obj \ - $(SLO)$/fmtatr2.obj \ - $(SLO)$/fntcache.obj \ - $(SLO)$/fntcap.obj \ - $(SLO)$/ndtxt.obj \ - $(SLO)$/swfntcch.obj \ - $(SLO)$/swfont.obj \ - $(SLO)$/thints.obj \ - $(SLO)$/txatritr.obj \ - $(SLO)$/txtatr2.obj \ - $(SLO)$/txtedt.obj - -.IF "$(dbutil)" != "" -OFILES+=$(SLO)$/dbchratr.$(QBJX) -.ENDIF - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index c602b83392..82d630b3a9 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -93,6 +93,10 @@ #include <svl/intitem.hxx> #include <list.hxx> + +using namespace ::com::sun::star; + + SV_DECL_PTRARR( TmpHints, SwTxtAttr*, 0, 4 ) TYPEINIT1( SwTxtNode, SwCntntNode ) @@ -2397,9 +2401,14 @@ void SwTxtNode::NumRuleChgd() } SetInSwFntCache( FALSE ); - SvxLRSpaceItem& rLR = (SvxLRSpaceItem&)GetSwAttrSet().GetLRSpace(); - - SwModify::Modify( &rLR, &rLR ); + // Sending "noop" modify in order to cause invalidations of registered + // <SwTxtFrm> instances to get the list style change respectively the change + // in the list tree reflected in the layout. + // Important note: + { + SvxLRSpaceItem& rLR = (SvxLRSpaceItem&)GetSwAttrSet().GetLRSpace(); + SwModify::Modify( &rLR, &rLR ); + } } // -> #i27615# @@ -2659,13 +2668,19 @@ XubString SwTxtNode::GetNumString( const bool _bInclPrefixAndSuffixStrings, cons } const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L; if ( pRule && - IsCountedInList() && - pRule->Get( static_cast<USHORT>(GetActualListLevel()) ).IsTxtFmt() ) + IsCountedInList() ) { - return pRule->MakeNumString( GetNum()->GetNumberVector(), + SvxNumberType const& rNumberType( + pRule->Get( static_cast<USHORT>(GetActualListLevel()) ) ); + if (rNumberType.IsTxtFmt() || + // #b6432095# + (style::NumberingType::NUMBER_NONE == rNumberType.GetNumberingType())) + { + return pRule->MakeNumString( GetNum()->GetNumberVector(), _bInclPrefixAndSuffixStrings ? TRUE : FALSE, FALSE, _nRestrictToThisLevel ); + } } return aEmptyStr; @@ -2806,6 +2821,7 @@ SwTwips SwTxtNode::GetAdditionalIndentForStartingNewList() const return nAdditionalIndent; } + // --> OD 2008-12-02 #i96772# void SwTxtNode::ClearLRSpaceItemDueToListLevelIndents( SvxLRSpaceItem& o_rLRSpaceItem ) const { @@ -2875,7 +2891,7 @@ void SwTxtNode::Replace0xFF( XubString& rTxt, xub_StrLen& rTxtStt, { const XubString aExpand( static_cast<SwTxtFld const*>(pAttr)->GetFld() - .GetFld()->ExpandField( + .GetFld()->ExpandField(true)); GetDoc()->IsClipBoard())); rTxt.Insert( aExpand, nPos ); nPos = nPos + aExpand.Len(); @@ -3024,7 +3040,7 @@ BOOL SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx, { XubString const aExpand( static_cast<SwTxtFld const*>(pHt)->GetFld().GetFld() - ->ExpandField(GetDoc()->IsClipBoard())); + ->ExpandField(true)); if( aExpand.Len() ) { aDestIdx++; // dahinter einfuegen; @@ -3122,7 +3138,7 @@ const ModelToViewHelper::ConversionMap* { const XubString aExpand( static_cast<SwTxtFld const*>(pAttr)->GetFld().GetFld() - ->ExpandField(GetDoc()->IsClipBoard())); + ->ExpandField(true)); if ( aExpand.Len() > 0 ) { const xub_StrLen nFieldPos = *pAttr->GetStart(); @@ -4819,6 +4835,7 @@ bool SwTxtNode::IsInContent() const #include <unoparagraph.hxx> using namespace ::com::sun::star; +uno::Reference< rdf::XMetadatable > uno::Reference< rdf::XMetadatable > SwTxtNode::MakeUnoObject() diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx index b1f7e22984..8ba73f9d01 100644 --- a/sw/source/core/txtnode/swfont.cxx +++ b/sw/source/core/txtnode/swfont.cxx @@ -56,7 +56,10 @@ #include <editeng/postitem.hxx> #include <editeng/fhgtitem.hxx> #include <editeng/fontitem.hxx> +#include <editeng/charrotateitem.hxx> +#include <editeng/twolinesitem.hxx> #include <editeng/emphitem.hxx> +#include <editeng/charhiddenitem.hxx> #include <editeng/charscaleitem.hxx> #include <editeng/charrotateitem.hxx> #include <editeng/twolinesitem.hxx> @@ -70,11 +73,11 @@ #include <txtfrm.hxx> // SwTxtFrm #include <scriptinfo.hxx> -#if defined(WIN) || defined(WNT) || defined(PM2) +#if defined(WNT) || defined(PM2) #define FNT_LEADING_HACK #endif -#if defined(WIN) || defined(WNT) +#if defined(WNT) #define FNT_ATM_HACK #endif diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 0506964477..faa619eb6c 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -1043,7 +1043,7 @@ SwTxtAttr* MakeTxtAttr( SwDoc & rDoc, SfxPoolItem& rAttr, pNew = new SwTxtINetFmt( (SwFmtINetFmt&)rNew, nStt, nEnd ); break; case RES_TXTATR_FIELD: - pNew = new SwTxtFld( static_cast<SwFmtFld &>(rNew), nStt, + pNew = new SwTxtFld( static_cast<SwFmtFld &>(rNew), nStt ); rDoc.IsClipBoard() ); break; case RES_TXTATR_FLYCNT: @@ -2164,6 +2164,17 @@ 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()); + + +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 (pItem) { o_rClearIds.push_back(pItem->Which()); @@ -2242,6 +2253,10 @@ SwTxtNode::impl_FmtToTxtAttr(const SfxItemSet& i_rAttrSet) m_pSwpHints->Insert( MakeTxtAttr(*GetDoc(), aCurSet, aCurRange->first.first, aCurRange->first.second)); + } + m_pSwpHints->Insert( + MakeTxtAttr(*GetDoc(), aCurSet, + aCurRange->first.first, aCurRange->first.second)); } aCurRange = aRange.second; @@ -2336,6 +2351,7 @@ void SwTxtNode::FmtToTxtAttr( SwTxtNode* pNd ) SwFmtChg aTmp1( pNd->GetFmtColl() ); pNd->SwModify::Modify( &aTmp1, &aTmp1 ); } + } } } diff --git a/sw/source/core/txtnode/txtatr2.cxx b/sw/source/core/txtnode/txtatr2.cxx index de3a164255..a7e6e99cb7 100644 --- a/sw/source/core/txtnode/txtatr2.cxx +++ b/sw/source/core/txtnode/txtatr2.cxx @@ -337,4 +337,14 @@ void SwTxtMeta::ChgTxtNode(SwTxtNode * const pNode) } } +void SwTxtMeta::ChgTxtNode(SwTxtNode * const pNode) +{ + m_pTxtNode = pNode; // before Notify! + SwFmtMeta & rFmtMeta( static_cast<SwFmtMeta &>(GetAttr()) ); + if (rFmtMeta.GetTxtAttr() == this) + { + rFmtMeta.NotifyChangeTxtNode(pNode); + } +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index ed0f91e402..d94fa7b350 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -2,7 +2,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,6 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include <hintids.hxx> #include <vcl/svapp.hxx> #include <svl/itemiter.hxx> @@ -84,6 +85,7 @@ #include <vector> + using rtl::OUString; using namespace ::com::sun::star; using namespace ::com::sun::star::frame; @@ -1653,8 +1655,168 @@ void SwTxtNode::TransliterateText( String aText( GetTxt().Copy( nCurrentStart, nLen ) ); #endif + +struct TransliterationChgData +{ + xub_StrLen nStart; + xub_StrLen nLen; + String sChanged; + Sequence< sal_Int32 > aOffsets; +}; + +void SwTxtNode::TransliterateText( + utl::TransliterationWrapper& rTrans, + xub_StrLen nStt, xub_StrLen nEnd, + SwUndoTransliterate* pUndo ) + { + if (nStt < nEnd && pBreakIt->GetBreakIter().is()) + { + // since we don't use Hiragana/Katakana or half-width/full-width transliterations here + // it is fine to use ANYWORD_IGNOREWHITESPACES. (ANY_WORD btw is broken and will + // occasionaly miss words in consecutive sentences). Also with ANYWORD_IGNOREWHITESPACES + // text like 'just-in-time' will be converted to 'Just-In-Time' which seems to be the + // proper thing to do. + const sal_Int16 nWordType = WordType::ANYWORD_IGNOREWHITESPACES; + + //! In order to have less trouble with changing text size, e.g. because + //! of ligatures or � (German small sz) being resolved, we need to process + //! the text replacements from end to start. + //! This way the offsets for the yet to be changed words will be + //! left unchanged by the already replaced text. + //! For this we temporarily save the changes to be done in this vector + std::vector< TransliterationChgData > aChanges; + TransliterationChgData aChgData; + + if (rTrans.getType() == (sal_uInt32)TransliterationModulesExtra::TITLE_CASE) + { + // for 'capitalize every word' we need to iterate over each word + + Boundary aSttBndry; + Boundary aEndBndry; + aSttBndry = pBreakIt->GetBreakIter()->getWordBoundary( + GetTxt(), nStt, + pBreakIt->GetLocale( GetLang( nStt ) ), + nWordType, + TRUE /*prefer forward direction*/); + aEndBndry = pBreakIt->GetBreakIter()->getWordBoundary( + GetTxt(), nEnd, + pBreakIt->GetLocale( GetLang( nEnd ) ), + nWordType, + FALSE /*prefer backward direction*/); + + // prevent backtracking to the previous word if selection is at word boundary + if (aSttBndry.endPos <= nStt) + { + aSttBndry = pBreakIt->GetBreakIter()->nextWord( + GetTxt(), aSttBndry.endPos, + pBreakIt->GetLocale( GetLang( aSttBndry.endPos ) ), + nWordType); + } + // prevent advancing to the next word if selection is at word boundary + if (aEndBndry.startPos >= nEnd) + { + aEndBndry = pBreakIt->GetBreakIter()->previousWord( + GetTxt(), aEndBndry.startPos, + pBreakIt->GetLocale( GetLang( aEndBndry.startPos ) ), + nWordType); + } + + Boundary aCurWordBndry( aSttBndry ); + while (aCurWordBndry.startPos <= aEndBndry.startPos) + { + nStt = (xub_StrLen)aCurWordBndry.startPos; + nEnd = (xub_StrLen)aCurWordBndry.endPos; + sal_Int32 nLen = nEnd - nStt; + DBG_ASSERT( nLen > 0, "invalid word length of 0" ); +#if OSL_DEBUG_LEVEL > 1 + String aText( GetTxt().Copy( nStt, nLen ) ); +#endif + + Sequence <sal_Int32> aOffsets; + String sChgd( rTrans.transliterate( GetTxt(), GetLang( nStt ), nStt, nLen, &aOffsets )); + + if (!m_Text.Equals( sChgd, nStt, nLen )) + { + aChgData.nStart = nStt; + aChgData.nLen = nLen; + aChgData.sChanged = sChgd; + aChgData.aOffsets = aOffsets; + aChanges.push_back( aChgData ); + } + + aCurWordBndry = pBreakIt->GetBreakIter()->nextWord( + GetTxt(), nEnd, + pBreakIt->GetLocale( GetLang( nEnd ) ), + nWordType); + } + } + else if (rTrans.getType() == (sal_uInt32)TransliterationModulesExtra::SENTENCE_CASE) + { + // for 'sentence case' we need to iterate sentence by sentence + + sal_Int32 nLastStart = pBreakIt->GetBreakIter()->beginOfSentence( + GetTxt(), nEnd, + pBreakIt->GetLocale( GetLang( nEnd ) ) ); + sal_Int32 nLastEnd = pBreakIt->GetBreakIter()->endOfSentence( + GetTxt(), nLastStart, + pBreakIt->GetLocale( GetLang( nLastStart ) ) ); + + // extend nStt, nEnd to the current sentence boundaries + sal_Int32 nCurrentStart = pBreakIt->GetBreakIter()->beginOfSentence( + GetTxt(), nStt, + pBreakIt->GetLocale( GetLang( nStt ) ) ); + sal_Int32 nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence( + GetTxt(), nCurrentStart, + pBreakIt->GetLocale( GetLang( nCurrentStart ) ) ); + + // prevent backtracking to the previous sentence if selection starts at end of a sentence + if (nCurrentEnd <= nStt) + { + // now nCurrentStart is probably located on a non-letter word. (unless we + // are in Asian text with no spaces...) + // Thus to get the real sentence start we should locate the next real word, + // that is one found by DICTIONARY_WORD + i18n::Boundary aBndry = pBreakIt->GetBreakIter()->nextWord( + GetTxt(), nCurrentEnd, + pBreakIt->GetLocale( GetLang( nCurrentEnd ) ), + i18n::WordType::DICTIONARY_WORD); + + // now get new current sentence boundaries + nCurrentStart = pBreakIt->GetBreakIter()->beginOfSentence( + GetTxt(), aBndry.startPos, + pBreakIt->GetLocale( GetLang( aBndry.startPos) ) ); + nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence( + GetTxt(), nCurrentStart, + pBreakIt->GetLocale( GetLang( nCurrentStart) ) ); + } + // prevent advancing to the next sentence if selection ends at start of a sentence + if (nLastStart >= nEnd) + { + // now nCurrentStart is probably located on a non-letter word. (unless we + // are in Asian text with no spaces...) + // Thus to get the real sentence start we should locate the previous real word, + // that is one found by DICTIONARY_WORD + i18n::Boundary aBndry = pBreakIt->GetBreakIter()->previousWord( + GetTxt(), nLastStart, + pBreakIt->GetLocale( GetLang( nLastStart) ), + i18n::WordType::DICTIONARY_WORD); + nLastEnd = pBreakIt->GetBreakIter()->endOfSentence( + GetTxt(), aBndry.startPos, + pBreakIt->GetLocale( GetLang( aBndry.startPos) ) ); + if (nCurrentEnd > nLastEnd) + nCurrentEnd = nLastEnd; + } + + while (nCurrentStart < nLastEnd) + { + sal_Int32 nLen = nCurrentEnd - nCurrentStart; + DBG_ASSERT( nLen > 0, "invalid word length of 0" ); +#if OSL_DEBUG_LEVEL > 1 + String aText( GetTxt().Copy( nCurrentStart, nLen ) ); +#endif + Sequence <sal_Int32> aOffsets; - String sChgd( rTrans.transliterate( GetTxt(), + String sChgd( rTrans.transliterate( GetTxt(), GetLang( nCurrentStart ), nCurrentStart, nLen, &aOffsets )); if (!m_Text.Equals( sChgd, nStt, nLen )) @@ -1672,8 +1834,8 @@ void SwTxtNode::TransliterateText( pBreakIt->GetLocale( GetLang( nCurrentEnd ) ), nWordType); nCurrentStart = aFirstWordBndry.startPos; - nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence( - GetTxt(), nCurrentStart, + nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence( + GetTxt(), nCurrentStart, pBreakIt->GetLocale( GetLang( nCurrentStart ) ) ); } } @@ -1733,6 +1895,20 @@ void SwTxtNode::TransliterateText( ReplaceTextOnly( rData.nStart, rData.nLen, rData.sChanged, rData.aOffsets ); } } + } + + if (aChanges.size() > 0) + { + // now apply the changes from end to start to leave the offsets of the + // yet unchanged text parts remain the same. + for (size_t i = 0; i < aChanges.size(); ++i) + { + TransliterationChgData &rData = aChanges[ aChanges.size() - 1 - i ]; + if (pUndo) + pUndo->AddChanges( *this, rData.nStart, rData.nLen, rData.aOffsets ); + ReplaceTextOnly( rData.nStart, rData.nLen, rData.sChanged, rData.aOffsets ); + } + } } } diff --git a/sw/source/core/undo/makefile.mk b/sw/source/core/undo/makefile.mk deleted file mode 100644 index d48ec2d4bb..0000000000 --- a/sw/source/core/undo/makefile.mk +++ /dev/null @@ -1,81 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=undo - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - undo.src - -EXCEPTIONSFILES = \ - $(SLO)$/SwRewriter.obj \ - $(SLO)$/SwUndoField.obj \ - $(SLO)$/SwUndoFmt.obj \ - $(SLO)$/SwUndoPageDesc.obj \ - $(SLO)$/SwUndoTOXChange.obj \ - $(SLO)$/docundo.obj \ - $(SLO)$/rolbck.obj \ - $(SLO)$/unattr.obj \ - $(SLO)$/unbkmk.obj \ - $(SLO)$/undel.obj \ - $(SLO)$/undobj.obj \ - $(SLO)$/undobj1.obj \ - $(SLO)$/undoflystrattr.obj \ - $(SLO)$/undraw.obj \ - $(SLO)$/unfmco.obj \ - $(SLO)$/unins.obj \ - $(SLO)$/unmove.obj \ - $(SLO)$/unnum.obj \ - $(SLO)$/unoutl.obj \ - $(SLO)$/unovwr.obj \ - $(SLO)$/unredln.obj \ - $(SLO)$/unsect.obj \ - $(SLO)$/unsort.obj \ - $(SLO)$/unspnd.obj \ - $(SLO)$/untbl.obj \ - $(SLO)$/untblk.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx index 7c757b65dd..d7bdc60cc9 100644 --- a/sw/source/core/undo/rolbck.cxx +++ b/sw/source/core/undo/rolbck.cxx @@ -1378,7 +1378,13 @@ SwRegHistory::SwRegHistory( const SwNode& rNd, SwHistory* pHst ) void SwRegHistory::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ) { - if ( m_pHistory && ( pOld || pNew ) ) + // --> OD 2010-10-05 #i114861# + // Do not handle a "noop" modify + // - e.g. <SwTxtNode::NumRuleChgd()> uses such a "noop" modify +// if ( m_pHistory && ( pOld || pNew ) ) + if ( m_pHistory && ( pOld || pNew ) && + pOld != pNew ) + // <-- { if ( pNew->Which() < POOLATTR_END ) { diff --git a/sw/source/core/undo/undo.src b/sw/source/core/undo/undo.src index 4ad1e70b78..928c38e494 100644 --- a/sw/source/core/undo/undo.src +++ b/sw/source/core/undo/undo.src @@ -394,7 +394,7 @@ String STR_UNDO_SETRUBYATTR { Text [ en-US ] = "Ruby Setting"; }; -#102505# +// #102505# String STR_UNDO_TMPAUTOCORR { Text [ en-US ] = "AutoCorrect" ; diff --git a/sw/source/core/undo/unnum.cxx b/sw/source/core/undo/unnum.cxx index bc2be1535a..ceca2832e1 100644 --- a/sw/source/core/undo/unnum.cxx +++ b/sw/source/core/undo/unnum.cxx @@ -186,13 +186,12 @@ void SwUndoInsNum::SaveOldNumRule( const SwNumRule& rOld ) pOldNumRule = new SwNumRule( rOld ); } -/* */ +/* */ SwUndoDelNum::SwUndoDelNum( const SwPaM& rPam ) : SwUndo( UNDO_DELNUM ), SwUndRng( rPam ), - aNodeIdx( BYTE( nEndNode - nSttNode > 255 ? 255 : nEndNode - nSttNode )), - aLevels( BYTE( nEndNode - nSttNode > 255 ? 255 : nEndNode - nSttNode )) + aNodeIdx( BYTE( nEndNode - nSttNode > 255 ? 255 : nEndNode - nSttNode )) { pHistory = new SwHistory; } @@ -250,12 +249,12 @@ void SwUndoDelNum::AddNode( const SwTxtNode& rNd, BOOL ) USHORT nIns = aNodeIdx.Count(); aNodeIdx.Insert( rNd.GetIndex(), nIns ); - aLevels.Insert( static_cast<BYTE>(rNd.GetActualListLevel()), nIns ); + aLevels.insert( aLevels.begin() + nIns, static_cast<BYTE>(rNd.GetActualListLevel()) ); } } -/* */ +/* */ SwUndoMoveNum::SwUndoMoveNum( const SwPaM& rPam, long nOff, BOOL bIsOutlMv ) @@ -314,7 +313,7 @@ void SwUndoMoveNum::Repeat( SwUndoIter& rUndoIter ) rUndoIter.GetDoc().MoveParagraph( *rUndoIter.pAktPam, nOffset, FALSE ); } -/* */ +/* */ SwUndoNumUpDown::SwUndoNumUpDown( const SwPaM& rPam, short nOff ) @@ -345,7 +344,7 @@ void SwUndoNumUpDown::Repeat( SwUndoIter& rUndoIter ) rUndoIter.GetDoc().NumUpDown( *rUndoIter.pAktPam, 1 == nOffset ); } -/* */ +/* */ // #115901# SwUndoNumOrNoNum::SwUndoNumOrNoNum( const SwNodeIndex& rIdx, BOOL bOldNum, @@ -391,7 +390,7 @@ void SwUndoNumOrNoNum::Repeat( SwUndoIter& rUndoIter ) TRUE); } -/* */ +/* */ SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, BOOL bFlg ) : SwUndo( UNDO_SETNUMRULESTART ), diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index b847089d92..69b53edf32 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -1739,7 +1739,7 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd, ( nNodes != ( pSourceBox->GetSttNd()->EndOfSectionIndex() - pSourceBox->GetSttIdx() ) ) && ( nNodes - 1 > nLineDiff ); - aMvBoxes.Insert( bNodesMoved, nInsPos ); + aMvBoxes.insert( aMvBoxes.begin() + nInsPos, bNodesMoved ); } } } @@ -1799,7 +1799,7 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter ) } Ptrs.pDelSects->DeleteAndDestroy( 0, Ptrs.pDelSects->Count() ); } - else if( aMvBoxes.Count() ) + else if( !aMvBoxes.empty() ) { // dann muessen Nodes verschoben und nicht geloescht werden! // Dafuer brauchen wir aber ein temp Array diff --git a/sw/source/core/unocore/SwXTextDefaults.cxx b/sw/source/core/unocore/SwXTextDefaults.cxx index 7ca5be070f..7e43b67195 100644 --- a/sw/source/core/unocore/SwXTextDefaults.cxx +++ b/sw/source/core/unocore/SwXTextDefaults.cxx @@ -31,6 +31,8 @@ #include <com/sun/star/beans/PropertyAttribute.hpp> + + #include <osl/mutex.hxx> #include <vcl/svapp.hxx> diff --git a/sw/source/core/unocore/makefile.mk b/sw/source/core/unocore/makefile.mk deleted file mode 100644 index 09e6371ada..0000000000 --- a/sw/source/core/unocore/makefile.mk +++ /dev/null @@ -1,124 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=unocore - -# --- Settings ----------------------------------------------------- -#ENABLE_EXCEPTIONS=TRUE - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- -EXCEPTIONSFILES= \ - $(SLO)$/swunohelper.obj\ - $(SLO)$/SwXTextDefaults.obj\ - $(SLO)$/unobkm.obj\ - $(SLO)$/unochart.obj\ - $(SLO)$/unoevent.obj\ - $(SLO)$/unocrsrhelper.obj\ - $(SLO)$/unoevtlstnr.obj\ - $(SLO)$/unoftn.obj\ - $(SLO)$/unorefmk.obj\ - $(SLO)$/unosect.obj\ - $(SLO)$/unosett.obj\ - $(SLO)$/unocoll.obj\ - $(SLO)$/unodraw.obj\ - $(SLO)$/unofield.obj\ - $(SLO)$/unoframe.obj\ - $(SLO)$/unoidx.obj\ - $(SLO)$/unoobj.obj\ - $(SLO)$/unoobj2.obj\ - $(SLO)$/unoparagraph.obj\ - $(SLO)$/unoport.obj\ - $(SLO)$/unoredline.obj\ - $(SLO)$/unoredlines.obj\ - $(SLO)$/unosrch.obj\ - $(SLO)$/unostyle.obj\ - $(SLO)$/unotbl.obj \ - $(SLO)$/unoflatpara.obj\ - $(SLO)$/unotextmarkup.obj\ - $(SLO)$/TextCursorHelper.obj \ - $(SLO)$/unotext.obj - -.IF "$(GUI)$(COM)$(CPU)" == "WNTMSCI" -EXCEPTIONSNOOPTFILES =$(SLO)$/unoportenum.obj -.ELSE -EXCEPTIONSFILES +=$(SLO)$/unoportenum.obj -.ENDIF - - -SRS1NAME=$(TARGET) -SRC1FILES = \ - unocore.src - -SLOFILES = \ - $(SLO)$/swunohelper.obj\ - $(SLO)$/SwXTextDefaults.obj\ - $(SLO)$/unoportenum.obj\ - $(SLO)$/unobkm.obj\ - $(SLO)$/unochart.obj\ - $(SLO)$/unoevent.obj\ - $(SLO)$/unocrsrhelper.obj\ - $(SLO)$/unoevtlstnr.obj\ - $(SLO)$/unoftn.obj\ - $(SLO)$/unorefmk.obj\ - $(SLO)$/unosect.obj\ - $(SLO)$/unosett.obj\ - $(SLO)$/unocoll.obj\ - $(SLO)$/unodraw.obj\ - $(SLO)$/unofield.obj\ - $(SLO)$/unoframe.obj\ - $(SLO)$/unoidx.obj\ - $(SLO)$/unoobj.obj\ - $(SLO)$/unoobj2.obj\ - $(SLO)$/unoparagraph.obj\ - $(SLO)$/unoport.obj\ - $(SLO)$/unoredline.obj\ - $(SLO)$/unoredlines.obj\ - $(SLO)$/unosrch.obj\ - $(SLO)$/unostyle.obj\ - $(SLO)$/unotbl.obj \ - $(SLO)$/unoflatpara.obj\ - $(SLO)$/unotextmarkup.obj\ - $(SLO)$/TextCursorHelper.obj \ - $(SLO)$/unotext.obj\ - $(SLO)$/unomap.obj\ - $(SLO)$/unoprnms.obj\ - $(SLO)$/XMLRangeHelper.obj - - - -# --- Targets ------------------------------------------------------- - - -.INCLUDE : target.mk - diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index 99a3ee8ab8..0d22fd2f3b 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -568,6 +568,32 @@ uno::Any SwXFieldmarkParameters::getByName(const OUString& aName) uno::Sequence<OUString> SwXFieldmarkParameters::getElementNames() throw (uno::RuntimeException) { + vos::OGuard aGuard(Application::GetSolarMutex()); + IFieldmark::parameter_map_t* pParameters = getCoreParameters(); + uno::Sequence<OUString> vResult(pParameters->size()); + OUString* pOutEntry = vResult.getArray(); + for(IFieldmark::parameter_map_t::iterator pEntry = pParameters->begin(); pEntry!=pParameters->end(); ++pEntry, ++pOutEntry) + *pOutEntry = pEntry->first; + return vResult; +} + +::sal_Bool SwXFieldmarkParameters::hasByName(const OUString& aName) + throw (uno::RuntimeException) +{ + vos::OGuard aGuard(Application::GetSolarMutex()); + IFieldmark::parameter_map_t* pParameters = getCoreParameters(); + return (pParameters->find(aName) != pParameters->end()); +} + +uno::Type SwXFieldmarkParameters::getElementType() + throw (uno::RuntimeException) +{ + return ::cppu::UnoType< ::cppu::UnoVoidType>::get(); +} + +::sal_Bool SwXFieldmarkParameters::hasElements() + throw (uno::RuntimeException) +{ SolarMutexGuard aGuard; IFieldmark::parameter_map_t* pParameters = getCoreParameters(); uno::Sequence<OUString> vResult(pParameters->size()); @@ -624,6 +650,13 @@ void SwXFieldmark::attachToRange( const uno::Reference < text::XTextRange >& xTe ::rtl::OUString SwXFieldmark::getFieldType(void) throw(uno::RuntimeException) { + attachToRangeEx( xTextRange, + ( isReplacementObject ? IDocumentMarkAccess::CHECKBOX_FIELDMARK : IDocumentMarkAccess::TEXT_FIELDMARK ) ); +} + +::rtl::OUString SwXFieldmark::getFieldType(void) + throw(uno::RuntimeException) +{ SolarMutexGuard aGuard; const IFieldmark *pBkm = dynamic_cast<const IFieldmark*>(GetBookmark()); if(!pBkm) diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index f897018029..17072f79be 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -2,7 +2,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 diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index cbdadc1aaa..0ee4d7ae02 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -914,6 +914,7 @@ void InsertFile(SwUnoCrsr* pUnoCrsr, if( !pMed ) return; + // this sourcecode is not responsible for the lifetime of the shell, SfxObjectShellLock should not be used SfxObjectShellRef aRef( pDocSh ); pDocSh->RegisterTransfer( *pMed ); diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 9e6721955a..a10de19ea0 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -1179,13 +1179,16 @@ uno::Reference< beans::XPropertySet > SwXTextField::getTextFieldMaster(void) th OUString SwXTextField::getPresentation(sal_Bool bShowCommand) throw( uno::RuntimeException ) { SolarMutexGuard aGuard; - OUString sRet; - const SwField* pField = GetField(); - if(pField) - sRet = pField->GetCntnt(bShowCommand); - else + + SwField const*const pField = GetField(); + if (!pField) + { throw uno::RuntimeException(); - return sRet; + } + ::rtl::OUString const ret( (bShowCommand) + ? pField->GetFieldName() + : pField->ExpandField(true) ); + return ret; } void SwXTextField::attachToRange( diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx index f1ff84cc3e..f3bf570f1e 100644 --- a/sw/source/core/unocore/unoflatpara.cxx +++ b/sw/source/core/unocore/unoflatpara.cxx @@ -45,6 +45,7 @@ #include <viewimp.hxx> #include <breakit.hxx> #include <pam.hxx> +#include <unobaseclass.hxx> #include <unotextrange.hxx> #include <pagefrm.hxx> #include <cntfrm.hxx> @@ -530,4 +531,4 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaBefore(c return xRet; } -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index ff61c24bdc..235a4171cc 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -487,6 +487,7 @@ lcl_CreateMetaPortion( return pPortion; } +//----------------------------------------------------------------------------- static void lcl_ExportBookmark( TextRangeList_t & rPortions, diff --git a/sw/source/core/unocore/unosrch.cxx b/sw/source/core/unocore/unosrch.cxx index 72fcad4e78..416debd38a 100644 --- a/sw/source/core/unocore/unosrch.cxx +++ b/sw/source/core/unocore/unosrch.cxx @@ -169,7 +169,17 @@ void SwSearchProperties_Impl::FillItemSet(SfxItemSet& rSet, sal_Bool bIsValueSea *pContourItem = 0, *pCharColorItem = 0, *pCasemapItem = 0, - *pBrushItem = 0; + *pBrushItem = 0, + *pFontCJKItem = 0, + *pFontSizeCJKItem = 0, + *pCJKLangItem = 0, + *pCJKPostureItem = 0, + *pCJKWeightItem = 0, + *pFontCTLItem = 0, + *pFontSizeCTLItem = 0, + *pCTLLangItem = 0, + *pCTLPostureItem = 0, + *pCTLWeightItem = 0; PropertyEntryVector_t::const_iterator aIt = aPropertyEntries.begin(); for(sal_uInt32 i = 0; i < nArrLen; i++, ++aIt) @@ -354,6 +364,56 @@ void SwSearchProperties_Impl::FillItemSet(SfxItemSet& rSet, sal_Bool bIsValueSea pWLineItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone(); pTempItem = pWLineItem; break; + case RES_CHRATR_CJK_FONT: + if(!pFontCJKItem ) + pFontCJKItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone(); + pTempItem = pFontCJKItem; + break; + case RES_CHRATR_CJK_FONTSIZE: + if(!pFontSizeCJKItem ) + pFontSizeCJKItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone(); + pTempItem = pFontSizeCJKItem; + break; + case RES_CHRATR_CJK_LANGUAGE: + if(!pCJKLangItem ) + pCJKLangItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone(); + pTempItem = pCJKLangItem; + break; + case RES_CHRATR_CJK_POSTURE: + if(!pCJKPostureItem ) + pCJKPostureItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone(); + pTempItem = pCJKPostureItem; + break; + case RES_CHRATR_CJK_WEIGHT: + if(!pCJKWeightItem ) + pCJKWeightItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone(); + pTempItem = pCJKWeightItem; + break; + case RES_CHRATR_CTL_FONT: + if(!pFontCTLItem ) + pFontCTLItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone(); + pTempItem = pFontCTLItem; + break; + case RES_CHRATR_CTL_FONTSIZE: + if(!pFontSizeCTLItem ) + pFontSizeCTLItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone(); + pTempItem = pFontSizeCTLItem; + break; + case RES_CHRATR_CTL_LANGUAGE: + if(!pCTLLangItem ) + pCTLLangItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone(); + pTempItem = pCTLLangItem; + break; + case RES_CHRATR_CTL_POSTURE: + if(!pCTLPostureItem ) + pCTLPostureItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone(); + pTempItem = pCTLPostureItem; + break; + case RES_CHRATR_CTL_WEIGHT: + if(!pCTLWeightItem ) + pCTLWeightItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone(); + pTempItem = pCTLWeightItem; + break; } if(pTempItem) { diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 2401fa1686..ad185f2905 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -3440,8 +3440,8 @@ MakeObject: { const SwPageDesc& rDesc = aBase.GetOldPageDesc(); const SwFrmFmt* pFrmFmt = 0; - sal_Bool bShare = (bHeader && rDesc.IsHeaderShared()) || - (!bHeader && rDesc.IsFooterShared()); + sal_Bool bShare = (bHeader && rDesc.IsHeaderShared())|| + (!bHeader && rDesc.IsFooterShared()); // TextLeft returns the left content if there is one, // Text and TextRight return the master content. // TextRight does the same as Text and is for @@ -3451,7 +3451,6 @@ MakeObject: pFrmFmt = &rDesc.GetLeft(); } else - { pFrmFmt = &rDesc.GetMaster(); } const uno::Reference< text::XText > xRet = @@ -3775,11 +3774,11 @@ SwAutoStylesEnumImpl::SwAutoStylesEnumImpl( SwDoc* pInitDoc, IStyleAccess::SwAut { std::set< std::pair< USHORT, USHORT > > aRubyMap; SwAttrPool& rAttrPool = pDoc->GetAttrPool(); - USHORT nCount = rAttrPool.GetItemCount( RES_TXTATR_CJK_RUBY ); + sal_uInt32 nCount = rAttrPool.GetItemCount2( RES_TXTATR_CJK_RUBY ); - for ( USHORT nI = 0; nI < nCount; ++nI ) + for ( sal_uInt32 nI = 0; nI < nCount; ++nI ) { - const SwFmtRuby* pItem = static_cast<const SwFmtRuby*>(rAttrPool.GetItem( RES_TXTATR_CJK_RUBY, nI )); + const SwFmtRuby* pItem = static_cast<const SwFmtRuby*>(rAttrPool.GetItem2( RES_TXTATR_CJK_RUBY, nI )); if ( pItem && pItem->GetTxtRuby() ) { std::pair< USHORT, USHORT > aPair( pItem->GetPosition(), pItem->GetAdjustment() ); diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 68e7d6b29f..4f06506ed5 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -82,6 +82,7 @@ #include <com/sun/star/chart2/data/XLabeledDataSequence.hpp> #include <com/sun/star/table/CellContentType.hpp> #include <unotextrange.hxx> +#include <unotextrange.hxx> #include <unotextcursor.hxx> #include <unoparagraph.hxx> #include <svl/zforlist.hxx> // SvNumberFormatter @@ -102,9 +103,11 @@ #include <rtl/math.hxx> #include <editeng/frmdiritem.hxx> + using namespace ::com::sun::star; using ::rtl::OUString; +//----------------------------------------------------------------------------- // from swtable.cxx extern void lcl_GetTblBoxColStr( sal_uInt16 nCol, String& rNm ); @@ -478,6 +481,38 @@ String lcl_GetCellName( sal_Int32 nColumn, sal_Int32 nRow ) @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; +} + + @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; @@ -658,7 +693,7 @@ void lcl_SetTblSeparators(const uno::Any& rVal, SwTable* pTable, SwTableBox* pBo { aCols[i] = pArray[i].Position; if(pArray[i].IsVisible == aCols.IsHidden(i) || - (!bRow && aCols.IsHidden(i)) || + (!bRow && aCols.IsHidden(i)) || long(aCols[i] - long(nLastValue)) < 0 || UNO_TABLE_COLUMN_SUM < aCols[i] ) { @@ -1741,7 +1776,6 @@ uno::Reference< beans::XPropertySetInfo > SwXTextTableCursor::getPropertySetInf static uno::Reference< beans::XPropertySetInfo > xRef = m_pPropSet->getPropertySetInfo(); return xRef; } - void SwXTextTableCursor::setPropertyValue(const OUString& rPropertyName, const uno::Any& aValue) throw( beans::UnknownPropertyException, @@ -3172,9 +3206,9 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, const SwFrmFmt* pBoxFmt = pBox->GetFrmFmt(); const SvxBoxItem& rBox = pBoxFmt->GetBox(); if( - (aTableBorderDistances.IsLeftDistanceValid && nLeftDistance != rBox.GetDistance( BOX_LINE_LEFT )) || - (aTableBorderDistances.IsRightDistanceValid && nRightDistance != rBox.GetDistance( BOX_LINE_RIGHT )) || - (aTableBorderDistances.IsTopDistanceValid && nTopDistance != rBox.GetDistance( BOX_LINE_TOP )) || + (aTableBorderDistances.IsLeftDistanceValid && nLeftDistance != rBox.GetDistance( BOX_LINE_LEFT )) || + (aTableBorderDistances.IsRightDistanceValid && nRightDistance != rBox.GetDistance( BOX_LINE_RIGHT )) || + (aTableBorderDistances.IsTopDistanceValid && nTopDistance != rBox.GetDistance( BOX_LINE_TOP )) || (aTableBorderDistances.IsBottomDistanceValid && nBottomDistance != rBox.GetDistance( BOX_LINE_BOTTOM ))) { SvxBoxItem aSetBox( rBox ); diff --git a/sw/source/core/view/makefile.mk b/sw/source/core/view/makefile.mk deleted file mode 100644 index 0ac0e0d106..0000000000 --- a/sw/source/core/view/makefile.mk +++ /dev/null @@ -1,61 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=view -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/vdraw.obj \ - $(SLO)$/viewimp.obj \ - $(SLO)$/viewsh.obj \ - $(SLO)$/pagepreviewlayout.obj \ - $(SLO)$/printdata.obj \ - $(SLO)$/viewpg.obj \ - $(SLO)$/vnew.obj \ - $(SLO)$/vprint.obj - - - -EXCEPTIONSFILES = \ - $(SLO)$/pagepreviewlayout.obj - - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx index 364a5f2322..e770f4f642 100644 --- a/sw/source/core/view/printdata.cxx +++ b/sw/source/core/view/printdata.cxx @@ -38,7 +38,6 @@ #include <wdocsh.hxx> #include <viewsh.hxx> #include <docfld.hxx> -#include <swprtopt.hxx> #include <svl/languageoptions.hxx> #include <toolkit/awt/vclxdevice.hxx> @@ -100,8 +99,8 @@ void SwRenderData::DeletePostItData() { if (HasPostItData()) { - m_pPostItDoc->setPrinter( 0, false, false ); // So that the printer remains at the real DOC - delete m_pPostItShell; + m_pPostItDoc->setPrinter( 0, false, false ); //damit am echten DOC der Drucker bleibt + delete m_pPostItShell; //Nimmt das PostItDoc mit ins Grab. delete m_pPostItFields; m_pPostItDoc = 0; m_pPostItShell = 0; @@ -123,9 +122,9 @@ void SwRenderData::ViewOptionAdjustStart( SwWrtShell &rSh, const SwViewOption &r } m_pViewOptionAdjust = new SwViewOptionAdjust_Impl( rSh, rViewOptions ); } - -void SwRenderData::ViewOptionAdjust( const SwPrtOptions *pPrtOptions ) + +void SwRenderData::ViewOptionAdjust(SwPrintData const*const pPrtOptions) { m_pViewOptionAdjust->AdjustViewOptions( pPrtOptions ); } @@ -137,24 +136,24 @@ void SwRenderData::ViewOptionAdjustStop() { delete m_pViewOptionAdjust; m_pViewOptionAdjust = 0; - } + } } -void SwRenderData::MakeSwPrtOptions( - SwPrtOptions &rOptions, +void SwRenderData::MakeSwPrtOptions( + SwPrintData & rOptions, const SwDocShell *pDocShell, const SwPrintUIOptions *pOpt, - const SwRenderData *pData, + const SwRenderData *pData, bool bIsPDFExport ) { if (!pDocShell || !pOpt || !pData) return; - + // get default print options const TypeId aSwWebDocShellTypeId = TYPE(SwWebDocShell); BOOL bWeb = pDocShell->IsA( aSwWebDocShellTypeId ); - rOptions.MakeOptions( bWeb ); + ::sw::InitPrintOptionsFromApplication(rOptions, bWeb); // get print options to use from provided properties rOptions.bPrintGraphic = pOpt->IsPrintGraphics(); @@ -181,19 +180,8 @@ void SwRenderData::MakeSwPrtOptions( //! function will destroy the pointers rOptions.SetPrintUIOptions( pOpt ); rOptions.SetRenderData( pData ); - - // rOptions.aMulti is not used anymore in the XRenderable API - // Thus we set it to a dummy value here. - rOptions.aMulti = MultiSelection( Range( 1, 1 ) ); - - //! Note: Since for PDF export of (multi-)selection a temporary - //! document is created that contains only the selects parts, - //! and thus that document is to printed in whole the, - //! rOptions.bPrintSelection parameter will be false. - if (bIsPDFExport) - rOptions.bPrintSelection = FALSE; } - + ////////////////////////////////////////////////////////////////////// @@ -208,8 +196,8 @@ SwPrintUIOptions::SwPrintUIOptions( { ResStringArray aLocalizedStrings( SW_RES( STR_PRINTOPTUI ) ); - DBG_ASSERT( aLocalizedStrings.Count() >= 44, "resource incomplete" ); - if( aLocalizedStrings.Count() < 44 ) // bad resource ? + DBG_ASSERT( aLocalizedStrings.Count() >= 30, "resource incomplete" ); + if( aLocalizedStrings.Count() < 30 ) // bad resource ? return; // printing HTML sources does not have any valid UI options. @@ -236,7 +224,7 @@ SwPrintUIOptions::SwPrintUIOptions( String aAppGroupname( aLocalizedStrings.GetString( 0 ) ); aAppGroupname.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ), aModOpt.GetModuleName( SvtModuleOptions::E_SWRITER ) ); - m_aUIProperties[ nIdx++ ].Value = getGroupControlOpt( aAppGroupname, rtl::OUString() ); + m_aUIProperties[ nIdx++ ].Value = getGroupControlOpt( aAppGroupname, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:TabPage:AppPage" ) ) ); // create sub section for Contents m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 1 ), rtl::OUString() ); @@ -244,105 +232,109 @@ SwPrintUIOptions::SwPrintUIOptions( // create a bool option for background bool bDefaultVal = rDefaultPrintData.IsPrintPageBackground(); m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 2 ), - aLocalizedStrings.GetString( 3 ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPageBackground" ) ), - bDefaultVal ); + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintPageBackground:CheckBox" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPageBackground" ) ), + bDefaultVal ); // create a bool option for pictures/graphics AND OLE and drawing objects as well bDefaultVal = rDefaultPrintData.IsPrintGraphic() || rDefaultPrintData.IsPrintDraw(); - m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 4 ), - aLocalizedStrings.GetString( 5 ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPicturesAndObjects" ) ), - bDefaultVal ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 3 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintPicturesAndObjects:CheckBox" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPicturesAndObjects" ) ), + bDefaultVal ); if (!bWeb) { // create a bool option for hidden text bDefaultVal = rDefaultPrintData.IsPrintHiddenText(); - m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 6 ), - aLocalizedStrings.GetString( 7 ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintHiddenText" ) ), - bDefaultVal ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 4 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintHiddenText:CheckBox" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintHiddenText" ) ), + bDefaultVal ); // create a bool option for place holder bDefaultVal = rDefaultPrintData.IsPrintTextPlaceholder(); - m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 8 ), - aLocalizedStrings.GetString( 9 ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintTextPlaceholder" ) ), - bDefaultVal ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 5 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintTextPlaceholder:CheckBox" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintTextPlaceholder" ) ), + bDefaultVal ); } // create a bool option for controls bDefaultVal = rDefaultPrintData.IsPrintControl(); - m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 10 ), - aLocalizedStrings.GetString( 11 ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintControls" ) ), - bDefaultVal ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 6 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintControls:CheckBox" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintControls" ) ), + bDefaultVal ); // create sub section for Color - m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 12 ), rtl::OUString() ); + m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 7 ), rtl::OUString() ); // create a bool option for printing text with black font color bDefaultVal = rDefaultPrintData.IsPrintBlackFont(); - m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 13 ), - aLocalizedStrings.GetString( 14 ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintBlackFonts" ) ), - bDefaultVal ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 8 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintBlackFonts:CheckBox" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintBlackFonts" ) ), + bDefaultVal ); if (!bWeb) { // create subgroup for misc options - m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 15 ) ), rtl::OUString() ); + m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 9 ) ), rtl::OUString() ); // create a bool option for printing automatically inserted blank pages bDefaultVal = rDefaultPrintData.IsPrintEmptyPages(); - m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 16 ), - aLocalizedStrings.GetString( 17 ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintEmptyPages" ) ), - bDefaultVal ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 10 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintEmptyPages:CheckBox" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintEmptyPages" ) ), + bDefaultVal ); } // create a bool option for paper tray bDefaultVal = rDefaultPrintData.IsPaperFromSetup(); vcl::PrinterOptionsHelper::UIControlOptions aPaperTrayOpt; aPaperTrayOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OptionsPageOptGroup" ) ); - m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 18 ), - aLocalizedStrings.GetString( 19 ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPaperFromSetup" ) ), - bDefaultVal, - aPaperTrayOpt - ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 11 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintPaperFromSetup:CheckBox" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPaperFromSetup" ) ), + bDefaultVal, + aPaperTrayOpt + ); // print range selection vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt; aPrintRangeOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) ); aPrintRangeOpt.mbInternalOnly = sal_True; - m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 37 ) ), + m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 26 ) ), rtl::OUString(), aPrintRangeOpt ); // create a choice for the content to create rtl::OUString aPrintRangeName( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) ); - uno::Sequence< rtl::OUString > aChoices( bHasSelection ? 3 : 2 ); - uno::Sequence< rtl::OUString > aHelpText( bHasSelection ? 3 : 2 ); - aChoices[0] = aLocalizedStrings.GetString( 38 ); - aHelpText[0] = aLocalizedStrings.GetString( 39 ); - aChoices[1] = aLocalizedStrings.GetString( 40 ); - aHelpText[1] = aLocalizedStrings.GetString( 41 ); - if (bHasSelection) - { - aChoices[2] = aLocalizedStrings.GetString( 42 ); - aHelpText[2] = aLocalizedStrings.GetString( 43 ); - } + uno::Sequence< rtl::OUString > aChoices( 3 ); + uno::Sequence< sal_Bool > aChoicesDisabled( 3 ); + uno::Sequence< rtl::OUString > aHelpIds( 3 ); + aChoices[0] = aLocalizedStrings.GetString( 27 ); + aChoicesDisabled[0] = sal_False; + aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0" ) ); + aChoices[1] = aLocalizedStrings.GetString( 28 ); + aChoicesDisabled[1] = sal_False; + aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1" ) ); + aChoices[2] = aLocalizedStrings.GetString( 29 ); + aChoicesDisabled[2] = sal_Bool(! bHasSelection); + aHelpIds[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:2" ) ); m_aUIProperties[nIdx++].Value = getChoiceControlOpt( rtl::OUString(), - aHelpText, + aHelpIds, aPrintRangeName, aChoices, - bHasSelection ? 2 /*enable 'Selection' radio button*/ : 0 /* enable 'All pages' */); + bHasSelection ? 2 /*enable 'Selection' radio button*/ : 0 /* enable 'All pages' */, + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Radio" ) ), + aChoicesDisabled + ); // create a an Edit dependent on "Pages" selected vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, sal_True ); m_aUIProperties[nIdx++].Value = getEditControlOpt( rtl::OUString(), - rtl::OUString(), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PageRange:Edit" ) ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ), rtl::OUString(), aPageRangeOpt @@ -350,30 +342,31 @@ SwPrintUIOptions::SwPrintUIOptions( // print content selection vcl::PrinterOptionsHelper::UIControlOptions aContentsOpt; aContentsOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "JobPage" ) ); - m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 20 ) ), + m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 12 ) ), rtl::OUString(), aContentsOpt ); // create a list box for notes content const sal_Int16 nPrintPostIts = rDefaultPrintData.GetPrintPostIts(); aChoices.realloc( 4 ); - aChoices[0] = aLocalizedStrings.GetString( 21 ); - aChoices[1] = aLocalizedStrings.GetString( 22 ); - aChoices[2] = aLocalizedStrings.GetString( 23 ); - aChoices[3] = aLocalizedStrings.GetString( 24 ); - aHelpText.realloc( 2 ); - aHelpText[0] = aLocalizedStrings.GetString( 25 ); - aHelpText[1] = aLocalizedStrings.GetString( 25 ); + aChoices[0] = aLocalizedStrings.GetString( 13 ); + aChoices[1] = aLocalizedStrings.GetString( 14 ); + aChoices[2] = aLocalizedStrings.GetString( 15 ); + aChoices[3] = aLocalizedStrings.GetString( 16 ); + aHelpIds.realloc( 2 ); + aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintAnnotationMode:FixedText" ) ); + aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintAnnotationMode:ListBox" ) ); vcl::PrinterOptionsHelper::UIControlOptions aAnnotOpt( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspect" ) ), 0, sal_False ); aAnnotOpt.mbEnabled = bHasPostIts; - m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( aLocalizedStrings.GetString( 26 ), - aHelpText, - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintAnnotationMode" ) ), - aChoices, - nPrintPostIts, - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ), - aAnnotOpt - ); + m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( aLocalizedStrings.GetString( 17 ), + aHelpIds, + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintAnnotationMode" ) ), + aChoices, + nPrintPostIts, + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ), + uno::Sequence< sal_Bool >(), + aAnnotOpt + ); // create subsection for Page settings vcl::PrinterOptionsHelper::UIControlOptions aPageSetOpt; @@ -381,16 +374,16 @@ SwPrintUIOptions::SwPrintUIOptions( if (!bWeb) { - m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 27 ) ), + m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 18 ) ), rtl::OUString(), aPageSetOpt ); uno::Sequence< rtl::OUString > aRLChoices( 3 ); - aRLChoices[0] = aLocalizedStrings.GetString( 28 ); - aRLChoices[1] = aLocalizedStrings.GetString( 29 ); - aRLChoices[2] = aLocalizedStrings.GetString( 30 ); + aRLChoices[0] = aLocalizedStrings.GetString( 19 ); + aRLChoices[1] = aLocalizedStrings.GetString( 20 ); + aRLChoices[2] = aLocalizedStrings.GetString( 21 ); uno::Sequence< rtl::OUString > aRLHelp( 1 ); - aRLHelp[0] = aLocalizedStrings.GetString( 31 ); + aRLHelp[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintLeftRightPages:ListBox" ) ); // create a choice option for all/left/right pages // 0 : all pages (left & right) // 1 : left pages @@ -402,7 +395,7 @@ SwPrintUIOptions::SwPrintUIOptions( nPagesChoice = 1; else if (!rDefaultPrintData.IsPrintLeftPage() && rDefaultPrintData.IsPrintRightPage()) nPagesChoice = 2; - m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( aLocalizedStrings.GetString( 32 ), + m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( aLocalizedStrings.GetString( 22 ), aRLHelp, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintLeftRightPages" ) ), aRLChoices, @@ -414,31 +407,34 @@ SwPrintUIOptions::SwPrintUIOptions( // create a bool option for brochure bDefaultVal = rDefaultPrintData.IsPrintProspect(); rtl::OUString aBrochurePropertyName( RTL_CONSTASCII_USTRINGPARAM( "PrintProspect" ) ); - m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 33 ), - aLocalizedStrings.GetString( 34 ), - aBrochurePropertyName, - bDefaultVal, - aPageSetOpt - ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 23 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintProspect:CheckBox" ) ), + aBrochurePropertyName, + bDefaultVal, + aPageSetOpt + ); if (bCTL) { // create a bool option for brochure RTL dependent on brochure uno::Sequence< rtl::OUString > aBRTLChoices( 2 ); - aBRTLChoices[0] = aLocalizedStrings.GetString( 35 ); - aBRTLChoices[1] = aLocalizedStrings.GetString( 36 ); + aBRTLChoices[0] = aLocalizedStrings.GetString( 24 ); + aBRTLChoices[1] = aLocalizedStrings.GetString( 25 ); vcl::PrinterOptionsHelper::UIControlOptions aBrochureRTLOpt( aBrochurePropertyName, -1, sal_True ); + uno::Sequence< rtl::OUString > aBRTLHelpIds( 1 ); + aBRTLHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintProspectRTL:ListBox" ) ); aBrochureRTLOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutPage" ) ); // RTL brochure choices // 0 : left-to-right // 1 : right-to-left const sal_Int16 nBRTLChoice = rDefaultPrintData.IsPrintProspectRTL() ? 1 : 0; m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( rtl::OUString(), - uno::Sequence< rtl::OUString >(), + aBRTLHelpIds, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspectRTL" ) ), aBRTLChoices, nBRTLChoice, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ), + uno::Sequence< sal_Bool >(), aBrochureRTLOpt ); } diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx index a1e2d450f0..f2469f7ee7 100644 --- a/sw/source/core/view/vdraw.cxx +++ b/sw/source/core/view/vdraw.cxx @@ -51,7 +51,7 @@ #include "viewimp.hxx" #include "dflyobj.hxx" #include "viewopt.hxx" -#include "swprtopt.hxx" +#include "printdata.hxx" #include "dcontact.hxx" #include "dview.hxx" #include "flyfrm.hxx" @@ -60,6 +60,7 @@ #include <IDocumentDrawModelAccess.hxx> + void SwViewImp::StartAction() { if ( HasDrawView() ) @@ -100,7 +101,7 @@ void SwViewImp::UnlockPaint() } void SwViewImp::PaintLayer( const SdrLayerID _nLayerID, - const SwPrtOptions * _pPrintData, + SwPrintData const*const pPrintData, const SwRect& , const Color* _pPageBackgrdColor, const bool _bIsPageRightToLeft ) const @@ -144,11 +145,11 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID, } pOutDev->Push( PUSH_LINECOLOR ); // #114231# - if (_pPrintData) + if (pPrintData) { // hide drawings but not form controls (form controls are handled elsewhere) SdrView &rSdrView = const_cast< SdrView & >(GetPageView()->GetView()); - rSdrView.setHideDraw( !_pPrintData->IsPrintDraw() ); + rSdrView.setHideDraw( !pPrintData->IsPrintDraw() ); } GetPageView()->DrawLayer(_nLayerID, pOutDev); pOutDev->Pop(); diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx index 5b7e034885..9572e646de 100644 --- a/sw/source/core/view/viewpg.cxx +++ b/sw/source/core/view/viewpg.cxx @@ -42,7 +42,7 @@ #include <rootfrm.hxx> #include <viewimp.hxx> #include <viewopt.hxx> -#include <swprtopt.hxx> // SwPrtOptions +#include <printdata.hxx> #include <fldbas.hxx> #include <ptqueue.hxx> #include <swregion.hxx> @@ -70,7 +70,7 @@ void ViewShell::ShowPreViewSelection( sal_uInt16 nSelPage ) } //#i6467# adjust view options for page preview -void ViewShell::AdjustOptionsForPagePreview( const SwPrtOptions &_rPrintOptions ) +void ViewShell::AdjustOptionsForPagePreview(SwPrintData const& rPrintOptions) { if ( !IsPreView() ) { @@ -78,7 +78,7 @@ void ViewShell::AdjustOptionsForPagePreview( const SwPrtOptions &_rPrintOptions return; } - PrepareForPrint( _rPrintOptions ); + PrepareForPrint( rPrintOptions ); return; } diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 72dcebcd0e..c1c5ae9692 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1104,6 +1104,7 @@ void ViewShell::VisPortChgd( const SwRect &rRect) pPostItMgr->CalcRects(); pPostItMgr->LayoutPostIts(); } + // <-- if ( !bScrolled && pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ) pPostItMgr->CorrectPositions(); @@ -2230,6 +2231,9 @@ SwAccessibleMap* ViewShell::GetAccessibleMap() return 0; } + + return 0; +} void ViewShell::ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions) { if(pOpt->IsPagePreview() && !rAccessibilityOptions.GetIsForPagePreviews()) diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx index b37a3833d4..7211054658 100644 --- a/sw/source/core/view/vprint.cxx +++ b/sw/source/core/view/vprint.cxx @@ -71,7 +71,7 @@ #include <docufld.hxx> // PostItFld /-Type #include <shellres.hxx> #include <viewopt.hxx> -#include <swprtopt.hxx> // SwPrtOptions +#include <printdata.hxx> // SwPrintData #include <pagedesc.hxx> #include <poolfmt.hxx> #include <mdiexp.hxx> @@ -341,100 +341,6 @@ void ViewShell::CalcPagesForPrint( USHORT nMax ) /******************************************************************************/ -SwDoc * ViewShell::CreatePrtDoc( SfxObjectShellRef &rDocShellRef) -{ - OSL_ENSURE( this->IsA( TYPE(SwFEShell) ),"ViewShell::Prt for FEShell only"); - SwFEShell* pFESh = (SwFEShell*)this; - - SwDoc *pPrtDoc = new SwDoc; - pPrtDoc->acquire(); - pPrtDoc->SetRefForDocShell( (SfxObjectShellRef*)&(long&)rDocShellRef ); - pPrtDoc->LockExpFlds(); - - const SfxPoolItem* pCpyItem; - const SfxItemPool& rPool = GetAttrPool(); - for( USHORT nWh = POOLATTR_BEGIN; nWh < POOLATTR_END; ++nWh ) - if( 0 != ( pCpyItem = rPool.GetPoolDefaultItem( nWh ) ) ) - pPrtDoc->GetAttrPool().SetPoolDefaultItem( *pCpyItem ); - - pPrtDoc->ReplaceStyles( *GetDoc() ); - - SwShellCrsr *pActCrsr = pFESh->_GetCrsr(); - SwShellCrsr *pFirstCrsr = dynamic_cast<SwShellCrsr*>(pActCrsr->GetNext()); - if( !pActCrsr->HasMark() ) - { - pActCrsr = dynamic_cast<SwShellCrsr*>(pActCrsr->GetPrev()); - } - - Point aSelPoint; - if( pFESh->IsTableMode() ) - { - SwShellTableCrsr* pShellTblCrsr = pFESh->GetTableCrsr(); - - const SwCntntNode* pCntntNode = pShellTblCrsr->GetNode()->GetCntntNode(); - const SwCntntFrm *pCntntFrm = pCntntNode ? pCntntNode->GetFrm( 0, pShellTblCrsr->Start() ) : 0; - if( pCntntFrm ) - { - SwRect aCharRect; - SwCrsrMoveState aTmpState( MV_NONE ); - pCntntFrm->GetCharRect( aCharRect, *pShellTblCrsr->Start(), &aTmpState ); - aSelPoint = Point( aCharRect.Left(), aCharRect.Top() ); - } - } - else - { - aSelPoint = pFirstCrsr->GetSttPos(); - } - - const SwPageFrm* pPage = GetLayout()->GetPageAtPos( aSelPoint ); - OSL_ENSURE( pPage, "no page found!" ); - - // get page descriptor - fall back to the first one if pPage could not be found - const SwPageDesc* pPageDesc = pPage ? pPrtDoc->FindPageDescByName( - pPage->GetPageDesc()->GetName() ) : &pPrtDoc->_GetPageDesc( (sal_uInt16)0 ); - - if( !pFESh->IsTableMode() && pActCrsr->HasMark() ) - { - SwNodeIndex aNodeIdx( *pPrtDoc->GetNodes().GetEndOfContent().StartOfSectionNode() ); - SwTxtNode* pTxtNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx )->GetTxtNode(); - SwCntntNode *pLastNd = - pActCrsr->GetCntntNode( (*pActCrsr->GetMark()) <= (*pActCrsr->GetPoint()) ); - - if( pLastNd && pLastNd->IsTxtNode() ) - ((SwTxtNode*)pLastNd)->CopyCollFmt( *pTxtNd ); - } - - - pFESh->Copy( pPrtDoc ); - - { - SwNodeIndex aNodeIdx( *pPrtDoc->GetNodes().GetEndOfContent().StartOfSectionNode() ); - SwCntntNode* pCNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx ); - if( pFESh->IsTableMode() ) - { - SwTableNode* pTNd = pCNd->FindTableNode(); - if( pTNd ) - pTNd->GetTable().GetFrmFmt()->SetFmtAttr( SwFmtPageDesc( pPageDesc ) ); - } - else - { - pCNd->SetAttr( SwFmtPageDesc( pPageDesc ) ); - if( pFirstCrsr->HasMark() ) - { - SwTxtNode *pTxtNd = pCNd->GetTxtNode(); - if( pTxtNd ) - { - SwCntntNode *pFirstNd = - pFirstCrsr->GetCntntNode( (*pFirstCrsr->GetMark()) > (*pFirstCrsr->GetPoint()) ); - if( pFirstNd && pFirstNd->IsTxtNode() ) - ((SwTxtNode*)pFirstNd)->CopyCollFmt( *pTxtNd ); - } - } - } - } - return pPrtDoc; -} - SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt) { OSL_ENSURE( this->IsA( TYPE(SwFEShell) ),"ViewShell::Prt for FEShell only"); @@ -461,6 +367,8 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt) pActCrsr = dynamic_cast<SwShellCrsr*>(pActCrsr->GetPrev()); } + // Die Y-Position der ersten Selektion + // Die Y-Position der ersten Selektion Point aSelPoint; if( pFESh->IsTableMode() ) { @@ -489,21 +397,23 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt) pPage->GetPageDesc()->GetName() ) : &pPrtDoc->_GetPageDesc( (sal_uInt16)0 ); if( !pFESh->IsTableMode() && pActCrsr->HasMark() ) - { + { // Am letzten Absatz die Absatzattribute richten: SwNodeIndex aNodeIdx( *pPrtDoc->GetNodes().GetEndOfContent().StartOfSectionNode() ); SwTxtNode* pTxtNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx )->GetTxtNode(); SwCntntNode *pLastNd = pActCrsr->GetCntntNode( (*pActCrsr->GetMark()) <= (*pActCrsr->GetPoint()) ); + // Hier werden die Absatzattribute des ersten Absatzes uebertragen if( pLastNd && pLastNd->IsTxtNode() ) ((SwTxtNode*)pLastNd)->CopyCollFmt( *pTxtNd ); } pFESh->Copy( pPrtDoc ); + //Jetzt noch am ersten Absatz die Seitenvorlage setzen { SwNodeIndex aNodeIdx( *pPrtDoc->GetNodes().GetEndOfContent().StartOfSectionNode() ); - SwCntntNode* pCNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx ); + SwCntntNode* pCNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx ); // gehe zum 1. ContentNode if( pFESh->IsTableMode() ) { SwTableNode* pTNd = pCNd->FindTableNode(); @@ -520,7 +430,7 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt) { SwCntntNode *pFirstNd = pFirstCrsr->GetCntntNode( (*pFirstCrsr->GetMark()) > (*pFirstCrsr->GetPoint()) ); - + // Hier werden die Absatzattribute des ersten Absatzes uebertragen if( pFirstNd && pFirstNd->IsTxtNode() ) ((SwTxtNode*)pFirstNd)->CopyCollFmt( *pTxtNd ); } @@ -551,33 +461,13 @@ sal_Bool ViewShell::PrintOrPDFExport( ViewShell *pShell; SwDoc *pOutDevDoc; - SfxObjectShellRef aDocShellRef; - - //! Note: Since for PDF export of (multi-)selection a temporary - //! document is created that contains only the selects parts, - //! and thus that document is to printed in whole the, - //! rPrintData.bPrintSelection parameter will be false. - BOOL bSelection = rPrintData.bPrintSelection; - - // PDF export for (multi-)selection has already generated a temporary document - // with the selected text. (see XRenderable implementation in unotxdoc.cxx) - // Thus we like to go in the 'else' part here in that case. - // Is is implemented this way because PDF export calls this Prt function + // (see XRenderable implementation in unotxdoc.cxx) + // It is implemented this way because PDF export calls this Prt function // once per page and we do not like to always have the temporary document - // to be created that often here in the 'then' part. - if ( bSelection ) - { - pOutDevDoc = CreatePrtDoc( aDocShellRef ); + // to be created that often here. + pOutDevDoc = GetDoc(); + pShell = new ViewShell( *this, 0, pOutDev ); - pShell = new ViewShell( *pOutDevDoc, 0, pOpt, pOutDev ); - pOutDevDoc->SetRefForDocShell( 0 ); - } - else - { - pOutDevDoc = GetDoc(); - pShell = new ViewShell( *this, 0, pOutDev ); - } - SdrView *pDrawView = pShell->GetDrawView(); if (pDrawView) { @@ -625,6 +515,7 @@ sal_Bool ViewShell::PrintOrPDFExport( ::SetSwVisArea( pViewSh2, pStPage->Frm() ); +#if 0 if( pStPage->GetFmt()->GetPoolFmtId() == RES_POOLPAGE_JAKET ) { Point aNewOrigin = pOutDev->GetMapMode().GetOrigin(); @@ -633,6 +524,7 @@ sal_Bool ViewShell::PrintOrPDFExport( aTmp.SetOrigin( aNewOrigin ); pOutDev->SetMapMode( aTmp ); } +#endif pShell->InitPrt( pOutDev ); @@ -647,12 +539,6 @@ sal_Bool ViewShell::PrintOrPDFExport( delete pShell; - if (bSelection ) - { - if ( !pOutDevDoc->release() ) - delete pOutDevDoc; - } - // restore settings of OutputDevice (should be done always now since the // output device is now provided by a call from outside the Writer) pOutDev->Pop(); @@ -706,9 +592,9 @@ void ViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintDat BOOL ViewShell::IsAnyFieldInDoc() const { const SfxPoolItem* pItem; - USHORT nMaxItems = pDoc->GetAttrPool().GetItemCount( RES_TXTATR_FIELD ); - for( USHORT n = 0; n < nMaxItems; ++n ) - if( 0 != (pItem = pDoc->GetAttrPool().GetItem( RES_TXTATR_FIELD, n ))) + sal_uInt32 nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_FIELD ); + for( sal_uInt32 n = 0; n < nMaxItems; ++n ) + if( 0 != (pItem = pDoc->GetAttrPool().GetItem2( RES_TXTATR_FIELD, n ))) { const SwFmtFld* pFmtFld = (SwFmtFld*)pItem; const SwTxtFld* pTxtFld = pFmtFld->GetTxtFld(); diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx index e7c82df2ef..72ff1bd6fb 100644 --- a/sw/source/filter/ascii/ascatr.cxx +++ b/sw/source/filter/ascii/ascatr.cxx @@ -126,7 +126,7 @@ BOOL SwASC_AttrIter::OutAttr( xub_StrLen nSwPos ) { case RES_TXTATR_FIELD: sOut = static_cast<SwTxtFld const*>(pHt)->GetFld().GetFld() - ->ExpandField(rWrt.pDoc->IsClipBoard()); + ->ExpandField(true); break; case RES_TXTATR_FTN: @@ -206,8 +206,8 @@ static Writer& OutASC_SwTxtNode( Writer& rWrt, SwCntntNode& rNode ) } while( nStrPos < nEnde ); if( !bLastNd || - (( !rWrt.bWriteClipboardDoc && !rWrt.bASCII_NoLastLineEnd ) - && !nStrPos && nEnde == nNodeEnde )) + ( ( !rWrt.bWriteClipboardDoc && !rWrt.bASCII_NoLastLineEnd ) + && !nStrPos && nEnde == nNodeEnde ) ) rWrt.Strm().WriteUnicodeOrByteText( ((SwASCWriter&)rWrt).GetLineEnd()); return rWrt; diff --git a/sw/source/filter/ascii/makefile.mk b/sw/source/filter/ascii/makefile.mk deleted file mode 100644 index 4bc8bfacd4..0000000000 --- a/sw/source/filter/ascii/makefile.mk +++ /dev/null @@ -1,57 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=ascii - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -CXXFILES = \ - ascatr.cxx \ - parasc.cxx \ - wrtasc.cxx - -EXCEPTIONSFILES = \ - $(SLO)$/ascatr.obj \ - $(SLO)$/parasc.obj \ - $(SLO)$/wrtasc.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index 3dcaf53273..51e2ec6834 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -51,6 +51,8 @@ #include <mdiexp.hxx> // ...Percent() #include <poolfmt.hxx> +#include "vcl/metric.hxx" + #define ASC_BUFFLEN 4096 class SwASCIIParser @@ -126,24 +128,14 @@ SwASCIIParser::SwASCIIParser(SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn, } if( rOpt.GetFontName().Len() ) { - bool bDelete = false; - const SfxFont* pFnt = 0; + Font aTextFont( rOpt.GetFontName(), Size( 0, 10 ) ); if( pDoc->getPrinter( false ) ) - pFnt = pDoc->getPrinter( false )->GetFontByName( rOpt.GetFontName() ); - - if( !pFnt ) - { - pFnt = new SfxFont( FAMILY_DONTKNOW, rOpt.GetFontName() ); - bDelete = true; - } - SvxFontItem aFont( pFnt->GetFamily(), pFnt->GetName(), - aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), RES_CHRATR_FONT ); + aTextFont = pDoc->getPrinter( false )->GetFontMetric( aTextFont ); + SvxFontItem aFont( aTextFont.GetFamily(), aTextFont.GetName(), + aEmptyStr, aTextFont.GetPitch(), aTextFont.GetCharSet(), RES_CHRATR_FONT ); pItemSet->Put( aFont ); pItemSet->Put( aFont, RES_CHRATR_CJK_FONT ); pItemSet->Put( aFont, RES_CHRATR_CTL_FONT ); - - if( bDelete ) - delete (SfxFont*)pFnt; } } diff --git a/sw/source/filter/ascii/wrtasc.cxx b/sw/source/filter/ascii/wrtasc.cxx index cb81e85d0f..3e50df9528 100644 --- a/sw/source/filter/ascii/wrtasc.cxx +++ b/sw/source/filter/ascii/wrtasc.cxx @@ -68,7 +68,7 @@ SwASCWriter::SwASCWriter( const String& rFltNm ) break; case 'A': -#if !defined(WIN) && !defined(WNT) +#if !defined(WNT) aNewOpts.SetCharSet( RTL_TEXTENCODING_MS_1252 ); aNewOpts.SetParaFlags( LINEEND_CRLF ); #endif diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx index 44aeb4c00d..1224670d09 100644 --- a/sw/source/filter/basflt/fltini.cxx +++ b/sw/source/filter/basflt/fltini.cxx @@ -1,931 +1,931 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" -#define _SVSTDARR_STRINGS - -#include <string.h> -#include <stdio.h> // sscanf -#include <hintids.hxx> -#include <i18npool/lang.h> -#include <i18npool/mslangid.hxx> -#include <vcl/msgbox.hxx> -#include <svtools/parhtml.hxx> -#include <svl/svstdarr.hxx> -#include <sot/storage.hxx> -#include <sot/clsids.hxx> -#include <sfx2/app.hxx> -#include <sfx2/docfilt.hxx> -#include <sfx2/fcontnr.hxx> -#include <sfx2/docfile.hxx> -#include <editeng/lrspitem.hxx> -#include <editeng/tstpitem.hxx> -#include <doc.hxx> -#include <docary.hxx> -#include <pam.hxx> -#include <shellio.hxx> -#include <errhdl.hxx> -#include <docsh.hxx> -#include <wdocsh.hxx> -#include <fltini.hxx> -#include <hints.hxx> -#include <frmatr.hxx> -#include <fmtfsize.hxx> -#include <swtable.hxx> -#include <fmtcntnt.hxx> -#include <editeng/boxitem.hxx> -#include <frmfmt.hxx> -#include <numrule.hxx> -#include <ndtxt.hxx> -#include <swfltopt.hxx> -#include <swerror.h> -#include <osl/module.hxx> -#include <comphelper/processfactory.hxx> -#include <comphelper/componentcontext.hxx> -#include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/util/XMacroExpander.hpp> -#include <rtl/uri.hxx> -#include <tools/svlibrary.hxx> - -using namespace utl; -using rtl::OUString; -using namespace com::sun::star::uno; -using namespace com::sun::star; - -SwRead ReadAscii = 0, /*ReadSwg = 0, ReadSw3 = 0,*/ - ReadHTML = 0, ReadXML = 0; - -Reader* GetRTFReader(); -Reader* GetWW8Reader(); - -// Note: if editing, please don't forget to modify also the enum -// ReaderWriterEnum and aFilterDetect in shellio.hxx -SwReaderWriterEntry aReaderWriter[] = -{ - SwReaderWriterEntry( &::GetRTFReader, &::GetRTFWriter, TRUE ), - SwReaderWriterEntry( 0, &::GetASCWriter, FALSE ), - SwReaderWriterEntry( &::GetWW8Reader, &::GetWW8Writer, TRUE ), - SwReaderWriterEntry( &::GetWW8Reader, &::GetWW8Writer, TRUE ), - SwReaderWriterEntry( &::GetRTFReader, &::GetRTFWriter, TRUE ), - SwReaderWriterEntry( 0, &::GetHTMLWriter, TRUE ), - SwReaderWriterEntry( 0, 0, TRUE ), - SwReaderWriterEntry( &::GetWW8Reader, 0, TRUE ), - SwReaderWriterEntry( 0, &::GetXMLWriter, TRUE ), - SwReaderWriterEntry( 0, &::GetASCWriter, TRUE ), - SwReaderWriterEntry( 0, &::GetASCWriter, TRUE ) -}; - -Reader* SwReaderWriterEntry::GetReader() -{ - if ( pReader ) - return pReader; - else if ( fnGetReader ) - { - pReader = (*fnGetReader)(); - return pReader; - } - return NULL; -} - -void SwReaderWriterEntry::GetWriter( const String& rNm, const String& rBaseURL, WriterRef& xWrt ) const -{ - if ( fnGetWriter ) - (*fnGetWriter)( rNm, rBaseURL, xWrt ); - else - xWrt = WriterRef(0); -} - -SwRead SwGetReaderXML() // SW_DLLPUBLIC -{ - return ReadXML; -} - -bool IsDocShellRegistered() -{ - return 0 != SwDocShell::_GetInterface(); -} - -inline void _SetFltPtr( USHORT rPos, SwRead pReader ) -{ - aReaderWriter[ rPos ].pReader = pReader; -} - -void _InitFilter() -{ - _SetFltPtr( READER_WRITER_BAS, (ReadAscii = new AsciiReader) ); - _SetFltPtr( READER_WRITER_HTML, (ReadHTML = new HTMLReader) ); - _SetFltPtr( READER_WRITER_WW1, new WW1Reader ); - _SetFltPtr( READER_WRITER_XML, (ReadXML = new XMLReader) ); - -#ifdef NEW_WW97_EXPORT - aReaderWriter[ READER_WRITER_WW1 ].fnGetWriter = &::GetWW8Writer; - aReaderWriter[ READER_WRITER_WW5 ].fnGetWriter = &::GetWW8Writer; -#endif - - _SetFltPtr( READER_WRITER_TEXT_DLG, ReadAscii ); - _SetFltPtr( READER_WRITER_TEXT, ReadAscii ); -} - -void _FinitFilter() -{ - // die Reader vernichten - for( USHORT n = 0; n < MAXFILTER; ++n ) - { - SwReaderWriterEntry& rEntry = aReaderWriter[n]; - if( rEntry.bDelReader && rEntry.pReader ) - delete rEntry.pReader, rEntry.pReader = NULL; - } -} - - -/* */ - -namespace SwReaderWriter { - -Reader* GetReader( ReaderWriterEnum eReader ) -{ - return aReaderWriter[eReader].GetReader(); -} - -void GetWriter( const String& rFltName, const String& rBaseURL, WriterRef& xRet ) -{ - for( USHORT n = 0; n < MAXFILTER; ++n ) - if( aFilterDetect[n].IsFilter( rFltName ) ) - { - aReaderWriter[n].GetWriter( rFltName, rBaseURL, xRet ); - break; - } -} - -SwRead GetReader( const String& rFltName ) -{ - SwRead pRead = 0; - for( USHORT n = 0; n < MAXFILTER; ++n ) - if( aFilterDetect[n].IsFilter( rFltName ) ) - { - pRead = aReaderWriter[n].GetReader(); - // fuer einige Reader noch eine Sonderbehandlung: - if ( pRead ) - pRead->SetFltName( rFltName ); - break; - } - return pRead; -} - -} // namespace SwReaderWriter - -/* */ - -ULONG StgReader::OpenMainStream( SvStorageStreamRef& rRef, USHORT& rBuffSize ) -{ - ULONG nRet = ERR_SWG_READ_ERROR; - OSL_ENSURE( pStg, "wo ist mein Storage?" ); - const SfxFilter* pFltr = SwIoSystem::GetFilterOfFormat( aFltName ); - if( pFltr ) - { - rRef = pStg->OpenSotStream( SwIoSystem::GetSubStorageName( *pFltr ), - STREAM_READ | STREAM_SHARE_DENYALL ); - - if( rRef.Is() ) - { - if( SVSTREAM_OK == rRef->GetError() ) - { - USHORT nOld = rRef->GetBufferSize(); - rRef->SetBufferSize( rBuffSize ); - rBuffSize = nOld; - nRet = 0; - } - else - nRet = rRef->GetError(); - } - } - return nRet; -} - - -void Writer::SetPasswd( const String& ) {} - - -void Writer::SetVersion( const String&, long ) {} - - -BOOL Writer::IsStgWriter() const { return FALSE; } - -BOOL StgWriter::IsStgWriter() const { return TRUE; } - -/* */ - - - -BOOL SwReader::NeedsPasswd( const Reader& /*rOptions*/ ) -{ - BOOL bRes = FALSE; - return bRes; -} - - -BOOL SwReader::CheckPasswd( const String& /*rPasswd*/, const Reader& /*rOptions*/ ) -{ - return TRUE; -} - - -/* */ - -//----------------------------------------------------------------------- -// Filter Flags lesen, wird von WW8 / W4W / EXCEL / LOTUS benutzt. -//----------------------------------------------------------------------- - -/* -<FilterFlags> - <Excel_Lotus> - <MinRow cfg:type="long">0</MinRow> - <MaxRow cfg:type="long">0</MaxRow> - <MinCol cfg:type="long">0</MinCol> - <MaxCol cfg:type="long">0</MaxCol> - </Excel_Lotus> - <W4W> - <W4WHD cfg:type="long">0</W4WHD> - <W4WFT cfg:type="long">0</W4WFT> - <W4W000 cfg:type="long">0</W4W000> - </W4W> - <WinWord> - <WW1F cfg:type="long">0</WW1F> - <WW cfg:type="long">0</WW> - <WW8 cfg:type="long">0</WW8> - <WWF cfg:type="long">0</WWF> - <WWFA0 cfg:type="long">0</WWFA0> - <WWFA1 cfg:type="long">0</WWFA1> - <WWFA2 cfg:type="long">0</WWFA2> - <WWFB0 cfg:type="long">0</WWFB0> - <WWFB1 cfg:type="long">0</WWFB1> - <WWFB2 cfg:type="long">0</WWFB2> - <WWFLX cfg:type="long">0</WWFLX> - <WWFLY cfg:type="long">0</WWFLY> - <WWFT cfg:type="long">0</WWFT> - <WWWR cfg:type="long">0</WWWR> - </WinWord> - <Writer> - <SW3Imp cfg:type="long">0</SW3Imp> - </Writer> -</FilterFlags> -*/ - -#define FILTER_OPTION_ROOT String::CreateFromAscii( \ - RTL_CONSTASCII_STRINGPARAM( "Office.Writer/FilterFlags" ) ) - -SwFilterOptions::SwFilterOptions( sal_uInt16 nCnt, const sal_Char** ppNames, - sal_uInt32* pValues ) - : ConfigItem( FILTER_OPTION_ROOT ) -{ - GetValues( nCnt, ppNames, pValues ); -} - -void SwFilterOptions::GetValues( sal_uInt16 nCnt, const sal_Char** ppNames, - sal_uInt32* pValues ) -{ - Sequence<OUString> aNames( nCnt ); - OUString* pNames = aNames.getArray(); - USHORT n; - - for( n = 0; n < nCnt; ++n ) - pNames[ n ] = OUString::createFromAscii( ppNames[ n ] ); - Sequence<Any> aValues = GetProperties( aNames ); - - if( nCnt == aValues.getLength() ) - { - const Any* pAnyValues = aValues.getConstArray(); - for( n = 0; n < nCnt; ++n ) - pValues[ n ] = pAnyValues[ n ].hasValue() - ? *(sal_uInt32*)pAnyValues[ n ].getValue() - : 0; - } - else - for( n = 0; n < nCnt; ++n ) - pValues[ n ] = 0; -} - -void SwFilterOptions::Commit() {} -void SwFilterOptions::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {} - -/* */ - - -void StgReader::SetFltName( const String& rFltNm ) -{ - if( SW_STORAGE_READER & GetReaderType() ) - aFltName = rFltNm; -} - - -/* */ - -SwRelNumRuleSpaces::SwRelNumRuleSpaces( SwDoc& rDoc, BOOL bNDoc ) - : bNewDoc( bNDoc ) -{ - pNumRuleTbl = new SwNumRuleTbl( 8, 8 ); - if( !bNDoc ) - pNumRuleTbl->Insert( &rDoc.GetNumRuleTbl(), 0 ); -} - -SwRelNumRuleSpaces::~SwRelNumRuleSpaces() -{ - if( pNumRuleTbl ) - { - pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() ); - delete pNumRuleTbl; - } -} - -void SwRelNumRuleSpaces::SetNumRelSpaces( SwDoc& rDoc ) -{ - const SwNumRuleTbl* pRuleTbl = NULL; - - if( !bNewDoc ) - { - // jetzt alle schon vorhanden NumRules aus dem Array entfernen, - // damit nur die neuen angepasst werden - SwNumRuleTbl aNumRuleTbl; - aNumRuleTbl.Insert( pNumRuleTbl, 0 ); - pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() ); - const SwNumRuleTbl& rRuleTbl = rDoc.GetNumRuleTbl(); - SwNumRule* pRule; - - for( USHORT n = 0; n < rRuleTbl.Count(); ++n ) - if( USHRT_MAX == aNumRuleTbl.GetPos( ( pRule = rRuleTbl[ n ] ))) - // war noch nicht vorhanden, also neu - pNumRuleTbl->Insert( pRule, pNumRuleTbl->Count() ); - - aNumRuleTbl.Remove( 0, aNumRuleTbl.Count() ); - - pRuleTbl = pNumRuleTbl; - } - else - { - pRuleTbl = &rDoc.GetNumRuleTbl(); - } - - if( pRuleTbl ) - { - for( USHORT n = pRuleTbl->Count(); n; ) - { - SwNumRule* pRule = (*pRuleTbl)[ --n ]; - // Rule noch gueltig und am Doc vorhanden? - if( USHRT_MAX != rDoc.GetNumRuleTbl().GetPos( pRule )) - { - SwNumRule::tTxtNodeList aTxtNodeList; - pRule->GetTxtNodeList( aTxtNodeList ); - for ( SwNumRule::tTxtNodeList::iterator aIter = aTxtNodeList.begin(); - aIter != aTxtNodeList.end(); ++aIter ) - { - SwTxtNode* pNd = *aIter; - SetNumLSpace( *pNd, *pRule ); - } - } - } - } - - if( pNumRuleTbl ) - { - pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() ); - delete pNumRuleTbl, pNumRuleTbl = 0; - } - - if( bNewDoc ) - { - SetOultineRelSpaces( SwNodeIndex( rDoc.GetNodes() ), - SwNodeIndex( rDoc.GetNodes().GetEndOfContent())); - } -} - -void SwRelNumRuleSpaces::SetOultineRelSpaces( const SwNodeIndex& rStt, - const SwNodeIndex& rEnd ) -{ - SwDoc* pDoc = rStt.GetNode().GetDoc(); - const SwOutlineNodes& rOutlNds = pDoc->GetNodes().GetOutLineNds(); - if( rOutlNds.Count() ) - { - USHORT nPos; - rOutlNds.Seek_Entry( &rStt.GetNode(), &nPos ); - for( ; nPos < rOutlNds.Count() && - rOutlNds[ nPos ]->GetIndex() < rEnd.GetIndex(); ++nPos ) - { - SwTxtNode* pNd = rOutlNds[ nPos ]->GetTxtNode(); - if( pNd->IsOutline() && !pNd->GetNumRule() ) - SetNumLSpace( *pNd, *pDoc->GetOutlineNumRule() ); - } - } -} - -void SwRelNumRuleSpaces::SetNumLSpace( SwTxtNode& rNd, const SwNumRule& rRule ) -{ - BOOL bOutlineRule = OUTLINE_RULE == rRule.GetRuleType(); - // #128056# correction of refactoring done by cws swnumtree: - // - assure a correct level for retrieving numbering format. - BYTE nLvl = 0; - if ( rNd.GetActualListLevel() >= 0 && rNd.GetActualListLevel() < MAXLEVEL ) - { - nLvl = static_cast< BYTE >(rNd.GetActualListLevel()); - } - - const SwNumFmt& rFmt = rRule.Get( nLvl ); - const SvxLRSpaceItem& rLR = rNd.GetSwAttrSet().GetLRSpace(); - - SvxLRSpaceItem aLR( rLR ); - aLR.SetTxtFirstLineOfst( 0 ); - - // sagt der Node, das die Numerierung den Wert vorgibt? - if( !bOutlineRule && rNd.IsSetNumLSpace() ) - aLR.SetTxtLeft( 0 ); - else - { - long nLeft = rFmt.GetAbsLSpace(), nParaLeft = rLR.GetTxtLeft(); - if( 0 < rLR.GetTxtFirstLineOfst() ) - nParaLeft += rLR.GetTxtFirstLineOfst(); - else if( nParaLeft >= nLeft ) - // #82963#/#82962#: set correct paragraph indent - nParaLeft -= nLeft; - else - //#83154#, Don't think any of the older #80856# bugfix code is - //relevent anymore. - nParaLeft = rLR.GetTxtLeft()+rLR.GetTxtFirstLineOfst(); - aLR.SetTxtLeft( nParaLeft ); - } - - if( aLR.GetTxtLeft() != rLR.GetTxtLeft() ) - { - //bevor rLR geloescht wird! - long nOffset = rLR.GetTxtLeft() - aLR.GetTxtLeft(); - rNd.SetAttr( aLR ); - - // Tabs anpassen !! - const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rNd.GetSwAttrSet().GetItemState( - RES_PARATR_TABSTOP, TRUE, &pItem )) - { - SvxTabStopItem aTStop( *(SvxTabStopItem*)pItem ); - for( USHORT n = 0; n < aTStop.Count(); ++n ) - { - SvxTabStop& rTab = (SvxTabStop&)aTStop[ n ]; - if( SVX_TAB_ADJUST_DEFAULT != rTab.GetAdjustment() ) - { - if( !rTab.GetTabPos() ) - { - aTStop.Remove( n ); - --n; - } - else - rTab.GetTabPos() += nOffset; - } - } - rNd.SetAttr( aTStop ); - } - } -} - -/* */ - - -void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor, - SwTwips nPageWidth) -{ - const SfxPoolItem* pItem = 0; - if( SFX_ITEM_SET != rFlySet.GetItemState( RES_FRM_SIZE, TRUE, &pItem ) || - MINFLY > ((SwFmtFrmSize*)pItem)->GetWidth() ) - { - SwFmtFrmSize aSz((SwFmtFrmSize&)rFlySet.Get(RES_FRM_SIZE, TRUE)); - if (pItem) - aSz = (SwFmtFrmSize&)(*pItem); - - SwTwips nWidth; - // dann die Breite des Flys selbst bestimmen. Ist eine Tabelle - // defininiert, dann benutze deren Breite, sonst die Breite der - // Seite - const SwTableNode* pTblNd = rAnchor.GetNode().FindTableNode(); - if( pTblNd ) - nWidth = pTblNd->GetTable().GetFrmFmt()->GetFrmSize().GetWidth(); - else - nWidth = nPageWidth; - - const SwNodeIndex* pSttNd = ((SwFmtCntnt&)rFlySet.Get( RES_CNTNT )). - GetCntntIdx(); - if( pSttNd ) - { - BOOL bOnlyOneNode = TRUE; - ULONG nMinFrm = 0; - ULONG nMaxFrm = 0; - SwTxtNode* pFirstTxtNd = 0; - SwNodeIndex aIdx( *pSttNd, 1 ); - SwNodeIndex aEnd( *pSttNd->GetNode().EndOfSectionNode() ); - while( aIdx < aEnd ) - { - SwTxtNode *pTxtNd = aIdx.GetNode().GetTxtNode(); - if( pTxtNd ) - { - if( !pFirstTxtNd ) - pFirstTxtNd = pTxtNd; - else if( pFirstTxtNd != pTxtNd ) - { - // forget it - bOnlyOneNode = FALSE; - break; - } - - ULONG nAbsMinCnts; - pTxtNd->GetMinMaxSize( aIdx.GetIndex(), nMinFrm, - nMaxFrm, nAbsMinCnts ); - } - aIdx++; - } - - if( bOnlyOneNode ) - { - if( nMinFrm < MINLAY && pFirstTxtNd ) - { - // if the first node dont contained any content, then - // insert one char in it calc again and delete once again - SwIndex aNdIdx( pFirstTxtNd ); - pFirstTxtNd->InsertText( String::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( "MM" )), aNdIdx ); - ULONG nAbsMinCnts; - pFirstTxtNd->GetMinMaxSize( pFirstTxtNd->GetIndex(), - nMinFrm, nMaxFrm, nAbsMinCnts ); - aNdIdx -= 2; - pFirstTxtNd->EraseText( aNdIdx, 2 ); - } - - // Umrandung und Abstand zum Inhalt beachten - const SvxBoxItem& rBoxItem = (SvxBoxItem&)rFlySet.Get( RES_BOX ); - USHORT nLine = BOX_LINE_LEFT; - for( int i = 0; i < 2; ++i ) - { - const SvxBorderLine* pLn = rBoxItem.GetLine( nLine ); - if( pLn ) - { - USHORT nWidthTmp = pLn->GetOutWidth() + pLn->GetInWidth(); - nWidthTmp = nWidthTmp + rBoxItem.GetDistance( nLine ); - nMinFrm += nWidthTmp; - nMaxFrm += nWidthTmp; - } - nLine = BOX_LINE_RIGHT; - } - - // Mindestbreite fuer Inhalt einhalten - if( nMinFrm < MINLAY ) - nMinFrm = MINLAY; - if( nMaxFrm < MINLAY ) - nMaxFrm = MINLAY; - - if( nWidth > (USHORT)nMaxFrm ) - nWidth = nMaxFrm; - else if( nWidth > (USHORT)nMinFrm ) - nWidth = nMinFrm; - } - } - - if( MINFLY > nWidth ) - nWidth = MINFLY; - - aSz.SetWidth( nWidth ); - if( MINFLY > aSz.GetHeight() ) - aSz.SetHeight( MINFLY ); - rFlySet.Put( aSz ); - } - else if( MINFLY > ((SwFmtFrmSize*)pItem)->GetHeight() ) - { - SwFmtFrmSize aSz( *(SwFmtFrmSize*)pItem ); - aSz.SetHeight( MINFLY ); - rFlySet.Put( aSz ); - } -} - -/* */ -struct CharSetNameMap -{ - rtl_TextEncoding eCode; - const sal_Char* pName; -}; - -const CharSetNameMap *GetCharSetNameMap() -{ - static const CharSetNameMap aMapArr[] = - { -# define IMPLENTRY(X) { RTL_TEXTENCODING_##X, "" #X "" } - IMPLENTRY(DONTKNOW), - IMPLENTRY(MS_1252), - IMPLENTRY(APPLE_ROMAN), - IMPLENTRY(IBM_437), - IMPLENTRY(IBM_850), - IMPLENTRY(IBM_860), - IMPLENTRY(IBM_861), - IMPLENTRY(IBM_863), - IMPLENTRY(IBM_865), - IMPLENTRY(SYMBOL), - IMPLENTRY(ASCII_US), - IMPLENTRY(ISO_8859_1), - IMPLENTRY(ISO_8859_2), - IMPLENTRY(ISO_8859_3), - IMPLENTRY(ISO_8859_4), - IMPLENTRY(ISO_8859_5), - IMPLENTRY(ISO_8859_6), - IMPLENTRY(ISO_8859_7), - IMPLENTRY(ISO_8859_8), - IMPLENTRY(ISO_8859_9), - IMPLENTRY(ISO_8859_14), - IMPLENTRY(ISO_8859_15), - IMPLENTRY(IBM_737), - IMPLENTRY(IBM_775), - IMPLENTRY(IBM_852), - IMPLENTRY(IBM_855), - IMPLENTRY(IBM_857), - IMPLENTRY(IBM_862), - IMPLENTRY(IBM_864), - IMPLENTRY(IBM_866), - IMPLENTRY(IBM_869), - IMPLENTRY(MS_874), - IMPLENTRY(MS_1250), - IMPLENTRY(MS_1251), - IMPLENTRY(MS_1253), - IMPLENTRY(MS_1254), - IMPLENTRY(MS_1255), - IMPLENTRY(MS_1256), - IMPLENTRY(MS_1257), - IMPLENTRY(MS_1258), - IMPLENTRY(APPLE_ARABIC), - IMPLENTRY(APPLE_CENTEURO), - IMPLENTRY(APPLE_CROATIAN), - IMPLENTRY(APPLE_CYRILLIC), - IMPLENTRY(APPLE_DEVANAGARI), - IMPLENTRY(APPLE_FARSI), - IMPLENTRY(APPLE_GREEK), - IMPLENTRY(APPLE_GUJARATI), - IMPLENTRY(APPLE_GURMUKHI), - IMPLENTRY(APPLE_HEBREW), - IMPLENTRY(APPLE_ICELAND), - IMPLENTRY(APPLE_ROMANIAN), - IMPLENTRY(APPLE_THAI), - IMPLENTRY(APPLE_TURKISH), - IMPLENTRY(APPLE_UKRAINIAN), - IMPLENTRY(APPLE_CHINSIMP), - IMPLENTRY(APPLE_CHINTRAD), - IMPLENTRY(APPLE_JAPANESE), - IMPLENTRY(APPLE_KOREAN), - IMPLENTRY(MS_932), - IMPLENTRY(MS_936), - IMPLENTRY(MS_949), - IMPLENTRY(MS_950), - IMPLENTRY(SHIFT_JIS), - IMPLENTRY(GB_2312), - IMPLENTRY(GBT_12345), - IMPLENTRY(GBK), - IMPLENTRY(BIG5), - IMPLENTRY(EUC_JP), - IMPLENTRY(EUC_CN), - IMPLENTRY(EUC_TW), - IMPLENTRY(ISO_2022_JP), - IMPLENTRY(ISO_2022_CN), - IMPLENTRY(KOI8_R), - IMPLENTRY(KOI8_U), - IMPLENTRY(UTF7), - IMPLENTRY(UTF8), - IMPLENTRY(ISO_8859_10), - IMPLENTRY(ISO_8859_13), - IMPLENTRY(EUC_KR), - IMPLENTRY(ISO_2022_KR), - IMPLENTRY(JIS_X_0201), - IMPLENTRY(JIS_X_0208), - IMPLENTRY(JIS_X_0212), - IMPLENTRY(MS_1361), - IMPLENTRY(GB_18030), - IMPLENTRY(BIG5_HKSCS), - IMPLENTRY(TIS_620), - IMPLENTRY(PT154), - IMPLENTRY(UCS4), - IMPLENTRY(UCS2), - IMPLENTRY(UNICODE), - {0,0} //Last - }; - return &aMapArr[0]; -} -/* - Get a rtl_TextEncoding from its name - */ -rtl_TextEncoding CharSetFromName(const String& rChrSetStr) -{ - const CharSetNameMap *pStart = GetCharSetNameMap(); - rtl_TextEncoding nRet = pStart->eCode; - - for(const CharSetNameMap *pMap = pStart; pMap->pName; ++pMap) - { - if(rChrSetStr.EqualsIgnoreCaseAscii(pMap->pName)) - { - nRet = pMap->eCode; - break; - } - } - - OSL_ENSURE(nRet != pStart->eCode, "TXT: That was an unknown language!"); - - return nRet; -} - - -/* - Get the String name of an rtl_TextEncoding - */ -String NameFromCharSet(rtl_TextEncoding nChrSet) -{ - const CharSetNameMap *pStart = GetCharSetNameMap(); - const char *pRet = pStart->pName; - - for(const CharSetNameMap *pMap = pStart; pMap->pName; ++pMap) - { - if (nChrSet == pMap->eCode) - { - pRet = pMap->pName; - break; - } - } - - OSL_ENSURE(pRet != pStart->pName, "TXT: That was an unknown language!"); - - return String::CreateFromAscii(pRet); -} - -// for the automatic conversion (mail/news/...) -// The user data contains the options for the ascii import/export filter. -// The format is: -// 1. CharSet - as ascii chars -// 2. LineEnd - as CR/LR/CRLF -// 3. Fontname -// 4. Language -// the delimetercharacter is "," -// - -void SwAsciiOptions::ReadUserData( const String& rStr ) -{ - xub_StrLen nToken = 0; - USHORT nCnt = 0; - String sToken; - do { - if( 0 != (sToken = rStr.GetToken( 0, ',', nToken )).Len() ) - { - switch( nCnt ) - { - case 0: // CharSet - eCharSet = CharSetFromName(sToken); - break; - case 1: // LineEnd - if( sToken.EqualsIgnoreCaseAscii( "CRLF" )) - eCRLF_Flag = LINEEND_CRLF; - else if( sToken.EqualsIgnoreCaseAscii( "LF" )) - eCRLF_Flag = LINEEND_LF; - else - eCRLF_Flag = LINEEND_CR; - break; - case 2: // fontname - sFont = sToken; - break; - case 3: // Language - nLanguage = MsLangId::convertIsoStringToLanguage( sToken ); - break; - } - } - ++nCnt; - } while( STRING_NOTFOUND != nToken ); -} - -void SwAsciiOptions::WriteUserData( String& rStr ) -{ - // 1. charset - rStr = NameFromCharSet(eCharSet); - rStr += ','; - - // 2. LineEnd - switch(eCRLF_Flag) - { - case LINEEND_CRLF: - rStr.AppendAscii( "CRLF" ); - break; - case LINEEND_CR: - rStr.AppendAscii( "CR" ); - break; - case LINEEND_LF: - rStr.AppendAscii( "LF" ); - break; - } - rStr += ','; - - // 3. Fontname - rStr += sFont; - rStr += ','; - - // 4. Language - if (nLanguage) - { - rtl::OUString sTmp = MsLangId::convertLanguageToIsoString( nLanguage ); - rStr += (String)sTmp; - } - rStr += ','; -} - -extern "C" { static void SAL_CALL thisModule() {} } - -static oslGenericFunction GetMswordLibSymbol( const char *pSymbol ) -{ - static ::osl::Module aModule; - static sal_Bool bLoaded = sal_False; - static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "msword" ) ) ); - if (!bLoaded) - bLoaded = SvLibrary::LoadModule( aModule, aLibName, &thisModule ); - if (bLoaded) - return aModule.getFunctionSymbol( ::rtl::OUString::createFromAscii( pSymbol ) ); - return NULL; -} - -Reader* GetRTFReader() -{ - FnGetReader pFunction = reinterpret_cast<FnGetReader>( GetMswordLibSymbol( "ImportRTF" ) ); - - if ( pFunction ) - return (*pFunction)(); - - return NULL; -} - -void GetRTFWriter( const String& rFltName, const String& rBaseURL, WriterRef& xRet ) -{ - FnGetWriter pFunction = reinterpret_cast<FnGetWriter>( GetMswordLibSymbol( "ExportRTF" ) ); - - if ( pFunction ) - (*pFunction)( rFltName, rBaseURL, xRet ); - else - xRet = WriterRef(0); -} - -Reader* GetWW8Reader() -{ - FnGetReader pFunction = reinterpret_cast<FnGetReader>( GetMswordLibSymbol( "ImportDOC" ) ); - - if ( pFunction ) - return (*pFunction)(); - - return NULL; -} - -void GetWW8Writer( const String& rFltName, const String& rBaseURL, WriterRef& xRet ) -{ - FnGetWriter pFunction = reinterpret_cast<FnGetWriter>( GetMswordLibSymbol( "ExportDOC" ) ); - - if ( pFunction ) - (*pFunction)( rFltName, rBaseURL, xRet ); - else - xRet = WriterRef(0); -} - -typedef ULONG ( __LOADONCALLAPI *SaveOrDel )( SfxObjectShell&, SotStorage&, BOOL, const String& ); -typedef ULONG ( __LOADONCALLAPI *GetSaveWarning )( SfxObjectShell& ); - -ULONG SaveOrDelMSVBAStorage( SfxObjectShell& rDoc, SotStorage& rStor, BOOL bSaveInto, const String& rStorageName ) -{ - SaveOrDel pFunction = reinterpret_cast<SaveOrDel>( GetMswordLibSymbol( "SaveOrDelMSVBAStorage_ww8" ) ); - if( pFunction ) - return pFunction( rDoc, rStor, bSaveInto, rStorageName ); - return ERRCODE_NONE; -} - -ULONG GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS ) -{ - GetSaveWarning pFunction = reinterpret_cast<GetSaveWarning>( GetMswordLibSymbol( "GetSaveWarningOfMSVBAStorage_ww8" ) ); - if( pFunction ) - return pFunction( rDocS ); - return ERRCODE_NONE; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+#define _SVSTDARR_STRINGS
+
+#include <string.h>
+#include <stdio.h> // sscanf
+#include <hintids.hxx>
+#include <i18npool/lang.h>
+#include <i18npool/mslangid.hxx>
+#include <vcl/msgbox.hxx>
+#include <svtools/parhtml.hxx>
+#include <svl/svstdarr.hxx>
+#include <sot/storage.hxx>
+#include <sot/clsids.hxx>
+#include <sfx2/app.hxx>
+#include <sfx2/docfilt.hxx>
+#include <sfx2/fcontnr.hxx>
+#include <sfx2/docfile.hxx>
+#include <editeng/lrspitem.hxx>
+#include <editeng/tstpitem.hxx>
+#include <doc.hxx>
+#include <docary.hxx>
+#include <pam.hxx>
+#include <shellio.hxx>
+#include <errhdl.hxx>
+#include <docsh.hxx>
+#include <wdocsh.hxx>
+#include <fltini.hxx>
+#include <hints.hxx>
+#include <frmatr.hxx>
+#include <fmtfsize.hxx>
+#include <swtable.hxx>
+#include <fmtcntnt.hxx>
+#include <editeng/boxitem.hxx>
+#include <frmfmt.hxx>
+#include <numrule.hxx>
+#include <ndtxt.hxx>
+#include <swfltopt.hxx>
+#include <swerror.h>
+#include <osl/module.hxx>
+#include <comphelper/processfactory.hxx>
+#include <comphelper/componentcontext.hxx>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/util/XMacroExpander.hpp>
+#include <rtl/uri.hxx>
+#include <tools/svlibrary.hxx>
+
+using namespace utl;
+using rtl::OUString;
+using namespace com::sun::star::uno;
+using namespace com::sun::star;
+
+SwRead ReadAscii = 0, /*ReadSwg = 0, ReadSw3 = 0,*/
+ ReadHTML = 0, ReadXML = 0;
+
+Reader* GetRTFReader();
+Reader* GetWW8Reader();
+
+// Note: if editing, please don't forget to modify also the enum
+// ReaderWriterEnum and aFilterDetect in shellio.hxx
+SwReaderWriterEntry aReaderWriter[] =
+{
+ SwReaderWriterEntry( &::GetRTFReader, &::GetRTFWriter, TRUE ),
+ SwReaderWriterEntry( 0, &::GetASCWriter, FALSE ),
+ SwReaderWriterEntry( &::GetWW8Reader, &::GetWW8Writer, TRUE ),
+ SwReaderWriterEntry( &::GetWW8Reader, &::GetWW8Writer, TRUE ),
+ SwReaderWriterEntry( &::GetRTFReader, &::GetRTFWriter, TRUE ),
+ SwReaderWriterEntry( 0, &::GetHTMLWriter, TRUE ),
+ SwReaderWriterEntry( 0, 0, TRUE ),
+ SwReaderWriterEntry( &::GetWW8Reader, 0, TRUE ),
+ SwReaderWriterEntry( 0, &::GetXMLWriter, TRUE ),
+ SwReaderWriterEntry( 0, &::GetASCWriter, TRUE ),
+ SwReaderWriterEntry( 0, &::GetASCWriter, TRUE )
+};
+
+Reader* SwReaderWriterEntry::GetReader()
+{
+ if ( pReader )
+ return pReader;
+ else if ( fnGetReader )
+ {
+ pReader = (*fnGetReader)();
+ return pReader;
+ }
+ return NULL;
+}
+
+void SwReaderWriterEntry::GetWriter( const String& rNm, const String& rBaseURL, WriterRef& xWrt ) const
+{
+ if ( fnGetWriter )
+ (*fnGetWriter)( rNm, rBaseURL, xWrt );
+ else
+ xWrt = WriterRef(0);
+}
+
+SwRead SwGetReaderXML() // SW_DLLPUBLIC
+{
+ return ReadXML;
+}
+
+bool IsDocShellRegistered()
+{
+ return 0 != SwDocShell::_GetInterface();
+}
+
+inline void _SetFltPtr( USHORT rPos, SwRead pReader )
+{
+ aReaderWriter[ rPos ].pReader = pReader;
+}
+
+void _InitFilter()
+{
+ _SetFltPtr( READER_WRITER_BAS, (ReadAscii = new AsciiReader) );
+ _SetFltPtr( READER_WRITER_HTML, (ReadHTML = new HTMLReader) );
+ _SetFltPtr( READER_WRITER_WW1, new WW1Reader );
+ _SetFltPtr( READER_WRITER_XML, (ReadXML = new XMLReader) );
+
+#ifdef NEW_WW97_EXPORT
+ aReaderWriter[ READER_WRITER_WW1 ].fnGetWriter = &::GetWW8Writer;
+ aReaderWriter[ READER_WRITER_WW5 ].fnGetWriter = &::GetWW8Writer;
+#endif
+
+ _SetFltPtr( READER_WRITER_TEXT_DLG, ReadAscii );
+ _SetFltPtr( READER_WRITER_TEXT, ReadAscii );
+}
+
+void _FinitFilter()
+{
+ // die Reader vernichten
+ for( USHORT n = 0; n < MAXFILTER; ++n )
+ {
+ SwReaderWriterEntry& rEntry = aReaderWriter[n];
+ if( rEntry.bDelReader && rEntry.pReader )
+ delete rEntry.pReader, rEntry.pReader = NULL;
+ }
+}
+
+
+/* */
+
+namespace SwReaderWriter {
+
+Reader* GetReader( ReaderWriterEnum eReader )
+{
+ return aReaderWriter[eReader].GetReader();
+}
+
+void GetWriter( const String& rFltName, const String& rBaseURL, WriterRef& xRet )
+{
+ for( USHORT n = 0; n < MAXFILTER; ++n )
+ if( aFilterDetect[n].IsFilter( rFltName ) )
+ {
+ aReaderWriter[n].GetWriter( rFltName, rBaseURL, xRet );
+ break;
+ }
+}
+
+SwRead GetReader( const String& rFltName )
+{
+ SwRead pRead = 0;
+ for( USHORT n = 0; n < MAXFILTER; ++n )
+ if( aFilterDetect[n].IsFilter( rFltName ) )
+ {
+ pRead = aReaderWriter[n].GetReader();
+ // fuer einige Reader noch eine Sonderbehandlung:
+ if ( pRead )
+ pRead->SetFltName( rFltName );
+ break;
+ }
+ return pRead;
+}
+
+} // namespace SwReaderWriter
+
+/* */
+
+ULONG StgReader::OpenMainStream( SvStorageStreamRef& rRef, USHORT& rBuffSize )
+{
+ ULONG nRet = ERR_SWG_READ_ERROR;
+ OSL_ENSURE( pStg, "wo ist mein Storage?" );
+ const SfxFilter* pFltr = SwIoSystem::GetFilterOfFormat( aFltName );
+ if( pFltr )
+ {
+ rRef = pStg->OpenSotStream( SwIoSystem::GetSubStorageName( *pFltr ),
+ STREAM_READ | STREAM_SHARE_DENYALL );
+
+ if( rRef.Is() )
+ {
+ if( SVSTREAM_OK == rRef->GetError() )
+ {
+ USHORT nOld = rRef->GetBufferSize();
+ rRef->SetBufferSize( rBuffSize );
+ rBuffSize = nOld;
+ nRet = 0;
+ }
+ else
+ nRet = rRef->GetError();
+ }
+ }
+ return nRet;
+}
+
+
+void Writer::SetPasswd( const String& ) {}
+
+
+void Writer::SetVersion( const String&, long ) {}
+
+
+BOOL Writer::IsStgWriter() const { return FALSE; }
+
+BOOL StgWriter::IsStgWriter() const { return TRUE; }
+
+/* */
+
+
+
+BOOL SwReader::NeedsPasswd( const Reader& /*rOptions*/ )
+{
+ BOOL bRes = FALSE;
+ return bRes;
+}
+
+
+BOOL SwReader::CheckPasswd( const String& /*rPasswd*/, const Reader& /*rOptions*/ )
+{
+ return TRUE;
+}
+
+
+/* */
+
+//-----------------------------------------------------------------------
+// Filter Flags lesen, wird von WW8 / W4W / EXCEL / LOTUS benutzt.
+//-----------------------------------------------------------------------
+
+/*
+<FilterFlags>
+ <Excel_Lotus>
+ <MinRow cfg:type="long">0</MinRow>
+ <MaxRow cfg:type="long">0</MaxRow>
+ <MinCol cfg:type="long">0</MinCol>
+ <MaxCol cfg:type="long">0</MaxCol>
+ </Excel_Lotus>
+ <W4W>
+ <W4WHD cfg:type="long">0</W4WHD>
+ <W4WFT cfg:type="long">0</W4WFT>
+ <W4W000 cfg:type="long">0</W4W000>
+ </W4W>
+ <WinWord>
+ <WW1F cfg:type="long">0</WW1F>
+ <WW cfg:type="long">0</WW>
+ <WW8 cfg:type="long">0</WW8>
+ <WWF cfg:type="long">0</WWF>
+ <WWFA0 cfg:type="long">0</WWFA0>
+ <WWFA1 cfg:type="long">0</WWFA1>
+ <WWFA2 cfg:type="long">0</WWFA2>
+ <WWFB0 cfg:type="long">0</WWFB0>
+ <WWFB1 cfg:type="long">0</WWFB1>
+ <WWFB2 cfg:type="long">0</WWFB2>
+ <WWFLX cfg:type="long">0</WWFLX>
+ <WWFLY cfg:type="long">0</WWFLY>
+ <WWFT cfg:type="long">0</WWFT>
+ <WWWR cfg:type="long">0</WWWR>
+ </WinWord>
+ <Writer>
+ <SW3Imp cfg:type="long">0</SW3Imp>
+ </Writer>
+</FilterFlags>
+*/
+
+#define FILTER_OPTION_ROOT String::CreateFromAscii( \
+ RTL_CONSTASCII_STRINGPARAM( "Office.Writer/FilterFlags" ) )
+
+SwFilterOptions::SwFilterOptions( sal_uInt16 nCnt, const sal_Char** ppNames,
+ sal_uInt32* pValues )
+ : ConfigItem( FILTER_OPTION_ROOT )
+{
+ GetValues( nCnt, ppNames, pValues );
+}
+
+void SwFilterOptions::GetValues( sal_uInt16 nCnt, const sal_Char** ppNames,
+ sal_uInt32* pValues )
+{
+ Sequence<OUString> aNames( nCnt );
+ OUString* pNames = aNames.getArray();
+ USHORT n;
+
+ for( n = 0; n < nCnt; ++n )
+ pNames[ n ] = OUString::createFromAscii( ppNames[ n ] );
+ Sequence<Any> aValues = GetProperties( aNames );
+
+ if( nCnt == aValues.getLength() )
+ {
+ const Any* pAnyValues = aValues.getConstArray();
+ for( n = 0; n < nCnt; ++n )
+ pValues[ n ] = pAnyValues[ n ].hasValue()
+ ? *(sal_uInt32*)pAnyValues[ n ].getValue()
+ : 0;
+ }
+ else
+ for( n = 0; n < nCnt; ++n )
+ pValues[ n ] = 0;
+}
+
+void SwFilterOptions::Commit() {}
+void SwFilterOptions::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+
+/* */
+
+
+void StgReader::SetFltName( const String& rFltNm )
+{
+ if( SW_STORAGE_READER & GetReaderType() )
+ aFltName = rFltNm;
+}
+
+
+/* */
+
+SwRelNumRuleSpaces::SwRelNumRuleSpaces( SwDoc& rDoc, BOOL bNDoc )
+ : bNewDoc( bNDoc )
+{
+ pNumRuleTbl = new SwNumRuleTbl( 8, 8 );
+ if( !bNDoc )
+ pNumRuleTbl->Insert( &rDoc.GetNumRuleTbl(), 0 );
+}
+
+SwRelNumRuleSpaces::~SwRelNumRuleSpaces()
+{
+ if( pNumRuleTbl )
+ {
+ pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() );
+ delete pNumRuleTbl;
+ }
+}
+
+void SwRelNumRuleSpaces::SetNumRelSpaces( SwDoc& rDoc )
+{
+ const SwNumRuleTbl* pRuleTbl = NULL;
+
+ if( !bNewDoc )
+ {
+ // jetzt alle schon vorhanden NumRules aus dem Array entfernen,
+ // damit nur die neuen angepasst werden
+ SwNumRuleTbl aNumRuleTbl;
+ aNumRuleTbl.Insert( pNumRuleTbl, 0 );
+ pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() );
+ const SwNumRuleTbl& rRuleTbl = rDoc.GetNumRuleTbl();
+ SwNumRule* pRule;
+
+ for( USHORT n = 0; n < rRuleTbl.Count(); ++n )
+ if( USHRT_MAX == aNumRuleTbl.GetPos( ( pRule = rRuleTbl[ n ] )))
+ // war noch nicht vorhanden, also neu
+ pNumRuleTbl->Insert( pRule, pNumRuleTbl->Count() );
+
+ aNumRuleTbl.Remove( 0, aNumRuleTbl.Count() );
+
+ pRuleTbl = pNumRuleTbl;
+ }
+ else
+ {
+ pRuleTbl = &rDoc.GetNumRuleTbl();
+ }
+
+ if( pRuleTbl )
+ {
+ for( USHORT n = pRuleTbl->Count(); n; )
+ {
+ SwNumRule* pRule = (*pRuleTbl)[ --n ];
+ // Rule noch gueltig und am Doc vorhanden?
+ if( USHRT_MAX != rDoc.GetNumRuleTbl().GetPos( pRule ))
+ {
+ SwNumRule::tTxtNodeList aTxtNodeList;
+ pRule->GetTxtNodeList( aTxtNodeList );
+ for ( SwNumRule::tTxtNodeList::iterator aIter = aTxtNodeList.begin();
+ aIter != aTxtNodeList.end(); ++aIter )
+ {
+ SwTxtNode* pNd = *aIter;
+ SetNumLSpace( *pNd, *pRule );
+ }
+ }
+ }
+ }
+
+ if( pNumRuleTbl )
+ {
+ pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() );
+ delete pNumRuleTbl, pNumRuleTbl = 0;
+ }
+
+ if( bNewDoc )
+ {
+ SetOultineRelSpaces( SwNodeIndex( rDoc.GetNodes() ),
+ SwNodeIndex( rDoc.GetNodes().GetEndOfContent()));
+ }
+}
+
+void SwRelNumRuleSpaces::SetOultineRelSpaces( const SwNodeIndex& rStt,
+ const SwNodeIndex& rEnd )
+{
+ SwDoc* pDoc = rStt.GetNode().GetDoc();
+ const SwOutlineNodes& rOutlNds = pDoc->GetNodes().GetOutLineNds();
+ if( rOutlNds.Count() )
+ {
+ USHORT nPos;
+ rOutlNds.Seek_Entry( &rStt.GetNode(), &nPos );
+ for( ; nPos < rOutlNds.Count() &&
+ rOutlNds[ nPos ]->GetIndex() < rEnd.GetIndex(); ++nPos )
+ {
+ SwTxtNode* pNd = rOutlNds[ nPos ]->GetTxtNode();
+ if( pNd->IsOutline() && !pNd->GetNumRule() )
+ SetNumLSpace( *pNd, *pDoc->GetOutlineNumRule() );
+ }
+ }
+}
+
+void SwRelNumRuleSpaces::SetNumLSpace( SwTxtNode& rNd, const SwNumRule& rRule )
+{
+ BOOL bOutlineRule = OUTLINE_RULE == rRule.GetRuleType();
+ // #128056# correction of refactoring done by cws swnumtree:
+ // - assure a correct level for retrieving numbering format.
+ BYTE nLvl = 0;
+ if ( rNd.GetActualListLevel() >= 0 && rNd.GetActualListLevel() < MAXLEVEL )
+ {
+ nLvl = static_cast< BYTE >(rNd.GetActualListLevel());
+ }
+
+ const SwNumFmt& rFmt = rRule.Get( nLvl );
+ const SvxLRSpaceItem& rLR = rNd.GetSwAttrSet().GetLRSpace();
+
+ SvxLRSpaceItem aLR( rLR );
+ aLR.SetTxtFirstLineOfst( 0 );
+
+ // sagt der Node, das die Numerierung den Wert vorgibt?
+ if( !bOutlineRule && rNd.IsSetNumLSpace() )
+ aLR.SetTxtLeft( 0 );
+ else
+ {
+ long nLeft = rFmt.GetAbsLSpace(), nParaLeft = rLR.GetTxtLeft();
+ if( 0 < rLR.GetTxtFirstLineOfst() )
+ nParaLeft += rLR.GetTxtFirstLineOfst();
+ else if( nParaLeft >= nLeft )
+ // #82963#/#82962#: set correct paragraph indent
+ nParaLeft -= nLeft;
+ else
+ //#83154#, Don't think any of the older #80856# bugfix code is
+ //relevent anymore.
+ nParaLeft = rLR.GetTxtLeft()+rLR.GetTxtFirstLineOfst();
+ aLR.SetTxtLeft( nParaLeft );
+ }
+
+ if( aLR.GetTxtLeft() != rLR.GetTxtLeft() )
+ {
+ //bevor rLR geloescht wird!
+ long nOffset = rLR.GetTxtLeft() - aLR.GetTxtLeft();
+ rNd.SetAttr( aLR );
+
+ // Tabs anpassen !!
+ const SfxPoolItem* pItem;
+ if( SFX_ITEM_SET == rNd.GetSwAttrSet().GetItemState(
+ RES_PARATR_TABSTOP, TRUE, &pItem ))
+ {
+ SvxTabStopItem aTStop( *(SvxTabStopItem*)pItem );
+ for( USHORT n = 0; n < aTStop.Count(); ++n )
+ {
+ SvxTabStop& rTab = (SvxTabStop&)aTStop[ n ];
+ if( SVX_TAB_ADJUST_DEFAULT != rTab.GetAdjustment() )
+ {
+ if( !rTab.GetTabPos() )
+ {
+ aTStop.Remove( n );
+ --n;
+ }
+ else
+ rTab.GetTabPos() += nOffset;
+ }
+ }
+ rNd.SetAttr( aTStop );
+ }
+ }
+}
+
+/* */
+
+
+void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor,
+ SwTwips nPageWidth)
+{
+ const SfxPoolItem* pItem = 0;
+ if( SFX_ITEM_SET != rFlySet.GetItemState( RES_FRM_SIZE, TRUE, &pItem ) ||
+ MINFLY > ((SwFmtFrmSize*)pItem)->GetWidth() )
+ {
+ SwFmtFrmSize aSz((SwFmtFrmSize&)rFlySet.Get(RES_FRM_SIZE, TRUE));
+ if (pItem)
+ aSz = (SwFmtFrmSize&)(*pItem);
+
+ SwTwips nWidth;
+ // dann die Breite des Flys selbst bestimmen. Ist eine Tabelle
+ // defininiert, dann benutze deren Breite, sonst die Breite der
+ // Seite
+ const SwTableNode* pTblNd = rAnchor.GetNode().FindTableNode();
+ if( pTblNd )
+ nWidth = pTblNd->GetTable().GetFrmFmt()->GetFrmSize().GetWidth();
+ else
+ nWidth = nPageWidth;
+
+ const SwNodeIndex* pSttNd = ((SwFmtCntnt&)rFlySet.Get( RES_CNTNT )).
+ GetCntntIdx();
+ if( pSttNd )
+ {
+ BOOL bOnlyOneNode = TRUE;
+ ULONG nMinFrm = 0;
+ ULONG nMaxFrm = 0;
+ SwTxtNode* pFirstTxtNd = 0;
+ SwNodeIndex aIdx( *pSttNd, 1 );
+ SwNodeIndex aEnd( *pSttNd->GetNode().EndOfSectionNode() );
+ while( aIdx < aEnd )
+ {
+ SwTxtNode *pTxtNd = aIdx.GetNode().GetTxtNode();
+ if( pTxtNd )
+ {
+ if( !pFirstTxtNd )
+ pFirstTxtNd = pTxtNd;
+ else if( pFirstTxtNd != pTxtNd )
+ {
+ // forget it
+ bOnlyOneNode = FALSE;
+ break;
+ }
+
+ ULONG nAbsMinCnts;
+ pTxtNd->GetMinMaxSize( aIdx.GetIndex(), nMinFrm,
+ nMaxFrm, nAbsMinCnts );
+ }
+ aIdx++;
+ }
+
+ if( bOnlyOneNode )
+ {
+ if( nMinFrm < MINLAY && pFirstTxtNd )
+ {
+ // if the first node dont contained any content, then
+ // insert one char in it calc again and delete once again
+ SwIndex aNdIdx( pFirstTxtNd );
+ pFirstTxtNd->InsertText( String::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( "MM" )), aNdIdx );
+ ULONG nAbsMinCnts;
+ pFirstTxtNd->GetMinMaxSize( pFirstTxtNd->GetIndex(),
+ nMinFrm, nMaxFrm, nAbsMinCnts );
+ aNdIdx -= 2;
+ pFirstTxtNd->EraseText( aNdIdx, 2 );
+ }
+
+ // Umrandung und Abstand zum Inhalt beachten
+ const SvxBoxItem& rBoxItem = (SvxBoxItem&)rFlySet.Get( RES_BOX );
+ USHORT nLine = BOX_LINE_LEFT;
+ for( int i = 0; i < 2; ++i )
+ {
+ const SvxBorderLine* pLn = rBoxItem.GetLine( nLine );
+ if( pLn )
+ {
+ USHORT nWidthTmp = pLn->GetOutWidth() + pLn->GetInWidth();
+ nWidthTmp = nWidthTmp + rBoxItem.GetDistance( nLine );
+ nMinFrm += nWidthTmp;
+ nMaxFrm += nWidthTmp;
+ }
+ nLine = BOX_LINE_RIGHT;
+ }
+
+ // Mindestbreite fuer Inhalt einhalten
+ if( nMinFrm < MINLAY )
+ nMinFrm = MINLAY;
+ if( nMaxFrm < MINLAY )
+ nMaxFrm = MINLAY;
+
+ if( nWidth > (USHORT)nMaxFrm )
+ nWidth = nMaxFrm;
+ else if( nWidth > (USHORT)nMinFrm )
+ nWidth = nMinFrm;
+ }
+ }
+
+ if( MINFLY > nWidth )
+ nWidth = MINFLY;
+
+ aSz.SetWidth( nWidth );
+ if( MINFLY > aSz.GetHeight() )
+ aSz.SetHeight( MINFLY );
+ rFlySet.Put( aSz );
+ }
+ else if( MINFLY > ((SwFmtFrmSize*)pItem)->GetHeight() )
+ {
+ SwFmtFrmSize aSz( *(SwFmtFrmSize*)pItem );
+ aSz.SetHeight( MINFLY );
+ rFlySet.Put( aSz );
+ }
+}
+
+/* */
+struct CharSetNameMap
+{
+ rtl_TextEncoding eCode;
+ const sal_Char* pName;
+};
+
+const CharSetNameMap *GetCharSetNameMap()
+{
+ static const CharSetNameMap aMapArr[] =
+ {
+# define IMPLENTRY(X) { RTL_TEXTENCODING_##X, "" #X "" }
+ IMPLENTRY(DONTKNOW),
+ IMPLENTRY(MS_1252),
+ IMPLENTRY(APPLE_ROMAN),
+ IMPLENTRY(IBM_437),
+ IMPLENTRY(IBM_850),
+ IMPLENTRY(IBM_860),
+ IMPLENTRY(IBM_861),
+ IMPLENTRY(IBM_863),
+ IMPLENTRY(IBM_865),
+ IMPLENTRY(SYMBOL),
+ IMPLENTRY(ASCII_US),
+ IMPLENTRY(ISO_8859_1),
+ IMPLENTRY(ISO_8859_2),
+ IMPLENTRY(ISO_8859_3),
+ IMPLENTRY(ISO_8859_4),
+ IMPLENTRY(ISO_8859_5),
+ IMPLENTRY(ISO_8859_6),
+ IMPLENTRY(ISO_8859_7),
+ IMPLENTRY(ISO_8859_8),
+ IMPLENTRY(ISO_8859_9),
+ IMPLENTRY(ISO_8859_14),
+ IMPLENTRY(ISO_8859_15),
+ IMPLENTRY(IBM_737),
+ IMPLENTRY(IBM_775),
+ IMPLENTRY(IBM_852),
+ IMPLENTRY(IBM_855),
+ IMPLENTRY(IBM_857),
+ IMPLENTRY(IBM_862),
+ IMPLENTRY(IBM_864),
+ IMPLENTRY(IBM_866),
+ IMPLENTRY(IBM_869),
+ IMPLENTRY(MS_874),
+ IMPLENTRY(MS_1250),
+ IMPLENTRY(MS_1251),
+ IMPLENTRY(MS_1253),
+ IMPLENTRY(MS_1254),
+ IMPLENTRY(MS_1255),
+ IMPLENTRY(MS_1256),
+ IMPLENTRY(MS_1257),
+ IMPLENTRY(MS_1258),
+ IMPLENTRY(APPLE_ARABIC),
+ IMPLENTRY(APPLE_CENTEURO),
+ IMPLENTRY(APPLE_CROATIAN),
+ IMPLENTRY(APPLE_CYRILLIC),
+ IMPLENTRY(APPLE_DEVANAGARI),
+ IMPLENTRY(APPLE_FARSI),
+ IMPLENTRY(APPLE_GREEK),
+ IMPLENTRY(APPLE_GUJARATI),
+ IMPLENTRY(APPLE_GURMUKHI),
+ IMPLENTRY(APPLE_HEBREW),
+ IMPLENTRY(APPLE_ICELAND),
+ IMPLENTRY(APPLE_ROMANIAN),
+ IMPLENTRY(APPLE_THAI),
+ IMPLENTRY(APPLE_TURKISH),
+ IMPLENTRY(APPLE_UKRAINIAN),
+ IMPLENTRY(APPLE_CHINSIMP),
+ IMPLENTRY(APPLE_CHINTRAD),
+ IMPLENTRY(APPLE_JAPANESE),
+ IMPLENTRY(APPLE_KOREAN),
+ IMPLENTRY(MS_932),
+ IMPLENTRY(MS_936),
+ IMPLENTRY(MS_949),
+ IMPLENTRY(MS_950),
+ IMPLENTRY(SHIFT_JIS),
+ IMPLENTRY(GB_2312),
+ IMPLENTRY(GBT_12345),
+ IMPLENTRY(GBK),
+ IMPLENTRY(BIG5),
+ IMPLENTRY(EUC_JP),
+ IMPLENTRY(EUC_CN),
+ IMPLENTRY(EUC_TW),
+ IMPLENTRY(ISO_2022_JP),
+ IMPLENTRY(ISO_2022_CN),
+ IMPLENTRY(KOI8_R),
+ IMPLENTRY(KOI8_U),
+ IMPLENTRY(UTF7),
+ IMPLENTRY(UTF8),
+ IMPLENTRY(ISO_8859_10),
+ IMPLENTRY(ISO_8859_13),
+ IMPLENTRY(EUC_KR),
+ IMPLENTRY(ISO_2022_KR),
+ IMPLENTRY(JIS_X_0201),
+ IMPLENTRY(JIS_X_0208),
+ IMPLENTRY(JIS_X_0212),
+ IMPLENTRY(MS_1361),
+ IMPLENTRY(GB_18030),
+ IMPLENTRY(BIG5_HKSCS),
+ IMPLENTRY(TIS_620),
+ IMPLENTRY(PT154),
+ IMPLENTRY(UCS4),
+ IMPLENTRY(UCS2),
+ IMPLENTRY(UNICODE),
+ {0,0} //Last
+ };
+ return &aMapArr[0];
+}
+/*
+ Get a rtl_TextEncoding from its name
+ */
+rtl_TextEncoding CharSetFromName(const String& rChrSetStr)
+{
+ const CharSetNameMap *pStart = GetCharSetNameMap();
+ rtl_TextEncoding nRet = pStart->eCode;
+
+ for(const CharSetNameMap *pMap = pStart; pMap->pName; ++pMap)
+ {
+ if(rChrSetStr.EqualsIgnoreCaseAscii(pMap->pName))
+ {
+ nRet = pMap->eCode;
+ break;
+ }
+ }
+
+ OSL_ENSURE(nRet != pStart->eCode, "TXT: That was an unknown language!");
+
+ return nRet;
+}
+
+
+/*
+ Get the String name of an rtl_TextEncoding
+ */
+String NameFromCharSet(rtl_TextEncoding nChrSet)
+{
+ const CharSetNameMap *pStart = GetCharSetNameMap();
+ const char *pRet = pStart->pName;
+
+ for(const CharSetNameMap *pMap = pStart; pMap->pName; ++pMap)
+ {
+ if (nChrSet == pMap->eCode)
+ {
+ pRet = pMap->pName;
+ break;
+ }
+ }
+
+ OSL_ENSURE(pRet != pStart->pName, "TXT: That was an unknown language!");
+
+ return String::CreateFromAscii(pRet);
+}
+
+// for the automatic conversion (mail/news/...)
+// The user data contains the options for the ascii import/export filter.
+// The format is:
+// 1. CharSet - as ascii chars
+// 2. LineEnd - as CR/LR/CRLF
+// 3. Fontname
+// 4. Language
+// the delimetercharacter is ","
+//
+
+void SwAsciiOptions::ReadUserData( const String& rStr )
+{
+ xub_StrLen nToken = 0;
+ USHORT nCnt = 0;
+ String sToken;
+ do {
+ if( 0 != (sToken = rStr.GetToken( 0, ',', nToken )).Len() )
+ {
+ switch( nCnt )
+ {
+ case 0: // CharSet
+ eCharSet = CharSetFromName(sToken);
+ break;
+ case 1: // LineEnd
+ if( sToken.EqualsIgnoreCaseAscii( "CRLF" ))
+ eCRLF_Flag = LINEEND_CRLF;
+ else if( sToken.EqualsIgnoreCaseAscii( "LF" ))
+ eCRLF_Flag = LINEEND_LF;
+ else
+ eCRLF_Flag = LINEEND_CR;
+ break;
+ case 2: // fontname
+ sFont = sToken;
+ break;
+ case 3: // Language
+ nLanguage = MsLangId::convertIsoStringToLanguage( sToken );
+ break;
+ }
+ }
+ ++nCnt;
+ } while( STRING_NOTFOUND != nToken );
+}
+
+void SwAsciiOptions::WriteUserData( String& rStr )
+{
+ // 1. charset
+ rStr = NameFromCharSet(eCharSet);
+ rStr += ',';
+
+ // 2. LineEnd
+ switch(eCRLF_Flag)
+ {
+ case LINEEND_CRLF:
+ rStr.AppendAscii( "CRLF" );
+ break;
+ case LINEEND_CR:
+ rStr.AppendAscii( "CR" );
+ break;
+ case LINEEND_LF:
+ rStr.AppendAscii( "LF" );
+ break;
+ }
+ rStr += ',';
+
+ // 3. Fontname
+ rStr += sFont;
+ rStr += ',';
+
+ // 4. Language
+ if (nLanguage)
+ {
+ rtl::OUString sTmp = MsLangId::convertLanguageToIsoString( nLanguage );
+ rStr += (String)sTmp;
+ }
+ rStr += ',';
+}
+
+extern "C" { static void SAL_CALL thisModule() {} }
+
+static oslGenericFunction GetMswordLibSymbol( const char *pSymbol )
+{
+ static ::osl::Module aModule;
+ static sal_Bool bLoaded = sal_False;
+ static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "msword" ) ) );
+ if (!bLoaded)
+ bLoaded = SvLibrary::LoadModule( aModule, aLibName, &thisModule );
+ if (bLoaded)
+ return aModule.getFunctionSymbol( ::rtl::OUString::createFromAscii( pSymbol ) );
+ return NULL;
+}
+
+Reader* GetRTFReader()
+{
+ FnGetReader pFunction = reinterpret_cast<FnGetReader>( GetMswordLibSymbol( "ImportRTF" ) );
+
+ if ( pFunction )
+ return (*pFunction)();
+
+ return NULL;
+}
+
+void GetRTFWriter( const String& rFltName, const String& rBaseURL, WriterRef& xRet )
+{
+ FnGetWriter pFunction = reinterpret_cast<FnGetWriter>( GetMswordLibSymbol( "ExportRTF" ) );
+
+ if ( pFunction )
+ (*pFunction)( rFltName, rBaseURL, xRet );
+ else
+ xRet = WriterRef(0);
+}
+
+Reader* GetWW8Reader()
+{
+ FnGetReader pFunction = reinterpret_cast<FnGetReader>( GetMswordLibSymbol( "ImportDOC" ) );
+
+ if ( pFunction )
+ return (*pFunction)();
+
+ return NULL;
+}
+
+void GetWW8Writer( const String& rFltName, const String& rBaseURL, WriterRef& xRet )
+{
+ FnGetWriter pFunction = reinterpret_cast<FnGetWriter>( GetMswordLibSymbol( "ExportDOC" ) );
+
+ if ( pFunction )
+ (*pFunction)( rFltName, rBaseURL, xRet );
+ else
+ xRet = WriterRef(0);
+}
+
+typedef ULONG ( __LOADONCALLAPI *SaveOrDel )( SfxObjectShell&, SotStorage&, BOOL, const String& );
+typedef ULONG ( __LOADONCALLAPI *GetSaveWarning )( SfxObjectShell& );
+
+ULONG SaveOrDelMSVBAStorage( SfxObjectShell& rDoc, SotStorage& rStor, BOOL bSaveInto, const String& rStorageName )
+{
+ SaveOrDel pFunction = reinterpret_cast<SaveOrDel>( GetMswordLibSymbol( "SaveOrDelMSVBAStorage_ww8" ) );
+ if( pFunction )
+ return pFunction( rDoc, rStor, bSaveInto, rStorageName );
+ return ERRCODE_NONE;
+}
+
+ULONG GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS )
+{
+ GetSaveWarning pFunction = reinterpret_cast<GetSaveWarning>( GetMswordLibSymbol( "GetSaveWarningOfMSVBAStorage_ww8" ) );
+ if( pFunction )
+ return pFunction( rDocS );
+ return ERRCODE_NONE;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/basflt/makefile.mk b/sw/source/filter/basflt/makefile.mk deleted file mode 100644 index e526227174..0000000000 --- a/sw/source/filter/basflt/makefile.mk +++ /dev/null @@ -1,57 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=basflt - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(mydebug)" != "" -CDEFS+=-Dmydebug -.ENDIF - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - -EXCEPTIONSFILES = \ - $(SLO)$/docfact.obj \ - $(SLO)$/fltini.obj \ - $(SLO)$/iodetect.obj \ - $(SLO)$/shellio.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index 8ff6a1664e..d6ffc3cd41 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -511,7 +511,7 @@ SwDoc* Reader::GetTemplateDoc() { SwDocShell *pDocSh = new SwDocShell ( SFX_CREATE_MODE_INTERNAL ); - SfxObjectShellRef xDocSh = pDocSh; + SfxObjectShellLock xDocSh = pDocSh; if( pDocSh->DoInitNew( 0 ) ) { pTemplate = pDocSh->GetDoc(); @@ -786,15 +786,12 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName ) SwPaM * pPam; SwDoc *pDoc = 0; - SfxObjectShellRef* pRefForDocSh = 0; if ( pShell && !bWriteAll && pShell->IsTableMode() ) { bWriteAll = TRUE; pDoc = new SwDoc; pDoc->acquire(); - pRefForDocSh = new SfxObjectShellRef(); - pDoc->SetRefForDocShell( pRefForDocSh ); // kopiere Teile aus einer Tabelle: lege eine Tabelle mit der Breite // von der Originalen an und kopiere die selectierten Boxen. @@ -952,7 +949,6 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName ) if ( pDoc ) { - delete pRefForDocSh; if ( !pDoc->release() ) delete pDoc; bWriteAll = FALSE; diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 7b020e09f0..91f21bd3a7 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -50,6 +50,7 @@ #include <editeng/lspcitem.hxx> #include <editeng/adjitem.hxx> #include <editeng/lrspitem.hxx> +#include <editeng/ulspitem.hxx> #include <editeng/brshitem.hxx> #include <editeng/brkitem.hxx> #include <editeng/keepitem.hxx> diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index e3a1dc7f98..2568100918 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -1251,8 +1251,9 @@ class HTMLEndPosLst SvXub_StrLens aScriptChgLst; // positions where script changes // 0 is not contained in this list, // but the text length - SvUShorts aScriptLst; // the script that is valif up to the position - // contained in aScriptChgList at the same index + // the script that is valif up to the position + // contained in aScriptChgList at the same index + ::std::vector<USHORT> aScriptLst; SwDoc *pDoc; // das aktuelle Dokument SwDoc* pTemplate; // die HTML-Vorlage (oder 0) @@ -1794,8 +1795,8 @@ HTMLEndPosLst::HTMLEndPosLst( SwDoc *pD, SwDoc* pTempl, { sal_uInt16 nScript = pBreakIt->GetBreakIter()->getScriptType( rText, nPos ); nPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfScript( rText, nPos, nScript ); - aScriptChgLst.Insert( nPos, aScriptChgLst.Count() ); - aScriptLst.Insert( nScript, aScriptLst.Count() ); + aScriptChgLst.push_back( nPos ); + aScriptLst.push_back( nScript ); } } @@ -1992,9 +1993,8 @@ void HTMLEndPosLst::Insert( const SfxPoolItem& rItem, if( bDependsOnScript ) { - sal_uInt16 nScriptChgs = aScriptChgLst.Count(); xub_StrLen nPos = nStart; - for( sal_uInt16 i=0; i < nScriptChgs; i++ ) + for( size_t i=0; i < aScriptChgLst.size(); i++ ) { xub_StrLen nChgPos = aScriptChgLst[i]; if( nPos >= nChgPos ) @@ -2077,8 +2077,8 @@ sal_uInt16 HTMLEndPosLst::GetScriptAtPos( xub_StrLen nPos , { sal_uInt16 nRet = CSS1_OUTMODE_ANY_SCRIPT; - sal_uInt16 nScriptChgs = aScriptChgLst.Count(); - sal_uInt16 i=0; + size_t nScriptChgs = aScriptChgLst.size(); + size_t i=0; while( i < nScriptChgs && nPos >= aScriptChgLst[i] ) i++; OSL_ENSURE( i < nScriptChgs, "script list is to short" ); diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index 1eafdf9352..7359a60c75 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -43,6 +43,7 @@ #include <editeng/lrspitem.hxx> #include <editeng/ulspitem.hxx> #include <editeng/boxitem.hxx> +#include <editeng/fhgtitem.hxx> #include <editeng/flstitem.hxx> #include <editeng/brkitem.hxx> #include <editeng/keepitem.hxx> diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx index 50dd594c50..2e3754d7d3 100644 --- a/sw/source/filter/html/htmlfldw.cxx +++ b/sw/source/filter/html/htmlfldw.cxx @@ -306,7 +306,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld, } // Inhalt des Feldes ausgeben - String const sExpand( pFld->ExpandField(rWrt.pDoc->IsClipBoard()) ); + String const sExpand( pFld->ExpandField(true) ); sal_Bool bNeedsCJKProcessing = sal_False; if( sExpand.Len() ) { diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx index dd1d3058fb..99347ccf3a 100644 --- a/sw/source/filter/html/htmlfly.cxx +++ b/sw/source/filter/html/htmlfly.cxx @@ -1833,10 +1833,10 @@ void SwHTMLWriter::CollectLinkTargets() const SwTxtINetFmt* pTxtAttr; const SwTxtNode* pTxtNd; - USHORT n, nMaxItems = pDoc->GetAttrPool().GetItemCount( RES_TXTATR_INETFMT ); + sal_uInt32 n, nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT ); for( n = 0; n < nMaxItems; ++n ) { - if( 0 != (pINetFmt = (SwFmtINetFmt*)pDoc->GetAttrPool().GetItem( + if( 0 != (pINetFmt = (SwFmtINetFmt*)pDoc->GetAttrPool().GetItem2( RES_TXTATR_INETFMT, n ) ) && 0 != ( pTxtAttr = pINetFmt->GetTxtINetFmt()) && 0 != ( pTxtNd = pTxtAttr->GetpTxtNode() ) && @@ -1847,10 +1847,10 @@ void SwHTMLWriter::CollectLinkTargets() } const SwFmtURL *pURL; - nMaxItems = pDoc->GetAttrPool().GetItemCount( RES_URL ); + nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_URL ); for( n = 0; n < nMaxItems; ++n ) { - if( 0 != (pURL = (SwFmtURL*)pDoc->GetAttrPool().GetItem( + if( 0 != (pURL = (SwFmtURL*)pDoc->GetAttrPool().GetItem2( RES_URL, n ) ) ) { AddLinkTarget( pURL->GetURL() ); diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index c6380f4790..c26241713a 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -1352,7 +1352,7 @@ void SwHTMLParser::NewForm( sal_Bool bAppend ) { const HTMLOption *pOption = (*pHTMLOptions)[--i]; ScriptType eScriptType2 = eDfltScriptType; - sal_uInt16 nEvent; + sal_uInt16 nEvent = 0; sal_Bool bSetEvent = sal_False; switch( pOption->GetToken() ) @@ -1526,7 +1526,7 @@ void SwHTMLParser::InsertInput() { const HTMLOption *pOption = (*pHTMLOptions)[--i]; ScriptType eScriptType2 = eDfltScriptType; - sal_uInt16 nEvent; + sal_uInt16 nEvent = 0; sal_Bool bSetEvent = sal_False; switch( pOption->GetToken() ) @@ -2018,7 +2018,7 @@ void SwHTMLParser::NewTextArea() { const HTMLOption *pOption = (*pHTMLOptions)[--i]; ScriptType eScriptType2 = eDfltScriptType; - sal_uInt16 nEvent; + sal_uInt16 nEvent = 0; sal_Bool bSetEvent = sal_False; switch( pOption->GetToken() ) @@ -2309,7 +2309,7 @@ void SwHTMLParser::NewSelect() { const HTMLOption *pOption = (*pHTMLOptions)[--i]; ScriptType eScriptType2 = eDfltScriptType; - sal_uInt16 nEvent; + sal_uInt16 nEvent = 0; sal_Bool bSetEvent = sal_False; switch( pOption->GetToken() ) diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index cad9f387d2..949e1cc0a8 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -40,6 +40,7 @@ #include <editeng/fhgtitem.hxx> #include <editeng/lrspitem.hxx> #include <editeng/adjitem.hxx> +#include <editeng/fhgtitem.hxx> #include <editeng/brshitem.hxx> #include <editeng/colritem.hxx> #include <editeng/boxitem.hxx> @@ -164,7 +165,7 @@ void SwHTMLParser::ConnectImageMaps() } -/* */ +/* */ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri, sal_Int16 eHoriOri, @@ -300,12 +301,11 @@ void SwHTMLParser::RegisterFlyFrm( SwFrmFmt *pFlyFmt ) SURROUND_THROUGHT == pFlyFmt->GetSurround().GetSurround() ) { aMoveFlyFrms.Insert( pFlyFmt, aMoveFlyFrms.Count() ); - aMoveFlyCnts.Insert( pPam->GetPoint()->nContent.GetIndex(), - aMoveFlyCnts.Count() ); + aMoveFlyCnts.push_back( pPam->GetPoint()->nContent.GetIndex() ); } } -/* */ +/* */ void SwHTMLParser::GetDefaultScriptType( ScriptType& rType, String& rTypeStr ) const @@ -317,7 +317,7 @@ void SwHTMLParser::GetDefaultScriptType( ScriptType& rType, rTypeStr = GetScriptTypeString( pHeaderAttrs ); } -/* */ +/* */ void SwHTMLParser::InsertImage() { @@ -814,7 +814,7 @@ IMAGE_SETEVENT: InsertBookmark( aId ); } -/* */ +/* */ void SwHTMLParser::InsertBodyOptions() { @@ -1042,7 +1042,7 @@ void SwHTMLParser::InsertBodyOptions() InsertBookmark( aId ); } -/* */ +/* */ void SwHTMLParser::NewAnchor() { @@ -1263,7 +1263,7 @@ void SwHTMLParser::EndAnchor() EndTag( HTML_ANCHOR_OFF ); } -/* */ +/* */ void SwHTMLParser::InsertBookmark( const String& rName ) { @@ -1319,7 +1319,7 @@ BOOL SwHTMLParser::HasCurrentParaBookmarks( BOOL bIgnoreStack ) const return bHasMarks; } -/* */ +/* */ void SwHTMLParser::StripTrailingPara() { diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 5b752d4f90..55d9b9a3f2 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -35,6 +35,7 @@ #include <vcl/svapp.hxx> #include <vcl/wrkwin.hxx> #include <editeng/boxitem.hxx> +#include <editeng/boxitem.hxx> #include <editeng/brshitem.hxx> #include <editeng/adjitem.hxx> #include <editeng/fhgtitem.hxx> diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx index e6f82b6a2c..8c5bfe67d6 100644 --- a/sw/source/filter/html/htmltabw.cxx +++ b/sw/source/filter/html/htmltabw.cxx @@ -37,6 +37,7 @@ #include <svtools/htmlkywd.hxx> #include <vcl/wrkwin.hxx> #include <editeng/ulspitem.hxx> +#include <editeng/ulspitem.hxx> #include <editeng/lrspitem.hxx> #include <editeng/brshitem.hxx> #include <editeng/boxitem.hxx> @@ -67,6 +68,7 @@ #include <viewsh.hxx> #include <viewopt.hxx> #endif +#include <sal/types.h> #define MAX_DEPTH (3) @@ -94,7 +96,7 @@ class SwHTMLWrtTable : public SwWriteTable sal_Bool bTop, sal_Bool bBottom, sal_Bool bLeft, sal_Bool bRight ); public: - SwHTMLWrtTable( const SwTableLines& rLines, long nWidth, sal_uInt16 nBWidth, + SwHTMLWrtTable( const SwTableLines& rLines, long nWidth, sal_uInt32 nBWidth, sal_Bool bRel, USHORT nNumOfRowsToRepeat, sal_uInt16 nLeftSub=0, sal_uInt16 nRightSub=0 ); SwHTMLWrtTable( const SwHTMLTableLayout *pLayoutInfo ); @@ -107,7 +109,7 @@ public: SwHTMLWrtTable::SwHTMLWrtTable( const SwTableLines& rLines, long nWidth, - sal_uInt16 nBWidth, sal_Bool bRel, USHORT nNumOfRowsToRepeat, + sal_uInt32 nBWidth, sal_Bool bRel, USHORT nNumOfRowsToRepeat, sal_uInt16 nLSub, sal_uInt16 nRSub ) : SwWriteTable( rLines, nWidth, nBWidth, bRel, MAX_DEPTH, nLSub, nRSub, nNumOfRowsToRepeat ) { @@ -334,7 +336,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt, #ifndef PURE_HTML long nWidth = 0; - sal_uInt16 nPrcWidth = USHRT_MAX; + sal_uInt32 nPrcWidth = ULONG_MAX; if( bOutWidth ) { if( bLayoutExport ) @@ -473,7 +475,9 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt, } else { - sal_uInt16 nTWidth, nBWidth, nLSub, nRSub; + sal_uInt16 nTWidth; + sal_uInt32 nBWidth; + sal_uInt16 nLSub, nRSub; if( HasRelWidths() ) { nTWidth = 100; @@ -831,7 +835,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign, ByteString sOutStr( '<' ); sOutStr += OOO_STRING_SVTOOLS_HTML_col; - sal_uInt16 nWidth; + sal_uInt32 nWidth; sal_Bool bRel; if( bLayoutExport ) { diff --git a/sw/source/filter/html/makefile.mk b/sw/source/filter/html/makefile.mk deleted file mode 100644 index f64a6d593f..0000000000 --- a/sw/source/filter/html/makefile.mk +++ /dev/null @@ -1,79 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=html - - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(mydebug)" != "" -CDEFS=$(CDEFS) -Dmydebug -.ENDIF - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - $(SLO)$/css1kywd.obj \ - $(SLO)$/htmlflyt.obj - -EXCEPTIONSFILES = \ - $(SLO)$/SwAppletImpl.obj \ - $(SLO)$/css1atr.obj \ - $(SLO)$/htmlatr.obj \ - $(SLO)$/htmlbas.obj \ - $(SLO)$/htmlcss1.obj \ - $(SLO)$/htmlctxt.obj \ - $(SLO)$/htmldraw.obj \ - $(SLO)$/htmlfld.obj \ - $(SLO)$/htmlfldw.obj \ - $(SLO)$/htmlfly.obj \ - $(SLO)$/htmlform.obj \ - $(SLO)$/htmlforw.obj \ - $(SLO)$/htmlftn.obj \ - $(SLO)$/htmlgrin.obj \ - $(SLO)$/htmlnum.obj \ - $(SLO)$/htmlplug.obj \ - $(SLO)$/htmlsect.obj \ - $(SLO)$/htmltab.obj \ - $(SLO)$/htmltabw.obj \ - $(SLO)$/parcss1.obj \ - $(SLO)$/svxcss1.obj \ - $(SLO)$/swhtml.obj \ - $(SLO)$/wrthtml.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 62e54bb53e..8ab2cb7ac7 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -2890,7 +2890,7 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable, pFrmFmt->MakeFrms(); aMoveFlyFrms.Remove( n, 1 ); - aMoveFlyCnts.Remove( n, 1 ); + aMoveFlyCnts.erase( aMoveFlyCnts.begin() + n ); } } while( aFields.Count() ) diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index 3986b9b432..287b8144ca 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -407,8 +407,8 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient _HTMLAttrs aParaAttrs; // vorlauefige Absatz-Attribute _HTMLAttrTable aAttrTab; // "offene" Attribute _HTMLAttrContexts aContexts;// der aktuelle Attribut/Token-Kontext - SwHTMLFrmFmts aMoveFlyFrms;// Fly-Frames, deren Anker verschoben wird - SvXub_StrLens aMoveFlyCnts;// und deren Content-Positionen + SwHTMLFrmFmts aMoveFlyFrms;// Fly-Frames, the anchor is moved + SvXub_StrLens aMoveFlyCnts;// and the Content-Positions SwApplet_Impl *pAppletImpl; // das aktuelle Applet diff --git a/sw/source/filter/inc/makefile.mk b/sw/source/filter/inc/makefile.mk deleted file mode 100644 index 1b35ca4954..0000000000 --- a/sw/source/filter/inc/makefile.mk +++ /dev/null @@ -1,26 +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. -# -#************************************************************************* diff --git a/sw/source/filter/inc/wrtswtbl.hxx b/sw/source/filter/inc/wrtswtbl.hxx index c78a6c486b..9641e7b953 100644 --- a/sw/source/filter/inc/wrtswtbl.hxx +++ b/sw/source/filter/inc/wrtswtbl.hxx @@ -62,7 +62,7 @@ class SwWriteTableCell long nHeight; // fixe/Mindest-Hoehe der Zeile - USHORT nWidthOpt; // Breite aus Option; + sal_uInt32 nWidthOpt; // Breite aus Option; USHORT nRow; // Start-Zeile USHORT nCol; // Start-Spalte @@ -100,7 +100,7 @@ public: nWidthOpt = nWidth; bPrcWidthOpt = bPrc; } - USHORT GetWidthOpt() const { return nWidthOpt; } + sal_uInt32 GetWidthOpt() const { return nWidthOpt; } BOOL HasPrcWidthOpt() const { return bPrcWidthOpt; } }; @@ -181,9 +181,9 @@ SV_DECL_PTRARR_SORT_DEL( SwWriteTableRows, SwWriteTableRowPtr, 5, 5 ) class SwWriteTableCol { - USHORT nPos; // End Position der Spalte + sal_uInt32 nPos; // End Position der Spalte - USHORT nWidthOpt; + sal_uInt32 nWidthOpt; BOOL bRelWidthOpt : 1; BOOL bOutWidth : 1; // Spaltenbreite ausgeben? @@ -192,9 +192,9 @@ public: BOOL bLeftBorder : 1; // Welche Umrandungen sind da? BOOL bRightBorder : 1; - SwWriteTableCol( USHORT nPosition ); + SwWriteTableCol( sal_uInt32 nPosition ); - USHORT GetPos() const { return nPos; } + sal_uInt32 GetPos() const { return nPos; } void SetLeftBorder( BOOL bBorder ) { bLeftBorder = bBorder; } BOOL HasLeftBorder() const { return bLeftBorder; } @@ -208,11 +208,11 @@ public: inline int operator==( const SwWriteTableCol& rCol ) const; inline int operator<( const SwWriteTableCol& rCol ) const; - void SetWidthOpt( USHORT nWidth, BOOL bRel ) + void SetWidthOpt( sal_uInt32 nWidth, BOOL bRel ) { nWidthOpt = nWidth; bRelWidthOpt = bRel; } - USHORT GetWidthOpt() const { return nWidthOpt; } + sal_uInt32 GetWidthOpt() const { return nWidthOpt; } BOOL HasRelWidthOpt() const { return bRelWidthOpt; } }; @@ -249,14 +249,14 @@ protected: USHORT nBorder; // Dicke der ausseren Umrandung USHORT nInnerBorder; // Dicke der inneren Umrandung - USHORT nBaseWidth; // Bezugsgroesse fur Breiten SwFmtFrmSize + sal_uInt32 nBaseWidth; // Bezugsgroesse fur Breiten SwFmtFrmSize USHORT nHeadEndRow; // letzte Zeile des Tabellen-Kopfes USHORT nLeftSub; USHORT nRightSub; - long nTabWidth; // Absolute/Relative Breite der Tabelle + sal_uInt32 nTabWidth; // Absolute/Relative Breite der Tabelle BOOL bRelWidths : 1; // Breiten relativ ausgeben? BOOL bUseLayoutHeights : 1; // Layout zur Hoehenbestimmung nehmen? @@ -272,16 +272,16 @@ protected: virtual BOOL ShouldExpandSub( const SwTableBox *pBox, BOOL bExpandedBefore, USHORT nDepth ) const; - void CollectTableRowsCols( long nStartRPos, USHORT nStartCPos, + void CollectTableRowsCols( long nStartRPos, sal_uInt32 nStartCPos, long nParentLineHeight, - USHORT nParentLineWidth, + sal_uInt32 nParentLineWidth, const SwTableLines& rLines, USHORT nDepth ); void FillTableRowsCols( long nStartRPos, USHORT nStartRow, - USHORT nStartCPos, USHORT nStartCol, + sal_uInt32 nStartCPos, USHORT nStartCol, long nParentLineHeight, - USHORT nParentLineWidth, + sal_uInt32 nParentLineWidth, const SwTableLines& rLines, const SvxBrushItem* pLineBrush, USHORT nDepth, @@ -293,14 +293,14 @@ protected: USHORT nRowSpan, USHORT nColSpan, USHORT &rTopBorder, USHORT &rBottomBorder ); - USHORT GetBaseWidth() const { return nBaseWidth; } + sal_uInt32 GetBaseWidth() const { return nBaseWidth; } BOOL HasRelWidths() const { return bRelWidths; } public: - static long GetBoxWidth( const SwTableBox *pBox ); + static sal_uInt32 GetBoxWidth( const SwTableBox *pBox ); - USHORT GetRawWidth( USHORT nCol, USHORT nColSpan ) const; + sal_uInt32 GetRawWidth( USHORT nCol, USHORT nColSpan ) const; USHORT GetAbsWidth( USHORT nCol, USHORT nColSpan ) const; USHORT GetRelWidth( USHORT nCol, USHORT nColSpan ) const; USHORT GetPrcWidth( USHORT nCol, USHORT nColSpan ) const; @@ -318,7 +318,7 @@ protected: public: - SwWriteTable( const SwTableLines& rLines, long nWidth, USHORT nBWidth, + SwWriteTable( const SwTableLines& rLines, long nWidth, sal_uInt32 nBWidth, BOOL bRel, USHORT nMaxDepth = USHRT_MAX, USHORT nLeftSub=0, USHORT nRightSub=0, sal_uInt32 nNumOfRowsToRepeat=0 ); SwWriteTable( const SwHTMLTableLayout *pLayoutInfo ); diff --git a/sw/source/filter/makefile.mk b/sw/source/filter/makefile.mk deleted file mode 100644 index c2b343eb8b..0000000000 --- a/sw/source/filter/makefile.mk +++ /dev/null @@ -1,67 +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. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sw -TARGET=filter - -.IF "$(CALLTARGETS)"=="filter" -RC_SUBDIRS= -.ENDIF - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - - -SUBLIBS= \ - $(SLB)$/ascii.lib \ - $(SLB)$/basflt.lib \ - $(SLB)$/html.lib \ - $(SLB)$/writer.lib \ - $(SLB)$/ww1.lib \ - $(SLB)$/xml.lib - -# ----------------------------------------------------------- - - -################################################################ - -LIB1TARGET=$(SLB)$/filter.lib -LIB1FILES= \ - $(SUBLIBS) - -.INCLUDE : target.mk - -################################################################ - - diff --git a/sw/source/filter/rtf/makefile.mk b/sw/source/filter/rtf/makefile.mk deleted file mode 100644 index 5b073faa2c..0000000000 --- a/sw/source/filter/rtf/makefile.mk +++ /dev/null @@ -1,60 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=rtf - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -MAKING_LIBMSWORD=TRUE -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(mydebug)" != "" -CDEFS=$(CDEFS) -Dmydebug -.ENDIF - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES= \ - $(SLO)$/rtffld.obj \ - $(SLO)$/rtffly.obj \ - $(SLO)$/rtfnum.obj \ - $(SLO)$/rtftbl.obj \ - $(SLO)$/swparrtf.obj - - -SLOFILES = \ - $(EXCEPTIONSFILES) - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/filter/rtf/rtfnum.cxx b/sw/source/filter/rtf/rtfnum.cxx index 9b6921aa32..8ebc4fd418 100644 --- a/sw/source/filter/rtf/rtfnum.cxx +++ b/sw/source/filter/rtf/rtfnum.cxx @@ -1,4 +1,30 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General 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" @@ -35,9 +61,6 @@ #define RTF_NUMRULE_NAME "RTF_Num" -SV_IMPL_VARARR( SwListArr, SwListEntry ) - - void lcl_ExpandNumFmts( SwNumRule& rRule ) { // dann noch das NumFormat in alle Ebenen setzen @@ -310,7 +333,7 @@ void SwRTFParser::ReadListTable() if( 1 == nNumOpenBrakets ) { if( aEntry.nListId ) - aListArr.Insert( aEntry, aListArr.Count() ); + aListArr.push_back( aEntry ); aEntry.Clear(); } } @@ -474,7 +497,7 @@ void SwRTFParser::ReadListOverrideTable() if( aEntry.nListId && aEntry.nListNo ) { int nMatch=-1; - for( USHORT n = aListArr.Count(); n; ) + for( size_t n = aListArr.size(); n; ) { if( aListArr[ --n ].nListId == aEntry.nListId) { @@ -493,7 +516,7 @@ void SwRTFParser::ReadListOverrideTable() { aEntry.nListDocPos=aListArr[nMatch2].nListDocPos; aEntry.nListTemplateId=aListArr[nMatch2].nListTemplateId; - aListArr.Insert(aEntry, aListArr.Count()); + aListArr.push_back( aEntry ); } if(pOrigRule) aListArr[nMatch2].nListDocPos = aEntry.nListDocPos; @@ -537,7 +560,7 @@ void SwRTFParser::ReadListOverrideTable() // dann erzeugen wir mal schnell eine Kopie von der NumRule, // denn diese wird jetzt mal kurz veraendert. if( aEntry.nListId ) - for( USHORT n = 0; n < aListArr.Count(); ++n ) + for( size_t n = 0; n < aListArr.size(); ++n ) if( aListArr[ n ].nListId == aEntry.nListId ) { pRule = pDoc->GetNumRuleTbl()[ @@ -554,7 +577,7 @@ void SwRTFParser::ReadListOverrideTable() // <-- pRule->SetAutoRule( FALSE ); nNumLvl = (BYTE)-1; - aListArr.Insert( aEntry, aListArr.Count() ); + aListArr.push_back( aEntry ); break; } @@ -625,11 +648,11 @@ void SwRTFParser::ReadListOverrideTable() // now decrement all position in the listtable, which will // behind the doc-rule position - for( USHORT n = aListArr.Count(); n; ) + for( size_t n = aListArr.size(); n; ) { SwListEntry& rEntry = aListArr[ --n ]; if( rEntry.nListDocPos == nRulePos ) - aListArr.Remove( n ); + aListArr.erase( aListArr.begin()+n ); else if( rEntry.nListDocPos > nRulePos ) --rEntry.nListDocPos; } @@ -653,11 +676,11 @@ SwNumRule* SwRTFParser::GetNumRuleOfListNo( long nListNo, BOOL bRemoveFromList ) { SwNumRule* pRet = 0; SwListEntry* pEntry; - for( USHORT n = aListArr.Count(); n; ) + for( size_t n = aListArr.size(); n; ) if( ( pEntry = &aListArr[ --n ])->nListNo == nListNo ) { if( bRemoveFromList ) - aListArr.Remove( n ); + aListArr.erase( aListArr.begin()+n ); else { pEntry->bRuleUsed = TRUE; @@ -697,14 +720,14 @@ void SwRTFParser::RemoveUnusedNumRules() { SwListEntry* pEntry; SvPtrarr aDelArr; - USHORT n; - for( n = aListArr.Count(); n; ) + size_t n; + for( n = aListArr.size(); n; ) { if( !( pEntry = &aListArr[ --n ])->bRuleUsed ) { // really *NOT* used by anyone else? BOOL unused=TRUE; - for(USHORT j = 0; j < aListArr.Count(); ++j) + for(size_t j = 0; j < aListArr.size(); ++j) { if (aListArr[n].nListNo==aListArr[j].nListNo) unused&=!aListArr[j].bRuleUsed; @@ -801,7 +824,7 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken ) RTL_CONSTASCII_STRINGPARAM( RTF_NUMRULE_NAME " 1" ))); SwListEntry aEntry( nListNo, 0, pDoc->MakeNumRule( sTmp )); aEntry.nListNo = nListNo; - aListArr.Insert( aEntry, aListArr.Count() ); + aListArr.push_back( aEntry ); pCurRule = pDoc->GetNumRuleTbl()[ aEntry.nListDocPos ]; // --> OD 2008-07-08 #i91400# pCurRule->SetName( pDoc->GetUniqueNumRuleName( &sTmp, FALSE ), *pDoc ); diff --git a/sw/source/filter/rtf/rtftbl.cxx b/sw/source/filter/rtf/rtftbl.cxx index d21b52178c..472614e9f6 100644 --- a/sw/source/filter/rtf/rtftbl.cxx +++ b/sw/source/filter/rtf/rtftbl.cxx @@ -165,10 +165,7 @@ void SwRTFParser::ReadTable( int nToken ) enum Limits {eMAXCELLS=64000}; - SvBools aMergeBackup; - int nCount = aMergeBoxes.Count(); - for (USHORT i = 0; i < nCount; ++i) - aMergeBackup.Insert(aMergeBoxes[i], i); + SvBools aMergeBackup(aMergeBoxes); // kein TROWD aber ein TabellenToken -> zwischen TROWD und Tab.Token // waren andere Zeichen (siehe Bug 27445.rtf) @@ -177,10 +174,10 @@ void SwRTFParser::ReadTable( int nToken ) if( RTF_TROWD == nToken ) nToken = GetNextToken(); // RTF_TROWD ueberlesen - // Flags fuer die gemergten Boxen loeschen - aMergeBoxes.Remove( 0, aMergeBoxes.Count() ); - aMergeBoxes.Insert( (BOOL)FALSE, USHORT(0) ); - nAktBox = 0; + // Flag for delete merged boxes + aMergeBoxes.clear(); + aMergeBoxes.push_back( (BOOL)FALSE ); + m_nCurrentBox = 0; // wenn schon in einer Tabellen, dann splitte oder benutze // die bisherigen Boxen weiter @@ -194,11 +191,11 @@ void SwRTFParser::ReadTable( int nToken ) // very robust to avoid crashes like bug 127425 + crash reports 118743 if( pLine ) { - USHORT nTmpBox = nAktBox; + USHORT nTmpBox = m_nCurrentBox; if( nTmpBox > pLine->GetTabBoxes().Count() ) nTmpBox = pLine->GetTabBoxes().Count(); - for( USHORT n = nTmpBox; n; ) + for (USHORT n = nTmpBox; n; ) { const SwTableBox *pTmp = pLine->GetTabBoxes()[ --n ]; if( pTmp ) @@ -223,7 +220,7 @@ void SwRTFParser::ReadTable( int nToken ) sal_Int16 eVerOrient = text::VertOrientation::NONE; long nLineHeight = 0; - USHORT nBoxCnt = aMergeBoxes.Count()-1; + size_t nBoxCnt = aMergeBoxes.size()-1; SwBoxFrmFmts aBoxFmts; SwTableBoxFmt* pBoxFmt = pDoc->MakeTableBoxFmt(); SvxFrameDirection eDir = FRMDIR_HORI_LEFT_TOP; @@ -292,15 +289,16 @@ void SwRTFParser::ReadTable( int nToken ) // the first cell cannot be merged with earlier ones. if (nBoxCnt != 0) { - aMergeBoxes[ nBoxCnt ] = TRUE; + aMergeBoxes.back() = TRUE; } break; case RTF_CELLX: - if (!bTrowdRead) { + if (!bTrowdRead && (aMergeBoxes.size() < (SAL_MAX_UINT16 - 1))) + { SwTableBoxFmt* pFmt = pBoxFmt; SwTwips nSize = nTokenValue - nTblSz; - if( aMergeBoxes[ nBoxCnt ] ) + if( aMergeBoxes.back() ) { // neue Zellen lesen und noch keine Formate vorhanden, // dann benutze das der vorhergebende @@ -308,9 +306,12 @@ void SwRTFParser::ReadTable( int nToken ) { SwTableLines& rLns = pTableNode->GetTable().GetTabLines(); SwTableLine* pLine = rLns[ rLns.Count()-1 ]; - if(nAktBox!=0) - --nAktBox; - pFmt = (SwTableBoxFmt*)pLine->GetTabBoxes()[ nAktBox ]->GetFrmFmt(); + if (m_nCurrentBox != 0) + { + --m_nCurrentBox; + } + pFmt = static_cast<SwTableBoxFmt*>( + pLine->GetTabBoxes()[ m_nCurrentBox ]->GetFrmFmt()); } else pFmt = aBoxFmts[ aBoxFmts.Count()-1 ]; @@ -336,7 +337,8 @@ void SwRTFParser::ReadTable( int nToken ) nSize = COL_DFLT_WIDTH; pFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nSize, 0 )); nTblSz = nTokenValue; - aMergeBoxes.Insert( (BOOL)FALSE, ++nBoxCnt ); + aMergeBoxes.push_back( (BOOL)FALSE ); + ++nBoxCnt; SvxBoxItem aBox(pFmt->GetBox()); @@ -416,7 +418,7 @@ void SwRTFParser::ReadTable( int nToken ) default: if( ( nToken & ~(0xff | RTF_TABLEDEF)) == RTF_SHADINGDEF ) { - if( aMergeBoxes[ nBoxCnt ] ) + if( aMergeBoxes.back() ) break; ReadBackgroundAttr( nToken, (SfxItemSet&)pBoxFmt->GetAttrSet(), TRUE ); @@ -424,7 +426,7 @@ void SwRTFParser::ReadTable( int nToken ) else if( ( nToken & ~(0xff | RTF_TABLEDEF) ) == RTF_BRDRDEF || IsBorderToken(nToken)) { - if( aMergeBoxes[ nBoxCnt ] ) + if( aMergeBoxes.back() ) break; SfxItemSet& rSet = (SfxItemSet&)pBoxFmt->GetAttrSet(); @@ -445,7 +447,7 @@ void SwRTFParser::ReadTable( int nToken ) if( text::VertOrientation::NONE != eVerOrient ) { - if( !aMergeBoxes[ nBoxCnt ] ) + if( !aMergeBoxes.back() ) pBoxFmt->SetFmtAttr( SwFmtVertOrient( 0, eVerOrient )); eVerOrient = text::VertOrientation::NONE; } @@ -456,13 +458,11 @@ void SwRTFParser::ReadTable( int nToken ) // das letzte temp. BoxFmt loeschen delete pBoxFmt; - // es wurde keine einzige Box erkannt - if( nAktBox == nBoxCnt || ( bReadNewCell && !pTableNode )) + // It has been recognized as not single box + if ((m_nCurrentBox == nBoxCnt) || ( bReadNewCell && !pTableNode )) { - int nC = aMergeBackup.Count(); - for (USHORT i = 0; i < nC; ++i) - aMergeBoxes.Insert(aMergeBackup[i], i); - SkipToken( -1 ); // zum Letzen gueltigen zurueck + aMergeBoxes = aMergeBackup; + SkipToken( -1 ); // go back to the last valid return; } @@ -569,7 +569,9 @@ void SwRTFParser::ReadTable( int nToken ) aBoxFmts.Remove( 0, n ); if( aBoxFmts.Count() ) // es muessen noch neue zugefuegt werden - nAktBox = n; + { + m_nCurrentBox = n; + } else // es mussen noch Boxen geloescht werden { // remove ContentIndex of other Bound @@ -679,7 +681,7 @@ void SwRTFParser::ReadTable( int nToken ) ((SfxItemSet&)pFmt->GetAttrSet()).Put( aL ); } - nAktBox = 0; + m_nCurrentBox = 0; pOldTblNd = pTableNode; { @@ -731,12 +733,14 @@ void SwRTFParser::ReadTable( int nToken ) aBoxFmts[ nStt ], // Formate fuer den TextNode der Box pColl, 0, - nAktBox + nStt, 1 ); + m_nCurrentBox + nStt, 1 ); } } if( bChkExistTbl ) - nAktBox = 0; + { + m_nCurrentBox = 0; + } maInsertedTables.InsertTable(*pTableNode, *pPam); @@ -748,7 +752,8 @@ void SwRTFParser::ReadTable( int nToken ) if (pNewLine) { SwTableBoxes &rBoxes = pNewLine->GetTabBoxes(); - if (SwTableBox* pBox = (nAktBox < rBoxes.Count() ? rBoxes[nAktBox] : 0)) + if (SwTableBox* pBox = ((m_nCurrentBox < rBoxes.Count()) + ? rBoxes[m_nCurrentBox] : 0)) { if (const SwStartNode *pStart = pBox->GetSttNd()) { @@ -794,7 +799,7 @@ void SwRTFParser::ReadTable( int nToken ) //which were intended to be inside the tablerow are now left outside //the table after the row was placed before the current insertion point SvxRTFItemStack& rAttrStk = GetAttrStack(); - for (USHORT n = 0; n < rAttrStk.Count(); ++n) + for (size_t n = 0; n < rAttrStk.size(); ++n) { SvxRTFItemStackType* pStk = rAttrStk[n]; pStk->MoveFullNode(aOldPos, aNewPos); @@ -818,16 +823,19 @@ void SwRTFParser::GotoNextBox() SwTableBoxes& rBoxes = pLine->GetTabBoxes(); SwTableBox* pBox = rBoxes[ rBoxes.Count()-1 ]; - if( ++nAktBox >= aMergeBoxes.Count() ) - nAktBox = aMergeBoxes.Count()-1; + if (++m_nCurrentBox >= aMergeBoxes.size()) + { + OSL_ENSURE(aMergeBoxes.size() < SAL_MAX_UINT16, "too many boxes?"); + m_nCurrentBox = static_cast<USHORT>(aMergeBoxes.size()-1); + } - if( !aMergeBoxes[ nAktBox ] ) + if (!aMergeBoxes[ m_nCurrentBox ]) { int bMove = TRUE; if( pBox->GetSttIdx() > pPam->GetPoint()->nNode.GetIndex() ) { USHORT nRealBox = 0; - for( USHORT nTmp = 0; nTmp < nAktBox; ++nTmp ) + for (USHORT nTmp = 0; nTmp < m_nCurrentBox; ++nTmp) if( !aMergeBoxes[ nTmp ] ) ++nRealBox; @@ -839,7 +847,8 @@ void SwRTFParser::GotoNextBox() } } - if( bMove && nAktBox + 1 == aMergeBoxes.Count() ) + if (bMove && + (static_cast<size_t>(m_nCurrentBox + 1) == aMergeBoxes.size())) // dann hinter die Tabelle pPam->Move( fnMoveForward, fnGoNode ); } @@ -904,7 +913,7 @@ void SwRTFParser::NewTblLine() ULONG nOldPos = pPam->GetPoint()->nNode.GetIndex(); pPam->GetPoint()->nNode = *pBox->GetSttNd(); pPam->Move( fnMoveForward ); - nAktBox = 0; + m_nCurrentBox = 0; // alle Nodes in den Boxen auf die "default" Vorlage setzten { @@ -934,11 +943,10 @@ void SwRTFParser::NewTblLine() pPam->DeleteMark(); } - // alle Attribute, die schon auf den nachfolgen zeigen auf die neue - // Box umsetzen !! + // all attributes which will be displayed in new Box SvxRTFItemStack& rAttrStk = GetAttrStack(); const SvxRTFItemStackType* pStk; - for( USHORT n = 0; n < rAttrStk.Count(); ++n ) + for( size_t n = 0; n < rAttrStk.size(); ++n ) if( ( pStk = rAttrStk[ n ])->GetSttNodeIdx() == ULONG(nOldPos) && !pStk->GetSttCnt() ) ((SvxRTFItemStackType*)pStk)->SetStartPos( SwxPosition( pPam ) ); diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index c24524d78b..74e287c2e3 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -193,7 +193,6 @@ SwRTFParser::SwRTFParser(SwDoc* pD, maCharStyleMapper(*pD), maSegments(*this), maInsertedTables(*pD), - aMergeBoxes(0, 5), aTblFmts(0, 10), mpBookmarkStart(0), mpRedlineStack(0), @@ -210,7 +209,7 @@ SwRTFParser::SwRTFParser(SwDoc* pD, sBaseURL( rBaseURL ), nAktPageDesc(0), nAktFirstPageDesc(0), - nAktBox(0), + m_nCurrentBox(0), nInsTblRow(USHRT_MAX), nNewNumSectDef(USHRT_MAX), nRowsToRepeat(0), @@ -1608,14 +1607,29 @@ void SwRTFParser::NextToken( int nToken ) switch( nToken ) { case RTF_FOOTNOTE: + { //We can only insert a footnote if we're not inside a footnote. e.g. //#i7713# - if (!mbIsFootnote) + + // in insert mode it's also possible to be inside of a footnote! + bool bInsertIntoFootnote = false; + if( !IsNewDoc() ) + { + SwStartNode* pSttNode = pPam->GetNode()->StartOfSectionNode(); + while(pSttNode && pSttNode->IsSectionNode()) + { + pSttNode = pSttNode->StartOfSectionNode(); + } + if( SwFootnoteStartNode == pSttNode->GetStartNodeType() ) + bInsertIntoFootnote = true; + } + if (!mbIsFootnote && !bInsertIntoFootnote) { ReadHeaderFooter( nToken ); SkipToken( -1 ); // Klammer wieder zurueck } - break; + } + break; case RTF_SWG_PRTDATA: ReadPrtData(); break; @@ -1761,7 +1775,7 @@ void SwRTFParser::NextToken( int nToken ) if (!CantUseTables()) { // aus der Line raus - nAktBox = 0; + m_nCurrentBox = 0; pTableNode = 0; // noch in der Tabelle drin? SwNodeIndex& rIdx = pPam->GetPoint()->nNode; @@ -3529,14 +3543,13 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc ) { OSL_ENSURE( RTF_FOOTNOTE == nToken || RTF_FLY_INPARA == nToken || - pPageDesc, "PageDesc fehlt" ); + pPageDesc, "PageDesc is missing" ); bool bContainsParaCache = bContainsPara; - // alle wichtigen Sachen sichern + // backup all important data SwPosition aSavePos( *pPam->GetPoint() ); - SvxRTFItemStack aSaveStack; - aSaveStack.Insert( &GetAttrStack(), 0 ); - GetAttrStack().Remove( 0, GetAttrStack().Count() ); + SvxRTFItemStack aSaveStack(GetAttrStack()); + GetAttrStack().clear(); // save the fly array - after read, all flys may be set into // the header/footer @@ -3586,7 +3599,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc ) // wurde an der Position ein Escapement aufgespannt, so entferne // das jetzt. Fussnoten sind bei uns immer hochgestellt. - SvxRTFItemStackTypePtr pTmp = aSaveStack.Top(); + SvxRTFItemStackTypePtr pTmp = aSaveStack.empty() ? 0 : aSaveStack.back(); if( pTmp && pTmp->GetSttNodeIdx() == pPam->GetPoint()->nNode.GetIndex() && pTmp->GetSttCnt() == nPos ) @@ -3745,8 +3758,8 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc ) else SetNewGroup( FALSE ); // { - Klammer war kein Group-Start! mbIsFootnote = bOldIsFootnote; - GetAttrStack().Insert( &aSaveStack, 0 ); - + GetAttrStack() = aSaveStack; + aFlyArr.Insert( &aSaveArray, 0 ); aSaveArray.Remove( 0, aSaveArray.Count() ); bContainsPara = bContainsParaCache; @@ -4078,12 +4091,12 @@ void SwRTFParser::DelLastNode() if( pCNd && pCNd->StartOfSectionIndex()+2 < pCNd->EndOfSectionIndex() ) { - if( GetAttrStack().Count() ) + if( !GetAttrStack().empty() ) { // Attribut Stack-Eintraege, muessen ans Ende des vorherigen // Nodes verschoben werden. BOOL bMove = FALSE; - for( USHORT n = GetAttrStack().Count(); n; ) + for( size_t n = GetAttrStack().size(); n; ) { SvxRTFItemStackType* pStkEntry = (SvxRTFItemStackType*) GetAttrStack()[ --n ]; @@ -4135,7 +4148,7 @@ void SwRTFParser::UnknownAttrToken( int nToken, SfxItemSet* pSet ) // auf die neue Box umsetzen !! SvxRTFItemStack& rAttrStk = GetAttrStack(); const SvxRTFItemStackType* pStk; - for( USHORT n = 0; n < rAttrStk.Count(); ++n ) + for( size_t n = 0; n < rAttrStk.size(); ++n ) if( ( pStk = rAttrStk[ n ])->GetSttNodeIdx() == nOldPos && !pStk->GetSttCnt() ) ((SvxRTFItemStackType*)pStk)->SetStartPos( SwxPosition( pPam ) ); diff --git a/sw/source/filter/rtf/swparrtf.hxx b/sw/source/filter/rtf/swparrtf.hxx index a6947b107b..4302ef93a1 100644 --- a/sw/source/filter/rtf/swparrtf.hxx +++ b/sw/source/filter/rtf/swparrtf.hxx @@ -29,7 +29,6 @@ #ifndef _SWPARRTF_HXX #define _SWPARRTF_HXX -#include <map> #include <deque> #include <vector> @@ -41,7 +40,6 @@ #include <editeng/numitem.hxx> #include <editeng/boxitem.hxx> #include <redline.hxx> -#include <algorithm> #include <fltshell.hxx> // fuer den Attribut Stack #include <ndindex.hxx> #include "../inc/msfilter.hxx" @@ -154,7 +152,7 @@ DECLARE_TABLE( SwRTFStyleTbl, SwTxtFmtColl* ) DECLARE_TABLE( SwRTFCharStyleTbl, SwCharFmt* ) typedef SwFlySave* SwFlySavePtr; SV_DECL_PTRARR_DEL( SwFlySaveArr, SwFlySavePtr, 0, 20 ) -SV_DECL_VARARR( SwListArr, SwListEntry, 0, 20 ) +typedef std::deque< SwListEntry > SwListArr; struct DocPageInformation { @@ -317,7 +315,7 @@ class SwRTFParser : public SvxRTFParser String sBaseURL; USHORT nAktPageDesc, nAktFirstPageDesc; - USHORT nAktBox; // akt. Box + USHORT m_nCurrentBox; USHORT nInsTblRow; // beim nach \row kein \pard -> neue Line anlegen USHORT nNewNumSectDef; // jeder SectionWechsel kann neue Rules definieren USHORT nRowsToRepeat; diff --git a/sw/source/filter/writer/makefile.mk b/sw/source/filter/writer/makefile.mk deleted file mode 100644 index 1c11b8498b..0000000000 --- a/sw/source/filter/writer/makefile.mk +++ /dev/null @@ -1,58 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=writer - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -CXXFILES = \ - writer.cxx \ - wrt_fn.cxx \ - wrtswtbl.cxx - -SLOFILES = \ - $(EXCEPTIONSFILES) - -EXCEPTIONSFILES = \ - $(SLO)$/writer.obj \ - $(SLO)$/wrt_fn.obj \ - $(SLO)$/wrtswtbl.obj - - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index ad55d1fb7f..67041ce946 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -483,9 +483,9 @@ void Writer::_AddFontItems( SfxItemPool& rPool, USHORT nW ) if( 0 != ( pFont = (const SvxFontItem*)rPool.GetPoolDefaultItem( nW )) ) _AddFontItem( rPool, *pFont ); - USHORT nMaxItem = rPool.GetItemCount( nW ); - for( USHORT nGet = 0; nGet < nMaxItem; ++nGet ) - if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem( nW, nGet )) ) + sal_uInt32 nMaxItem = rPool.GetItemCount2( nW ); + for( sal_uInt32 nGet = 0; nGet < nMaxItem; ++nGet ) + if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem2( nW, nGet )) ) _AddFontItem( rPool, *pFont ); } diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx index d3558139ce..041a36540a 100644 --- a/sw/source/filter/writer/wrtswtbl.cxx +++ b/sw/source/filter/writer/wrtswtbl.cxx @@ -93,7 +93,7 @@ SwWriteTableCell *SwWriteTableRow::AddCell( const SwTableBox *pBox, //----------------------------------------------------------------------- -SwWriteTableCol::SwWriteTableCol(USHORT nPosition) +SwWriteTableCol::SwWriteTableCol(sal_uInt32 nPosition) : nPos(nPosition), nWidthOpt(0), bRelWidthOpt(false), bOutWidth(true), bLeftBorder(true), bRightBorder(true) { @@ -101,13 +101,13 @@ SwWriteTableCol::SwWriteTableCol(USHORT nPosition) //----------------------------------------------------------------------- -long SwWriteTable::GetBoxWidth( const SwTableBox *pBox ) +sal_uInt32 SwWriteTable::GetBoxWidth( const SwTableBox *pBox ) { const SwFrmFmt *pFmt = pBox->GetFrmFmt(); const SwFmtFrmSize& aFrmSize= (const SwFmtFrmSize&)pFmt->GetFmtAttr( RES_FRM_SIZE ); - return aFrmSize.GetSize().Width(); + return sal::static_int_cast<sal_uInt32>(aFrmSize.GetSize().Width()); } long SwWriteTable::GetLineHeight( const SwTableLine *pLine ) @@ -307,9 +307,9 @@ USHORT SwWriteTable::MergeBoxBorders( const SwTableBox *pBox, } -USHORT SwWriteTable::GetRawWidth( USHORT nCol, USHORT nColSpan ) const +sal_uInt32 SwWriteTable::GetRawWidth( USHORT nCol, USHORT nColSpan ) const { - USHORT nWidth = aCols[nCol+nColSpan-1]->GetPos(); + sal_uInt32 nWidth = aCols[nCol+nColSpan-1]->GetPos(); if( nCol > 0 ) nWidth = nWidth - aCols[nCol-1]->GetPos(); @@ -353,7 +353,7 @@ USHORT SwWriteTable::GetRightSpace( USHORT nCol, USHORT nColSpan ) const USHORT SwWriteTable::GetAbsWidth( USHORT nCol, USHORT nColSpan ) const { - long nWidth = GetRawWidth( nCol, nColSpan ); + sal_uInt32 nWidth = GetRawWidth( nCol, nColSpan ); if( nBaseWidth != nTabWidth ) { nWidth *= nTabWidth; @@ -420,9 +420,9 @@ BOOL SwWriteTable::ShouldExpandSub(const SwTableBox *pBox, BOOL /*bExpandedBefor } void SwWriteTable::CollectTableRowsCols( long nStartRPos, - USHORT nStartCPos, + sal_uInt32 nStartCPos, long nParentLineHeight, - USHORT nParentLineWidth, + sal_uInt32 nParentLineWidth, const SwTableLines& rLines, USHORT nDepth ) { @@ -430,7 +430,7 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos, USHORT nLines = rLines.Count(); #if OSL_DEBUG_LEVEL > 1 - USHORT nEndCPos = 0; + sal_uInt32 nEndCPos = 0; #endif long nRPos = nStartRPos; @@ -485,16 +485,16 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos, const SwTableBoxes& rBoxes = pLine->GetTabBoxes(); USHORT nBoxes = rBoxes.Count(); - USHORT nCPos = nStartCPos; + sal_uInt32 nCPos = nStartCPos; for( USHORT nBox=0; nBox<nBoxes; nBox++ ) { const SwTableBox *pBox = rBoxes[nBox]; - USHORT nOldCPos = nCPos; + sal_uInt32 nOldCPos = nCPos; if( nBox < nBoxes-1 || (nParentLineWidth==0 && nLine==0) ) { - nCPos = nCPos + (USHORT)GetBoxWidth( pBox ); + nCPos = nCPos + GetBoxWidth( pBox ); SwWriteTableCol *pCol = new SwWriteTableCol( nCPos ); USHORT nCol; @@ -513,7 +513,7 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos, else { #if OSL_DEBUG_LEVEL > 1 - USHORT nCheckPos = nCPos + (USHORT)GetBoxWidth( pBox ); + sal_uInt32 nCheckPos = nCPos + GetBoxWidth( pBox ); if( !nEndCPos ) { nEndCPos = nCheckPos; @@ -551,9 +551,9 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos, void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow, - USHORT nStartCPos, USHORT nStartCol, + sal_uInt32 nStartCPos, USHORT nStartCol, long nParentLineHeight, - USHORT nParentLineWidth, + sal_uInt32 nParentLineWidth, const SwTableLines& rLines, const SvxBrushItem* pParentBrush, USHORT nDepth, @@ -657,7 +657,7 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow, } USHORT nBoxes = rBoxes.Count(); - USHORT nCPos = nStartCPos; + sal_uInt32 nCPos = nStartCPos; USHORT nCol = nStartCol; for( USHORT nBox=0; nBox<nBoxes; nBox++ ) @@ -665,10 +665,10 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow, const SwTableBox *pBox = rBoxes[nBox]; // Position der letzten ueberdeckten Spalte ermitteln - USHORT nOldCPos = nCPos; + sal_uInt32 nOldCPos = nCPos; if( nBox < nBoxes-1 || (nParentLineWidth==0 && nLine==0) ) { - nCPos = nCPos + (USHORT)GetBoxWidth( pBox ); + nCPos = nCPos + GetBoxWidth( pBox ); if( nBox==nBoxes-1 ) nParentLineWidth = nCPos - nStartCPos; } @@ -762,7 +762,7 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow, } SwWriteTable::SwWriteTable(const SwTableLines& rLines, long nWidth, - USHORT nBWidth, BOOL bRel, USHORT nMaxDepth, USHORT nLSub, USHORT nRSub, sal_uInt32 nNumOfRowsToRepeat) + sal_uInt32 nBWidth, BOOL bRel, USHORT nMaxDepth, USHORT nLSub, USHORT nRSub, sal_uInt32 nNumOfRowsToRepeat) : nBorderColor((UINT32)-1), nCellSpacing(0), nCellPadding(0), nBorder(0), nInnerBorder(0), nBaseWidth(nBWidth), nHeadEndRow(USHRT_MAX), nLeftSub(nLSub), nRightSub(nRSub), nTabWidth(nWidth), bRelWidths(bRel), @@ -773,7 +773,7 @@ SwWriteTable::SwWriteTable(const SwTableLines& rLines, long nWidth, bColsOption(false), bColTags(true), bLayoutExport(false), bCollectBorderWidth(true) { - USHORT nParentWidth = nBaseWidth + nLeftSub + nRightSub; + sal_uInt32 nParentWidth = nBaseWidth + nLeftSub + nRightSub; // Erstmal die Tabellen-Struktur festlegen. Hinter der Tabelle ist in // jedem Fall eine Spalte zu Ende diff --git a/sw/source/filter/ww1/makefile.mk b/sw/source/filter/ww1/makefile.mk deleted file mode 100644 index 58930bdca9..0000000000 --- a/sw/source/filter/ww1/makefile.mk +++ /dev/null @@ -1,93 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=ww1 - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(mydebug)" != "" -CDEFS=$(CDEFS) -Dmydebug -.ENDIF - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES= \ - $(SLO)$/fltshell.obj \ - $(SLO)$/w1filter.obj \ - $(SLO)$/w1par.obj \ - $(SLO)$/w1sprm.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - $(SLO)$/w1class.obj - - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -run: alltar - -#copy all relevant files to a backupdir -bak: - copy ..\inc\fltshell.hxx backup - copy *.?xx backup - copy makefile* backup - copy vcs.cfg backup - copy ..\..\..\dump1\src\dump1.cxx backup - copy ..\..\..\dump1\src\makefile backup\makefile.dmp - copy ..\..\..\WNTMSCI\bin\makefile backup\makefile.bin - copy ..\..\..\UTIL\makefile backup\makefile.utl - copy s:\solenv\inc\wnt.mak backup - -# remove this filter from libs to avoid annoying effects -upgrade: - attrib -r *.?xx - attrib -r makefile.* - del ..\..\..\WNMSCI\LIB\ww1.lib - del ..\..\..\WNMSCI\DBO\w1*.obj - del ..\..\..\WNMSCI\DBO\fltshell.obj - del ..\..\..\WNMSCI\MISC - lib /nologo /REMOVE:..\..\..\WNTMSCI\obj\fltshell.obj /out:..\..\..\WNTMSCI\LIB\filter.lib ..\..\..\WNTMSCI\LIB\filter.lib - lib /nologo /REMOVE:..\..\..\WNTMSCI\obj\w1sprm.obj /out:..\..\..\WNTMSCI\LIB\filter.lib ..\..\..\WNTMSCI\LIB\filter.lib - lib /nologo /REMOVE:..\..\..\WNTMSCI\obj\w1filter.obj /out:..\..\..\WNTMSCI\LIB\filter.lib ..\..\..\WNTMSCI\LIB\filter.lib - lib /nologo /REMOVE:..\..\..\WNTMSCI\obj\w1class.obj /out:..\..\..\WNTMSCI\LIB\filter.lib ..\..\..\WNTMSCI\LIB\filter.lib - lib /nologo /REMOVE:..\..\..\WNTMSCI\obj\w1par.obj /out:..\..\..\WNTMSCI\LIB\filter.lib ..\..\..\WNTMSCI\LIB\filter.lib - copy backup\makefile.bin ..\..\..\WNTMSCI\bin\makefile - diff backup\makefile.utl ..\..\..\UTIL\makefile - diff s:\solenv\inc\wnt.mak backup - -zip: bak - pkzip c:\temp\ww1 backup\*.* - diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx index a681eb1e6a..3a27b05d85 100644 --- a/sw/source/filter/ww1/w1filter.cxx +++ b/sw/source/filter/ww1/w1filter.cxx @@ -36,12 +36,15 @@ #include <svtools/filter.hxx> #include <vcl/graph.hxx> #include <editeng/fontitem.hxx> +#include <editeng/fontitem.hxx> #include <editeng/lrspitem.hxx> #include <editeng/ulspitem.hxx> #include <editeng/wghtitem.hxx> #include <editeng/postitem.hxx> #include <editeng/crsditem.hxx> +#include <editeng/cmapitem.hxx> #include <editeng/cntritem.hxx> +#include <editeng/udlnitem.hxx> #include <editeng/cmapitem.hxx> #include <editeng/fhgtitem.hxx> #include <editeng/udlnitem.hxx> diff --git a/sw/source/filter/ww8/README-rtf.txt b/sw/source/filter/ww8/README-rtf.txt index 661813abc9..6acddaa61e 100644 --- a/sw/source/filter/ww8/README-rtf.txt +++ b/sw/source/filter/ww8/README-rtf.txt @@ -35,7 +35,7 @@ Table of Contents --------------------------------------------------------------------- -1. Introduction +1.�Introduction --------------------------------------------------------------------- @@ -45,7 +45,7 @@ this way much less code can achieve the same set of features, reducing the amount of duplicated code. -1.1. Terminology +1.1.�Terminology -------------- @@ -56,7 +56,7 @@ reducing the amount of duplicated code. to the old built-in one. -1.2. General +1.2.�General -------------- @@ -72,7 +72,7 @@ the bug will pop up less frequently. --------------------------------------------------------------------- -2. List if fixed bugs +2.�List if fixed bugs --------------------------------------------------------------------- @@ -101,12 +101,12 @@ the bug will pop up less frequently. --------------------------------------------------------------------- -3. List of new features +3.�List of new features --------------------------------------------------------------------- -3.1. Nested tables +3.1.�Nested tables -------------- @@ -114,7 +114,7 @@ This was new in Word2000 and it?s now supported by RtfExport (MSO OK, OOo KO) -3.2. Character properties +3.2.�Character properties -------------- @@ -125,7 +125,7 @@ The followings are now supported: * pair kerning (MSO OK, OOo OK) -3.3. Sections +3.3.�Sections -------------- @@ -141,7 +141,7 @@ RtfExport writes: * line numbering (MSO OK, OOo KO) -3.4. Graphics +3.4.�Graphics -------------- @@ -150,7 +150,7 @@ and OOo can display graphics from the output document, but Wordpad as well. -3.5. Bookmarks +3.5.�Bookmarks -------------- @@ -160,7 +160,7 @@ the result), this now works as expected. (MSO OK - the importer previously autocorrected this as well, OO OK) -3.6. Fields +3.6.�Fields -------------- @@ -169,7 +169,7 @@ previously autocorrected this as well, OO OK) * Postit comments are now exported. (MSO OK, OOo KO) -3.7. Drawing +3.7.�Drawing -------------- @@ -184,7 +184,7 @@ implemented: (MSO OK, OOo KO) -3.8. Form fields +3.8.�Form fields -------------- @@ -197,7 +197,7 @@ All types supported by the RTF format are exported, namely: (MSO OK, OOo KO) -3.9. OLE objects +3.9.�OLE objects -------------- @@ -210,7 +210,7 @@ object, too. (MSO OK, OOo KO) --------------------------------------------------------------------- -4. Changes in the source code outside RTF +4.�Changes in the source code outside RTF --------------------------------------------------------------------- @@ -224,3 +224,4 @@ not change the output of other filters from a user?s point of view. * wwFontHelper::InitFontTable can really load all fonts * An obvious typo in WW8AttributeOutput::CharTwoLines has been fixed + diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx index b7be4bc2b3..9ff2839cc6 100644 --- a/sw/source/filter/ww8/WW8TableInfo.cxx +++ b/sw/source/filter/ww8/WW8TableInfo.cxx @@ -1435,6 +1435,549 @@ RowSpansPtr WW8TableCellGrid::getRowSpansOfRow 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(); + } +} + WW8TableCellGridRow::WW8TableCellGridRow() : m_pCellInfos(new CellInfoMultiSet) { diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx index 45a157472d..ddaf1b02a9 100644 --- a/sw/source/filter/ww8/attributeoutputbase.hxx +++ b/sw/source/filter/ww8/attributeoutputbase.hxx @@ -575,9 +575,9 @@ public: void OutputFlyFrame( const sw::Frame& rFmt ); void GetTablePageSize - ( ww8::WW8TableNodeInfoInner * pTableTextNodeInfoInner, + ( 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 9079877cf4..51c59b1546 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -2,7 +2,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,7 +41,7 @@ #include "charfmt.hxx" #include "breakit.hxx" -#include <oox/core/tokens.hxx> +#include <oox/token/tokens.hxx> #include <oox/export/drawingml.hxx> #include <oox/export/utils.hxx> #include <oox/export/vmlexport.hxx> @@ -144,6 +144,7 @@ using rtl::OUString; using rtl::OUStringBuffer; using rtl::OUStringToOString; +using namespace oox; using namespace docx; using namespace sax_fastparser; using namespace nsSwDocInfoSubType; @@ -3742,6 +3743,7 @@ void DocxAttributeOutput::FormatHorizOrientation( const SwFmtHoriOrient& rFlyHor void DocxAttributeOutput::FormatAnchor( const SwFmtAnchor& ) { // Fly frames: anchors here aren't matching the anchors in docx + OSL_TRACE( "TODO DocxAttributeOutput::FormatAnchor()\n" ); } void DocxAttributeOutput::FormatBackground( const SvxBrushItem& rBrush ) @@ -3754,6 +3756,7 @@ void DocxAttributeOutput::FormatBackground( const SvxBrushItem& rBrush ) FSNS( XML_w, XML_val ), "clear", FSEND ); } + OSL_TRACE( "TODO DocxAttributeOutput::FormatBackground()\n" ); } void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox ) diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index c8bd1c83b7..0c236c1fea 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -34,7 +34,7 @@ #include <com/sun/star/i18n/ScriptType.hdl> #include <com/sun/star/frame/XModel.hpp> -#include <oox/core/tokens.hxx> +#include <oox/token/tokens.hxx> #include <oox/export/drawingml.hxx> #include <oox/export/vmlexport.hxx> #include <oox/export/chartexport.hxx> @@ -66,6 +66,7 @@ using namespace sax_fastparser; using namespace ::comphelper; using namespace ::com::sun::star; +using namespace ::oox; using oox::vml::VMLExport; @@ -231,7 +232,7 @@ void DocxExport::WriteFormData( const ::sw::mark::IFieldmark& /*rFieldmark*/ ) void DocxExport::WriteHyperlinkData( const ::sw::mark::IFieldmark& /*rFieldmark*/ ) { #if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO DocxExport::WriteHyperlinkData()\n" ); + OSL_TRACE( "TODO DocxExport::WriteHyperlinkData()\n" ); #endif } diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx index ed3d29a08c..ed1f20f088 100644 --- a/sw/source/filter/ww8/docxexportfilter.cxx +++ b/sw/source/filter/ww8/docxexportfilter.cxx @@ -130,58 +130,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceManager */, void* pRegistryKey ) -{ - sal_Bool bRet = sal_False; - - if( pRegistryKey ) - { - try - { - uno::Reference< registry::XRegistryKey > xNewKey1( - static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( - OUString(RTL_CONSTASCII_USTRINGPARAM(IMPL_NAME "/UNO/SERVICES/" ))) ); - xNewKey1->createKey( DocxExport_getSupportedServiceNames().getConstArray()[0] ); - - bRet = sal_True; - } - catch( registry::InvalidRegistryException& ) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException (docx)!" ); - } - - try - { - uno::Reference< registry::XRegistryKey > xNewKey1( - static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( - OUString(RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME_RTFEXPORT "/UNO/SERVICES/" )) ) ); - xNewKey1->createKey( RtfExport_getSupportedServiceNames().getConstArray()[0] ); - - bRet = sal_True; - } - catch( registry::InvalidRegistryException& ) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException (rtfexport)!" ); - } - - try - { - uno::Reference< registry::XRegistryKey > xNewKey1( - static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( - OUString(RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME_RTFIMPORT "/UNO/SERVICES/" )) ) ); - xNewKey1->createKey( RtfExport_getSupportedServiceNames().getConstArray()[0] ); - - bRet = sal_True; - } - catch( registry::InvalidRegistryException& ) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException (rtfimport)!" ); - } - } - - return bRet; -} - // ------------------------ // - component_getFactory - // ------------------------ diff --git a/sw/source/filter/ww8/docxfootnotes.hxx b/sw/source/filter/ww8/docxfootnotes.hxx index ed9f160c94..b98e0112ff 100644 --- a/sw/source/filter/ww8/docxfootnotes.hxx +++ b/sw/source/filter/ww8/docxfootnotes.hxx @@ -31,7 +31,6 @@ #include <fmtftn.hxx> -#include <oox/core/tokens.hxx> #include <rtl/string.hxx> #include <rtl/ustring.hxx> #include <sax/fshelper.hxx> diff --git a/sw/source/filter/ww8/dump/msvbasic.cxx b/sw/source/filter/ww8/dump/msvbasic.cxx new file mode 100644 index 0000000000..899c497644 --- /dev/null +++ b/sw/source/filter/ww8/dump/msvbasic.cxx @@ -0,0 +1,536 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General 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 <string.h> // memset(), ... +#ifndef UNX +#include <io.h> // access() +#endif +#include <msvbasic.hxx> + +/* class VBA_Impl: + * The VBA class provides a set of methods to handle Visual Basic For + * Applications streams, the constructor is given the root ole2 stream + * of the document, Open reads the VBA project file and figures out + * the number of VBA streams, and the offset of the data within them. + * Decompress decompresses a particular numbered stream, NoStreams returns + * this number, and StreamName can give you the streams name. Decompress + * will call Output when it has a 4096 byte collection of data to output, + * and also with the final remainder of data if there is still some left + * at the end of compression. Output is virtual to allow custom handling + * of each chunk of decompressed data. So inherit from this to do something + * useful with the data. + * + * cmc + * */ + +BYTE VBA_Impl::ReadPString(SvStorageStreamRef &xVBAProject) +{ + UINT16 idlen; + BYTE type=0; + *xVBAProject >> idlen; + BYTE out; + int i=0; + if (idlen < 6) + { + type=0; + xVBAProject->SeekRel(-2); + return(type); + } + + for(i=0;i<idlen/2;i++) + { + *xVBAProject >> out; + xVBAProject->SeekRel(1); + if (i==2) + { + type=out; + if ((type != 'G') && (type != 'C')) + type=0; + if (type == 0) + { + xVBAProject->SeekRel(-8); + break; + } + } + } + + + return(type); +} + +void VBA_Impl::ConfirmFixedOctect(SvStorageStreamRef &xVBAProject) +{ + static const BYTE stest[8] = + { + 0x06, 0x02, 0x01, 0x00, 0x08, 0x02, 0x00, 0x00 + }; + + BYTE test[8]; + xVBAProject->Read(test,8); + if (memcmp(stest,test,8) != 0) + DBG_WARNING("Found a different octect, please report"); +} + +void VBA_Impl::Confirm12Zeros(SvStorageStreamRef &xVBAProject) +{ + static const BYTE stest[12]={0}; + BYTE test[12]; + xVBAProject->Read(test,12); + if (memcmp(stest,test,12) != 0) + DBG_WARNING("Found a Non Zero block, please report"); +} + +void VBA_Impl::ConfirmHalfWayMarker(SvStorageStreamRef &xVBAProject) +{ + static const BYTE stest[12]={0,0,0,0,0,0,0,0,0,0,1,0}; + BYTE test[12]; + xVBAProject->Read(test,12); + if (memcmp(stest,test,12) != 0) + DBG_WARNING("Found a different halfway marker, please report"); +} + +void VBA_Impl::ConfirmFixedMiddle(SvStorageStreamRef &xVBAProject) +{ + static const BYTE stest[20] = + { + 0x00, 0x00, 0xe1, 0x2e, 0x45, 0x0d, 0x8f, 0xe0, + 0x1a, 0x10, 0x85, 0x2e, 0x02, 0x60, 0x8c, 0x4d, + 0x0b, 0xb4, 0x00, 0x00 + }; + + BYTE test[20]; + xVBAProject->Read(test,20); + if (memcmp(stest,test,20) != 0) + { + DBG_WARNING("Found a different middle marker, please report"); + xVBAProject->SeekRel(-20); + } +} + +void VBA_Impl::ConfirmFixedMiddle2(SvStorageStreamRef &xVBAProject) +{ + static const BYTE stest[20] = + { + 0x00, 0x00, 0x2e, 0xc9, 0x27, 0x8e, 0x64, 0x12, + 0x1c, 0x10, 0x8a, 0x2f, 0x04, 0x02, 0x24, 0x00, + 0x9c, 0x02, 0x00, 0x00 + }; + + BYTE test[20]; + xVBAProject->Read(test,20); + if (memcmp(stest,test,20) != 0) + { + DBG_WARNING("Found a different middle2 marker, please report"); + xVBAProject->SeekRel(-20); + } +} + + +void VBA_Impl::Output( int nLen, const BYTE *pData) +{ + sVBAString += String( (const sal_Char *)pData, nLen ); +/* +//For debugging purposes + for(int i=0;i<len;i++) + *pOut << data[i]; +*/ +} + + +int VBA_Impl::ReadVBAProject(const SvStorageRef &rxVBAStorage) + { + SvStorageStreamRef xVBAProject; + xVBAProject = rxVBAStorage->OpenStream( + String::CreateFromAscii( "_VBA_PROJECT" ), + STREAM_STD_READ | STREAM_NOCREATE ); + + if( !xVBAProject.Is() || SVSTREAM_OK != xVBAProject->GetError() ) + { + DBG_WARNING("Not able to find vba project, cannot find macros"); + return(0); + } + xVBAProject->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); + + //*pOut << hex; + BYTE header[30] = + { + 0xcc, 0x61, 0x5e, 0x00, 0x00, 0x01, 0x00, 0xff, + 0x07, 0x04, 0x00, 0x00, 0x09, 0x04, 0x00, 0x00, + 0xe4, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00 + }; + BYTE headerin[30]; + + xVBAProject->Read(headerin,30); + if (memcmp(header,headerin,30) != 0) + DBG_WARNING("Warning VBA header is different, please report"); + UINT16 value; + *xVBAProject >> value; + //*pOut << "Trigger value 1 is " << value << endl; + UINT16 svalue; + *xVBAProject >> svalue; + if (svalue != 0x02) + DBG_WARNING("Warning VBA number is different, please report"); + + int count=0; + BYTE testc=0; + + //*pOut << "Other strings after the middle are..." << endl; + //There appears to be almost any number of strings acceptable + //most begin with */G , and sometimes with + //*/C. Those with G always have a trailer of 12 bytes, those + //with C come in pairs, the first with no trailer, and the + //second with one of 12 bytes. The following code attemts + //to read these strings and ends when it reaches a sequence of + //bytes which fails a test to be a valid string. So this + //while loop here is the particular piece of code which is + //very suspect and likely to be the cause of any crashes and + //problems. + while ((testc = ReadPString(xVBAProject)) != 0) + { + //*pOut << endl; + //*pOut << "testcharacter is " << testc << endl; + switch (testc) + { + case 'C': + count++; + if (count == 2) + { + Confirm12Zeros(xVBAProject); + count=0; + } + break; + default: + case 'G': + Confirm12Zeros(xVBAProject); + break; + } + } + + //appears to be a fixed 20 byte sequence here, and then the strings + //continue + ConfirmFixedMiddle(xVBAProject); + + count=0; + testc=0; + + while ((testc = ReadPString(xVBAProject)) != 0) + { + //*pOut << endl; + //*pOut << "testcharacter is " << testc << endl; + switch (testc) + { + case 'C': + count++; + if (count == 2) + { + Confirm12Zeros(xVBAProject); + count=0; + } + break; + default: + case 'G': + Confirm12Zeros(xVBAProject); + break; + } + } + + //there *may* be another different 20byte fixed string + ConfirmFixedMiddle2(xVBAProject); + + //*pOut << "testc is " << testc << endl; + //*pOut << "position is " << xVBAProject->Tell() << endl; + + UINT16 nModules; + *xVBAProject >> nModules; + + //begin section, this section isn't really 100% correct + //*pOut << nModules << hex << " vba modules" << endl; + xVBAProject->SeekRel(2*nModules); + xVBAProject->SeekRel(4); + //*pOut << "position is " << xVBAProject->Tell() << endl; + ConfirmFixedOctect(xVBAProject); + + UINT16 junksize; + while(junksize != 0xFFFF) + { + xVBAProject->Read(&junksize,2); // usually 18 02, sometimes 1e 02 + //but sometimes its a run of numbers until 0xffff, gagh!!! + //*pOut << "position is " << xVBAProject->Tell() << "len is " + // << junksize << endl; + } + + UINT16 ftest; + *xVBAProject >> ftest; + if (ftest != 0xFFFF) + xVBAProject->SeekRel(ftest); + *xVBAProject >> ftest; + if (ftest != 0xFFFF) + xVBAProject->SeekRel(ftest); + + xVBAProject->SeekRel(100); + //*pOut << "position is " << xVBAProject->Tell() << endl; + //end section + + + *xVBAProject >> nOffsets; + pOffsets = new VBAOffset_Impl[nOffsets]; + int i; + for (i=0;i<nOffsets;i++) + { + BYTE discard; + UINT16 len; + *xVBAProject >> len; + int j; + for (j=0;j<len/2;j++) + { + *xVBAProject >> discard; + pOffsets[i].sName += discard; + *xVBAProject >> discard; + } + *xVBAProject >> len; + xVBAProject->SeekRel(len); + + //begin section, another problem area + *xVBAProject >> len; + if (len == 0xFFFF) + { + xVBAProject->SeekRel(2); + *xVBAProject >> len; + xVBAProject->SeekRel(len); + } + else + xVBAProject->SeekRel(len+2); + // + /* I have a theory that maybe you read a 16bit len, and + * if it has 0x02 for the second byte then it is a special + * token of its own that affects nothing else, otherwise + * it is a len of the following data. C. I must test this + * theory later. + */ + //end section + + xVBAProject->SeekRel(8); + BYTE no_of_octects; + *xVBAProject >> no_of_octects; + for(j=0;j<no_of_octects;j++) + xVBAProject->SeekRel(8); + xVBAProject->SeekRel(6); + + *xVBAProject >> pOffsets[i].nOffset; + //*pOut << pOffsets[i].pName.GetStr() << " at 0x" << hex << pOffsets[i].nOffset << endl; + xVBAProject->SeekRel(2); + } + + //*pOut << endl; + return(nOffsets); + } + +BOOL VBA_Impl::Open( const String &rToplevel,const String &rSublevel ) +{ + /* beginning test for vba stuff */ + BOOL bRet = FALSE; + SvStorageRef xMacros= xStor->OpenStorage(rToplevel); + if( !xMacros.Is() || SVSTREAM_OK != xMacros->GetError() ) + { + DBG_WARNING("No Macros Storage"); + } + else + { + xVBA = xMacros->OpenStorage(rSublevel); + if( !xVBA.Is() || SVSTREAM_OK != xVBA->GetError() ) + { + DBG_WARNING("No Visual Basic in Storage"); + } + else + { + if (ReadVBAProject(xVBA)) + bRet = TRUE; + } + } + /* end test for vba stuff */ + return bRet; +} + +const String &VBA_Impl::Decompress( UINT16 nIndex, int *pOverflow) +{ + SvStorageStreamRef xVBAStream; + sVBAString.Erase(); + + DBG_ASSERT( nIndex < nOffsets, "Index out of range" ); + xVBAStream = xVBA->OpenStream( pOffsets[nIndex].sName, + STREAM_STD_READ | STREAM_NOCREATE ); + if (pOverflow) + *pOverflow=0; + if( !xVBAStream.Is() || SVSTREAM_OK != + xVBAStream->GetError() ) + { + DBG_WARNING("Not able to open vb module "); +// DBG_WARNING((pOffsets[nIndex].sName).GetStr()); + } + else + { + xVBAStream->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); + DecompressVBA(nIndex,xVBAStream); + /* + * if len was too big for a single string set that variable ? + * if ((len > XX) && (pOverflow)) + *pOverflow=1; + */ + if (bCommented) + { + String sTempStringa(String::CreateFromAscii( "\x0D\x0A")); + String sTempStringb(String::CreateFromAscii( "\x0D\x0ARem ")); + sVBAString.SearchAndReplaceAll(sTempStringa,sTempStringb); + sVBAString.InsertAscii("Rem ",0); + } + } + return sVBAString; +} + + +int VBA_Impl::DecompressVBA( int nIndex, SvStorageStreamRef &xVBAStream ) +{ + BYTE leadbyte; + unsigned int pos = 0; + + //*pOut << "jumping to " << hex << offsets[nIndex].offset << endl; + xVBAStream->Seek(pOffsets[nIndex].nOffset+3); + + int len; + UINT16 token; + int distance, shift, clean=1; + + while(xVBAStream->Read(&leadbyte,1)) + { + //*pOut << "reading 8 data unit block beginning with " << leadbyte << int(leadbyte) << " at pos " << xVBAStream->Tell() << " real pos " << pos << endl; + for(int position=0x01;position < 0x100;position=position<<1) + { + //we see if the leadbyte has flagged this location as a dataunit + //which is actually a token which must be looked up in the history + if (leadbyte & position) + { + *xVBAStream >> token; + + if (clean == 0) + clean=1; + + //For some reason the division of the token into the length + //field of the data to be inserted, and the distance back into + //the history differs depending on how full the history is + int pos2 = pos%WINDOWLEN; + if (pos2 <= 0x10) + shift = 12; + else if (pos2 <= 0x20) + shift = 11; + else if (pos2 <= 0x40) + shift = 10; + else if (pos2 <= 0x80) + shift = 9; + else if (pos2 <= 0x100) + shift = 8; + else if (pos2 <= 0x200) + shift = 7; + else if (pos2 <= 0x400) + shift = 6; + else if (pos2 <= 0x800) + shift = 5; + else + shift = 4; + + int i; + len=0; + for(i=0;i<shift;i++) + len |= token & (1<<i); + + //*pOut << endl << "match lookup token " << int(token) << "len " << int(len) << endl; + + len += 3; + //*pOut << endl << "len is " << len << "shift is " << shift << endl; + + distance = token >> shift; + //*pOut << "distance token shift is " << distance << " " << int(token) << " " << shift << "pos is " << pos << " " << xVBAStream->Tell() << endl; + + //read the len of data from the history, wrapping around the + //WINDOWLEN boundary if necessary + //data read from the history is also copied into the recent + //part of the history as well. + for (i = 0; i < len; i++) + { + unsigned char c; + //*pOut << endl << (pos%WINDOWLEN)-distance-1 << " " << pos << " " << distance << endl; + c = aHistory[(pos-distance-1)%WINDOWLEN]; + aHistory[pos%WINDOWLEN] = c; + pos++; + //*pOut << "real pos is " << pos << endl; + // + //temp removed + //*pOut << c ; + } + } + else + { + // special boundary case code, not guarantueed to be correct + // seems to work though, there is something wrong with the + // compression scheme (or maybe a feature) where when + // the data ends on a WINDOWLEN boundary and the excess + // bytes in the 8 dataunit list are discarded, and not + // interpreted as tokens or normal data. + if ((pos != 0) && ((pos%WINDOWLEN) == 0) && (clean)) + { + //*pOut << "at boundary position is " << position << " " << xVBAStream->Tell() << " pos is " << pos << endl; + //if (position != 0x01) + //*pOut << "must restart by eating remainder single byte data units" << endl; + xVBAStream->SeekRel(2); + clean=0; + Output(WINDOWLEN,aHistory); + break; + } + //This is the normal case for when the data unit is not a + //token to be looked up, but instead some normal data which + //can be output, and placed in the history. + if (xVBAStream->Read(&aHistory[pos%WINDOWLEN],1)) + { + pos++; + //temp removed + //*pOut << aHistory[pos++%WINDOWLEN]; + } + if (clean == 0) + clean=1; + //*pOut << "pos is " << pos << " " << xVBAStream->Tell() << endl; + } + } + } + if (pos%WINDOWLEN) + Output(pos%WINDOWLEN,aHistory); + return(pos); +} + diff --git a/sw/source/filter/ww8/dump/msvbasic.hxx b/sw/source/filter/ww8/dump/msvbasic.hxx new file mode 100644 index 0000000000..d0a45ea488 --- /dev/null +++ b/sw/source/filter/ww8/dump/msvbasic.hxx @@ -0,0 +1,102 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _MSVBASIC_HXX +#define _MSVBASIC_HXX + +#ifdef _SOLAR_H +#include <tools/solar.h> +#endif +#include <tools/debug.hxx> +#include <sot/storage.hxx> + + +/* class VBA: + * The VBA class provides a set of methods to handle Visual Basic For + * Applications streams, the constructor is given the root ole2 stream + * of the document, Open reads the VBA project file and figures out + * the number of VBA streams, and the offset of the data within them. + * Decompress decompresses a particular numbered stream, NoStreams returns + * this number, and StreamName can give you the streams name. Decompress + * will return a string with the decompressed data. The optional extra + * argument will be set if not NULL to 1 in the case of a string overflow, + * if I can figure out how to do that. + * + * Otherwise it is possible to inherit from VBA and implement a Output + * member which gets called with each 4096 output sized block. + * + * cmc + * */ + +#define WINDOWLEN 4096 + +class VBA_Impl +{ +public: + VBA_Impl( SvStorage &rIn, BOOL bCmmntd = TRUE ) + : xStor(&rIn), pOffsets(0), nOffsets(0), bCommented(bCmmntd) + {} + ~VBA_Impl() {if (nOffsets) delete [] pOffsets;} + //0 for failure, 1 for success + BOOL Open( const String &rToplevel, const String &rSublevel); + const String & Decompress( UINT16 nIndex, int *pOverflow=0); + UINT16 GetNoStreams() const { return nOffsets; } + const String &GetStreamName( UINT16 nIndex ) const + { + DBG_ASSERT( nIndex < nOffsets, "Index out of range" ); + return pOffsets[ nIndex ].sName; + } + virtual void Output(int len,const BYTE *data); +private: + struct VBAOffset_Impl + { + String sName; + UINT32 nOffset; + }; + + SvStorageRef xVBA; + String sVBAString; + SvStorageRef xStor; + VBAOffset_Impl *pOffsets; + UINT16 nOffsets; + BYTE aHistory[ WINDOWLEN ]; + BOOL bCommented; + + //0 for failure, anything else for success + int ReadVBAProject(const SvStorageRef &rxVBAStorage); + int DecompressVBA(int index, SvStorageStreamRef &rxVBAStream); + void Confirm12Zeros(SvStorageStreamRef &xVBAProject); + void ConfirmHalfWayMarker(SvStorageStreamRef &xVBAProject); + void ConfirmFixedMiddle(SvStorageStreamRef &xVBAProject); + void ConfirmFixedMiddle2(SvStorageStreamRef &xVBAProject); + void ConfirmFixedOctect(SvStorageStreamRef &xVBAProject); + BYTE ReadPString(SvStorageStreamRef &xVBAProject); +}; + + + + +#endif diff --git a/sw/source/filter/ww8/makefile.mk b/sw/source/filter/ww8/makefile.mk deleted file mode 100644 index 9c9455be8b..0000000000 --- a/sw/source/filter/ww8/makefile.mk +++ /dev/null @@ -1,91 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=ww8 - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -MAKING_LIBMSWORD=TRUE -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(mydebug)" != "" -CDEFS=$(CDEFS) -Dmydebug -.ENDIF - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES = \ - $(SLO)$/WW8FFData.obj \ - $(SLO)$/WW8FibData.obj \ - $(SLO)$/WW8Sttbf.obj \ - $(SLO)$/WW8TableInfo.obj \ - $(SLO)$/docxattributeoutput.obj \ - $(SLO)$/docxexport.obj \ - $(SLO)$/docxexportfilter.obj \ - $(SLO)$/fields.obj \ - $(SLO)$/rtfattributeoutput.obj \ - $(SLO)$/rtfexport.obj \ - $(SLO)$/rtfexportfilter.obj \ - $(SLO)$/rtfimportfilter.obj \ - $(SLO)$/rtfsdrexport.obj \ - $(SLO)$/styles.obj \ - $(SLO)$/tracer.obj \ - $(SLO)$/writerhelper.obj \ - $(SLO)$/writerwordglue.obj \ - $(SLO)$/wrtw8esh.obj \ - $(SLO)$/wrtw8nds.obj \ - $(SLO)$/wrtw8num.obj \ - $(SLO)$/wrtw8sty.obj \ - $(SLO)$/wrtww8.obj \ - $(SLO)$/wrtww8gr.obj \ - $(SLO)$/ww8atr.obj \ - $(SLO)$/ww8glsy.obj \ - $(SLO)$/ww8graf.obj \ - $(SLO)$/ww8graf2.obj \ - $(SLO)$/ww8par.obj \ - $(SLO)$/ww8par2.obj \ - $(SLO)$/ww8par3.obj \ - $(SLO)$/ww8par4.obj \ - $(SLO)$/ww8par5.obj \ - $(SLO)$/ww8par6.obj \ - $(SLO)$/ww8scan.obj \ - $(SLO)$/ww8toolbar.obj - - -SLOFILES = \ - $(EXCEPTIONSFILES) - - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 51e3878a8f..9d5767fc61 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -3,6 +3,7 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * + * Copyright 2000, 2010 Oracle and/or its affiliates. * Copyright 2010 Miklos Vajna. * * OpenOffice.org - a multi-platform office productivity suite @@ -175,9 +176,9 @@ static OString OutTBLBorderLine(RtfExport &rExport, const SvxBorderLine* pLine, else { // single line + if( DEF_LINE_WIDTH_0 == pLine->GetOutWidth() ) aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRHAIR); - else if ( 255 >= pLine->GetOutWidth() ) // That value comes from RTF specs { switch ( pLine->GetStyle( ) ) { @@ -1417,7 +1418,7 @@ void RtfAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField /*eTyp m_aRunText.append(m_rExport.OutString(rFldCmd, m_rExport.eCurrentEncoding)); m_aRunText.append("}{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " "); if (pFld) - m_aRunText.append(m_rExport.OutString(pFld->GetCntnt(), m_rExport.eDefaultEncoding)); + m_aRunText.append(m_rExport.OutString(pFld->ExpandField(true), m_rExport.eDefaultEncoding)); m_aRunText.append("}}"); } @@ -3416,6 +3417,8 @@ void RtfAttributeOutput::FlyFrameGraphic( const SwFlyFrmFmt* pFlyFrmFmt, const S //Get original size in twips Size aSize(sw::util::GetSwappedInSize(rGrfNode)); Size aRendered(aSize); + aRendered.Width() = rSize.Width(); + aRendered.Height() = rSize.Height(); if (pFlyFrmFmt) { const SwFmtFrmSize& rS = pFlyFrmFmt->GetFrmSize(); diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx index 17de6060d3..39f3c5eedb 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.hxx +++ b/sw/source/filter/ww8/rtfattributeoutput.hxx @@ -3,6 +3,7 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * + * Copyright 2000, 2010 Oracle and/or its affiliates. * Copyright 2010 Miklos Vajna. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx index 8915429084..b600ffa110 100644 --- a/sw/source/filter/ww8/rtfexportfilter.cxx +++ b/sw/source/filter/ww8/rtfexportfilter.cxx @@ -133,5 +133,56 @@ uno::Reference< uno::XInterface > SAL_CALL RtfExport_createInstance(const uno::R { return (cppu::OWeakObject*) new RtfExportFilter( rSMgr ); } +#ifdef __cplusplus +extern "C" +{ +#endif + +SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */ ) +{ + *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; +} + +// ------------------------ +// - component_getFactory - +// ------------------------ + +SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ ) +{ + OSL_TRACE("%s, pImplName is '%s'", OSL_THIS_FUNC, pImplName); + uno::Reference< lang::XSingleServiceFactory > xFactory; + void* pRet = 0; + + if ( rtl_str_compare( pImplName, IMPL_NAME_RTFEXPORT ) == 0 ) { + const OUString aServiceName( OUString::createFromAscii( IMPL_NAME_RTFEXPORT ) ); + + xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory( + reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ), + RtfExport_getImplementationName(), + RtfExport_createInstance, + RtfExport_getSupportedServiceNames() ) ); + } + else if ( rtl_str_compare( pImplName, IMPL_NAME_RTFIMPORT ) == 0 ) { + const OUString aServiceName( OUString::createFromAscii( IMPL_NAME_RTFIMPORT ) ); + + xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory( + reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ), + RtfImport_getImplementationName(), + RtfImport_createInstance, + RtfImport_getSupportedServiceNames() ) ); + } + + if ( xFactory.is() ) + { + xFactory->acquire(); + pRet = xFactory.get(); + } + + return pRet; +} + +#ifdef __cplusplus +} +#endif -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vi:set shiftwidth=4 expandtab: */ diff --git a/sw/source/filter/ww8/rtfexportfilter.hxx b/sw/source/filter/ww8/rtfexportfilter.hxx index 2a8705e399..e491842957 100644 --- a/sw/source/filter/ww8/rtfexportfilter.hxx +++ b/sw/source/filter/ww8/rtfexportfilter.hxx @@ -3,6 +3,7 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * + * Copyright 2000, 2010 Oracle and/or its affiliates. * Copyright 2010 Miklos Vajna. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sw/source/filter/ww8/rtfimportfilter.cxx b/sw/source/filter/ww8/rtfimportfilter.cxx index 52b4ae8457..89dd67e9a8 100644 --- a/sw/source/filter/ww8/rtfimportfilter.cxx +++ b/sw/source/filter/ww8/rtfimportfilter.cxx @@ -3,6 +3,7 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * + * Copyright 2000, 2010 Oracle and/or its affiliates. * Copyright 2010 Miklos Vajna. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sw/source/filter/ww8/rtfimportfilter.hxx b/sw/source/filter/ww8/rtfimportfilter.hxx index 60532895f9..37f2198aaa 100644 --- a/sw/source/filter/ww8/rtfimportfilter.hxx +++ b/sw/source/filter/ww8/rtfimportfilter.hxx @@ -3,6 +3,7 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * + * Copyright 2000, 2010 Oracle and/or its affiliates. * Copyright 2010 Miklos Vajna. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx index d3543e3c79..483b69a2f9 100644 --- a/sw/source/filter/ww8/rtfsdrexport.cxx +++ b/sw/source/filter/ww8/rtfsdrexport.cxx @@ -3,6 +3,7 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * + * Copyright 2000, 2010 Oracle and/or its affiliates. * Copyright 2010 Miklos Vajna. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sw/source/filter/ww8/rtfsdrexport.hxx b/sw/source/filter/ww8/rtfsdrexport.hxx index b25f5196de..3e7ee02a23 100644 --- a/sw/source/filter/ww8/rtfsdrexport.hxx +++ b/sw/source/filter/ww8/rtfsdrexport.hxx @@ -3,6 +3,7 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * + * Copyright 2000, 2010 Oracle and/or its affiliates. * Copyright 2010 Miklos Vajna. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 599ac41643..924714c231 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -341,7 +341,8 @@ void WW8Export::DoFormText(const SwInputField * pFld) OutputField(0, ww::eFORMTEXT, aEmptyStr, WRITEFIELD_CMD_END); - SwWW8Writer::WriteString16(Strm(), pFld->Expand(), false); + String const fieldStr( pFld->ExpandField(true) ); + SwWW8Writer::WriteString16(Strm(), fieldStr, false); static BYTE aArr2[] = { 0x03, 0x6a, 0x00, 0x00, 0x00, 0x00, // sprmCPicLocation diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 26df9cbce7..ff74b84c35 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -2,7 +2,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 @@ -267,7 +267,7 @@ xub_StrLen SwWW8AttrIter::SearchNext( xub_StrLen nStartPos ) xub_StrLen pos = lcl_getMinPos( fieldEndPos, fieldStartPos ); pos = lcl_getMinPos( pos, formElementPos ); - if (pos!=STRING_NOTFOUND) + if (pos!=STRING_NOTFOUND) nMinPos=pos; // first the redline, then the attributes @@ -1679,7 +1679,7 @@ bool MSWordExportBase::NearestBookmark( xub_StrLen& rNearest, const xub_StrLen n rNearest = nNext; bHasBookmark = true; } - } + } if ( m_rSortedMarksEnd.size( ) > 0 ) { @@ -1723,7 +1723,7 @@ void MSWordExportBase::GetSortedBookmarks( const SwTxtNode& rNode, xub_StrLen nA // Sort the bookmarks by end position std::sort( aSortedEnd.begin(), aSortedEnd.end(), CompareMarksEnd() ); - + m_rSortedMarksStart.swap( aSortedStart ); m_rSortedMarksEnd.swap( aSortedEnd ); } @@ -1883,8 +1883,8 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) ::sw::mark::IFieldmark const * const pFieldmark = pMarkAccess->getFieldmarkFor( aPosition ); OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDEND??" ); - ww::eField eFieldId = lcl_getFieldId( pFieldmark ); - if ( pFieldmark->GetFieldname().equalsAscii( ODF_UNHANDLED ) ) + OutputField( NULL, ww::eFORMTEXT, String(), WRITEFIELD_CLOSE ); + if ( pFieldmark ) { IFieldmark::parameter_map_t::const_iterator it = pFieldmark->GetParameters()->find( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_ID_PARAM )) ); @@ -2028,7 +2028,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) if (pTextNodeInfoInner->isFirstInTable()) { const SwTable * pTable = pTextNodeInfoInner->getTable(); - const SwTableFmt * pTabFmt = + const SwTableFmt * pTabFmt = dynamic_cast<const SwTableFmt *>(pTable->GetRegisteredIn()); if (pTabFmt != NULL) { diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 073041c856..7899f512af 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -732,6 +732,17 @@ void wwFont::WriteRtf( const RtfAttributeOutput* rAttrOutput ) const rAttrOutput->EndFont(); } +void wwFont::WriteRtf( const RtfAttributeOutput* rAttrOutput ) const +{ + rAttrOutput->FontFamilyType( meFamily, *this ); + rAttrOutput->FontPitchType( mePitch ); + rAttrOutput->FontCharset( sw::ms::rtl_TextEncodingToWinCharset( meChrSet ) ); + rAttrOutput->StartFont( msFamilyNm ); + if ( mbAlt ) + rAttrOutput->FontAlternateName( msAltNm ); + rAttrOutput->EndFont(); +} + bool operator<(const wwFont &r1, const wwFont &r2) { int nRet = memcmp(r1.maWW8_FFN, r2.maWW8_FFN, sizeof(r1.maWW8_FFN)); @@ -791,14 +802,16 @@ void wwFontHelper::InitFontTable(bool bWrtWW8,const SwDoc& rDoc) const USHORT aTypes[] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT, 0 }; for (const USHORT* pId = aTypes; *pId; ++pId) { - USHORT nMaxItem = rPool.GetItemCount( *pId ); - for( USHORT nGet = 0; nGet < nMaxItem; ++nGet ) - if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem( - *pId, nGet )) ) + sal_uInt32 const nMaxItem = rPool.GetItemCount2( *pId ); + for (sal_uInt32 nGet = 0; nGet < nMaxItem; ++nGet) + { + pFont = (const SvxFontItem*)rPool.GetItem2( *pId, nGet ); + if (0 != pFont) { GetId(wwFont(pFont->GetFamilyName(), pFont->GetPitch(), pFont->GetFamily(), pFont->GetCharSet(),bWrtWW8)); } + } } } @@ -880,6 +893,14 @@ void wwFontHelper::WriteFontTable( const RtfAttributeOutput& rAttrOutput ) ::std::bind2nd( ::std::mem_fun( &wwFont::WriteRtf ), &rAttrOutput ) ); } +void wwFontHelper::WriteFontTable( const RtfAttributeOutput& rAttrOutput ) +{ + ::std::vector<const wwFont *> aFontList( AsVector() ); + + ::std::for_each( aFontList.begin(), aFontList.end(), + ::std::bind2nd( ::std::mem_fun( &wwFont::WriteRtf ), &rAttrOutput ) ); +} + /* */ WW8_WrPlc0::WW8_WrPlc0( ULONG nOffset ) @@ -1045,7 +1066,7 @@ void WW8_WrPlcSepx::AppendSep( WW8_CP nStartCp, const SwPageDesc* pPd, { aCps.Insert( nStartCp, aCps.Count() ); - AppendSection( pPd, pSectionFmt, nLnNumRestartNo ); + AppendSection( pPd, pSectionFmt, nLnNumRestartNo ); } } @@ -1065,7 +1086,7 @@ void WW8_WrPlcSepx::AppendSep( WW8_CP nStartCp, const SwFmtPageDesc& rPD, { aCps.Insert(nStartCp, aCps.Count()); - AppendSection( rPD, rNd, pSectionFmt, nLnNumRestartNo ); + AppendSection( rPD, rNd, pSectionFmt, nLnNumRestartNo ); } } diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index a219792c8a..51bf652392 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -112,6 +112,8 @@ #include "dbgoutsw.hxx" #include <sfx2/docfile.hxx> +#include <sfx2/request.hxx> +#include <sfx2/frame.hxx> #include <svl/stritem.hxx> #include <unotools/tempfile.hxx> #include <filter/msfilter/mscodec.hxx> @@ -1283,7 +1285,7 @@ void WW8_WrtBookmarks::Append( WW8_CP nStartCp, const String& rNm, const ::sw:: aSttCps.Insert(nStartCp, nPos); aEndCps.Insert(nStartCp, nPos); - aFieldMarks.Insert(BOOL(false), nPos); + aFieldMarks.insert(aFieldMarks.begin() + nPos, BOOL(false)); maSwBkmkNms.insert(aIter, rNm); } else @@ -2030,6 +2032,7 @@ void WW8AttributeOutput::TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTab const SwTableLine * pTabLine = pTabBox->GetUpper(); const SwFrmFmt * pLineFmt = pTabLine->GetFrmFmt(); + // Zeilenhoehe ausgeben sprmTDyaRowHeight long nHeight = 0; const SwFmtFrmSize& rLSz = pLineFmt->GetFrmSize(); @@ -2446,6 +2449,16 @@ typedef ::std::hash_set<SwNode *, SwNodeHash> SwNodeHashSet; typedef ::std::deque<SwNode *> SwNodeDeque; #endif +#ifdef DEBUG +struct SwNodeHash +{ + size_t operator()(SwNode * pNode) const { return reinterpret_cast<size_t>(pNode); } +}; + +typedef ::std::hash_set<SwNode *, SwNodeHash> SwNodeHashSet; +typedef ::std::deque<SwNode *> SwNodeDeque; +#endif + void MSWordExportBase::WriteText() { while( pCurPam->GetPoint()->nNode < pCurPam->GetMark()->nNode || @@ -2454,6 +2467,22 @@ void MSWordExportBase::WriteText() { SwNode * pNd = pCurPam->GetNode(); +// whoever has need of the missing function should go and implement it! +// This piece of code always breaks builds... +#if 0 +#ifdef DEBUG + if (aNodeSet.find(pNd) == aNodeSet.end()) + { + aNodeSet.insert(pNd); + aNodeDeque.push_back(pNd); + } + else + { + ::std::clog << "<already-done>" << dbg_out(*pNd) << "</already-done>" << ::std::endl; + } +#endif +#endif + if ( pNd->IsTxtNode() ) SectionBreaksAndFrames( *pNd->GetTxtNode() ); @@ -2810,10 +2839,10 @@ void MSWordExportBase::CollectOutlineBookmarks(const SwDoc &rDoc) const SwTxtINetFmt* pTxtAttr; const SwTxtNode* pTxtNd; - USHORT n, nMaxItems = rDoc.GetAttrPool().GetItemCount( RES_TXTATR_INETFMT ); + sal_uInt32 n, nMaxItems = rDoc.GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT ); for( n = 0; n < nMaxItems; ++n ) { - if( 0 != (pINetFmt = (SwFmtINetFmt*)rDoc.GetAttrPool().GetItem( + if( 0 != (pINetFmt = (SwFmtINetFmt*)rDoc.GetAttrPool().GetItem2( RES_TXTATR_INETFMT, n ) ) && 0 != ( pTxtAttr = pINetFmt->GetTxtINetFmt()) && 0 != ( pTxtNd = pTxtAttr->GetpTxtNode() ) && @@ -2824,10 +2853,10 @@ void MSWordExportBase::CollectOutlineBookmarks(const SwDoc &rDoc) } const SwFmtURL *pURL; - nMaxItems = rDoc.GetAttrPool().GetItemCount( RES_URL ); + nMaxItems = rDoc.GetAttrPool().GetItemCount2( RES_URL ); for( n = 0; n < nMaxItems; ++n ) { - if( 0 != (pURL = (SwFmtURL*)rDoc.GetAttrPool().GetItem( + if( 0 != (pURL = (SwFmtURL*)rDoc.GetAttrPool().GetItem2( RES_URL, n ) ) ) { AddLinkTarget( pURL->GetURL() ); @@ -2943,20 +2972,54 @@ void MSWordExportBase::ExportDocument( bool bWriteAll ) pDoc->SetRedlineMode( (RedlineMode_t)(mnRedlineMode) ); } -String SwWW8Writer::GetPassword() +bool SwWW8Writer::InitStd97CodecUpdateMedium( ::msfilter::MSCodec_Std97& rCodec ) { - String sUniPassword; + uno::Sequence< beans::NamedValue > aEncryptionData; + if ( mpMedium ) { - SfxItemSet* pSet = mpMedium->GetItemSet(); + SFX_ITEMSET_ARG( mpMedium->GetItemSet(), pEncryptionDataItem, SfxUnoAnyItem, SID_ENCRYPTIONDATA, sal_False ); + if ( pEncryptionDataItem && ( pEncryptionDataItem->GetValue() >>= aEncryptionData ) && !rCodec.InitCodec( aEncryptionData ) ) + { + OSL_ENSURE( false, "Unexpected EncryptionData!" ); + aEncryptionData.realloc( 0 ); + } + + if ( !aEncryptionData.getLength() ) + { + // try to generate the encryption data based on password + SFX_ITEMSET_ARG( mpMedium->GetItemSet(), pPasswordItem, SfxStringItem, SID_PASSWORD, sal_False ); + if ( pPasswordItem && pPasswordItem->GetValue().Len() && pPasswordItem->GetValue().Len() <= 15 ) + { + // Generate random number with a seed of time as salt. + TimeValue aTime; + osl_getSystemTime( &aTime ); + rtlRandomPool aRandomPool = rtl_random_createPool (); + rtl_random_addBytes ( aRandomPool, &aTime, 8 ); + + sal_uInt8 pDocId[ 16 ]; + rtl_random_getBytes( aRandomPool, pDocId, 16 ); - const SfxPoolItem* pPasswordItem = NULL; - if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_PASSWORD, sal_True, &pPasswordItem ) ) - if( pPasswordItem != NULL ) - sUniPassword = ( (const SfxStringItem*)pPasswordItem )->GetValue(); + rtl_random_destroyPool( aRandomPool ); + + sal_Unicode aPassword[16]; + memset( aPassword, 0, sizeof( aPassword ) ); + for ( xub_StrLen nChar = 0; nChar < pPasswordItem->GetValue().Len(); ++nChar ) + aPassword[nChar] = pPasswordItem->GetValue().GetChar(nChar); + + rCodec.InitKey( aPassword, pDocId ); + aEncryptionData = rCodec.GetEncryptionData(); + + mpMedium->GetItemSet()->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ) ); + } + } + + if ( aEncryptionData.getLength() ) + mpMedium->GetItemSet()->ClearItem( SID_PASSWORD ); } - return sUniPassword; + // nonempty encryption data means hier that the codec was successfuly initialized + return ( aEncryptionData.getLength() != 0 ); } void WW8Export::ExportDocument_Impl() @@ -2990,8 +3053,6 @@ void WW8Export::ExportDocument_Impl() Strm().SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); - String sUniPassword( GetWriter().GetPassword() ); - utl::TempFile aTempMain; aTempMain.EnableKillingFile(); utl::TempFile aTempTable; @@ -2999,13 +3060,10 @@ void WW8Export::ExportDocument_Impl() utl::TempFile aTempData; aTempData.EnableKillingFile(); - bool bEncrypt = false; - - xub_StrLen nLen = sUniPassword.Len(); - if ( nLen > 0 && nLen <= 15) // Password has been set + msfilter::MSCodec_Std97 aCtx; + bool bEncrypt = m_pWriter ? m_pWriter->InitStd97CodecUpdateMedium( aCtx ) : false; + if ( bEncrypt ) { - bEncrypt =true; - GetWriter().SetStream( aTempMain.GetStream( STREAM_READWRITE | STREAM_SHARE_DENYWRITE ) ); @@ -3069,24 +3127,6 @@ void WW8Export::ExportDocument_Impl() if ( bEncrypt ) { - // Generate random number with a seed of time as salt. - TimeValue aTime; - osl_getSystemTime( &aTime ); - rtlRandomPool aRandomPool = rtl_random_createPool (); - rtl_random_addBytes ( aRandomPool, &aTime, 8 ); - - sal_uInt8 aDocId[ 16 ] = {0}; - rtl_random_getBytes( aRandomPool, aDocId, 16 ); - - rtl_random_destroyPool( aRandomPool ); - - sal_Unicode aPassword[16] = {0}; - for (xub_StrLen nChar = 0; nChar < nLen; ++nChar ) - aPassword[nChar] = sUniPassword.GetChar(nChar); - - msfilter::MSCodec_Std97 aCtx; - aCtx.InitKey(aPassword, aDocId); - SvStream *pStrmTemp, *pTableStrmTemp, *pDataStrmTemp; pStrmTemp = &xWwStrm; pTableStrmTemp = &xTableStrm; @@ -3103,11 +3143,14 @@ void WW8Export::ExportDocument_Impl() sal_uInt32 nEncType = 0x10001; *pTableStrmTemp << nEncType; - sal_uInt8 pSaltData[16] = {0}; - sal_uInt8 pSaltDigest[16] = {0}; - aCtx.GetEncryptKey( aDocId, pSaltData, pSaltDigest ); + sal_uInt8 pDocId[16]; + aCtx.GetDocId( pDocId ); - pTableStrmTemp->Write( aDocId, 16 ); + sal_uInt8 pSaltData[16]; + sal_uInt8 pSaltDigest[16]; + aCtx.GetEncryptKey( pDocId, pSaltData, pSaltDigest ); + + pTableStrmTemp->Write( pDocId, 16 ); pTableStrmTemp->Write( pSaltData, 16 ); pTableStrmTemp->Write( pSaltDigest, 16 ); @@ -3589,6 +3632,20 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) } } + std::vector< ::rtl::OUString > aListItems; + if (type==2) + { + aFldHeader[5] |= 0x80; // ffhaslistbox + const ::sw::mark::IFieldmark::parameter_map_t* const pParameters = rFieldmark.GetParameters(); + ::sw::mark::IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find(::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_LISTENTRY)); + if(pListEntries != pParameters->end()) + { + uno::Sequence< ::rtl::OUString > vListEntries; + pListEntries->second >>= vListEntries; + copy(::comphelper::stl_begin(vListEntries), ::comphelper::stl_end(vListEntries), back_inserter(aListItems)); + } + } + const ::rtl::OUString ffdeftext; const ::rtl::OUString ffformat; const ::rtl::OUString ffhelptext; @@ -3636,6 +3693,7 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) *pDataStrm << aFldHeader.version << aFldHeader.bits << aFldHeader.cch << aFldHeader.hps; + SwWW8Writer::WriteString_xstz( *pDataStrm, ffname, true ); // Form field name SwWW8Writer::WriteString_xstz( *pDataStrm, ffdeftext, true ); diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 945f40ea23..a53c8a131f 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -53,7 +53,12 @@ #include <expfld.hxx> // einige Forward Deklarationen -class SwWW8AttrIter; +namespace msfilter +{ + class MSCodec_Std97; +} + +class SwAttrIter; class AttributeOutputBase; class DocxAttributeOutput; class RtfAttributeOutput; @@ -298,6 +303,7 @@ public: bool Write( SvStream *pTableStram ) const; void WriteDocx( const DocxAttributeOutput* rAttrOutput ) const; void WriteRtf( const RtfAttributeOutput* rAttrOutput ) const; + void WriteRtf( const RtfAttributeOutput* rAttrOutput ) const; rtl::OUString GetFamilyName() const { return rtl::OUString( msFamilyNm ); } friend bool operator < (const wwFont &r1, const wwFont &r2); }; @@ -806,8 +812,8 @@ protected: /// /// Returns false when there is no bookmark. bool NearestBookmark( xub_StrLen& rNearest, const xub_StrLen nAktPos, bool bNextPositionOnly ); - - void GetSortedBookmarks( const SwTxtNode& rNd, xub_StrLen nAktPos, + + void GetSortedBookmarks( const SwTxtNode& rNd, xub_StrLen nAktPos, xub_StrLen nLen ); bool GetBookmarks( const SwTxtNode& rNd, xub_StrLen nStt, xub_StrLen nEnd, @@ -883,7 +889,7 @@ public: static void WriteString_xstz(SvStream& rStrm, const String& rStr, bool bAddZero); - String GetPassword(); + bool InitStd97CodecUpdateMedium( ::msfilter::MSCodec_Std97& rCodec ); using StgWriter::Write; virtual ULONG Write( SwPaM&, SfxMedium&, const String* = 0 ); @@ -1376,6 +1382,47 @@ public: virtual const SfxPoolItem& GetItem( USHORT nWhich ) const = 0; }; +class MSWord_SdrAttrIter : public MSWordAttrIter +{ +private: + const EditTextObject* pEditObj; + const SfxItemPool* pEditPool; + EECharAttribArray aTxtAtrArr; + SvPtrarr aChrTxtAtrArr; + SvUShorts aChrSetArr; + USHORT nPara; + xub_StrLen nAktSwPos; + xub_StrLen nTmpSwPos; // for HasItem() + rtl_TextEncoding eNdChrSet; + USHORT nScript; + BYTE mnTyp; + + xub_StrLen SearchNext( xub_StrLen nStartPos ); + void SetCharSet(const EECharAttrib& rTxtAttr, bool bStart); + + //No copying + MSWord_SdrAttrIter(const MSWord_SdrAttrIter&); + MSWord_SdrAttrIter& operator=(const MSWord_SdrAttrIter&); +public: + MSWord_SdrAttrIter( MSWordExportBase& rWr, const EditTextObject& rEditObj, + BYTE nType ); + void NextPara( USHORT nPar ); + void OutParaAttr(bool bCharAttr); + void OutEEField(const SfxPoolItem& rHt); + + bool IsTxtAttr(xub_StrLen nSwPos); + + void NextPos() { nAktSwPos = SearchNext( nAktSwPos + 1 ); } + + void OutAttr( xub_StrLen nSwPos ); + virtual const SfxPoolItem* HasTextItem( USHORT nWhich ) const; + virtual const SfxPoolItem& GetItem( USHORT nWhich ) const; + bool OutAttrWithRange(xub_StrLen nPos); + xub_StrLen WhereNext() const { return nAktSwPos; } + rtl_TextEncoding GetNextCharSet() const; + rtl_TextEncoding GetNodeCharSet() const { return eNdChrSet; } +}; + /// Used to export formatted text associated to drawings. class MSWord_SdrAttrIter : public MSWordAttrIter { diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx index af58ad1ede..d7813845f3 100644 --- a/sw/source/filter/ww8/wrtww8gr.cxx +++ b/sw/source/filter/ww8/wrtww8gr.cxx @@ -33,6 +33,10 @@ # include <cstdio> #endif +#if OSL_DEBUG_LEVEL > 0 +# include <cstdio> +#endif + #include <com/sun/star/embed/XEmbedPersist.hpp> #include <com/sun/star/embed/Aspects.hpp> #include <com/sun/star/embed/ElementModes.hpp> diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index c56646f98c..1e92525017 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -2,7 +2,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 @@ -1746,7 +1746,7 @@ static void InsertSpecialChar( WW8Export& rWrt, BYTE c, String lcl_GetExpandedField(const SwField &rFld, SwDoc const& rDoc) { - String sRet(rFld.ExpandField(rDoc.IsClipBoard())); + String sRet(rFld.ExpandField(true)); //replace LF 0x0A with VT 0x0B sRet.SearchAndReplaceAll(0x0A, 0x0B); @@ -2708,7 +2708,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField ) if (pDocInfoField != NULL) { - String sFieldname = pDocInfoField->GetCntnt(TRUE); + String sFieldname = pDocInfoField->GetFieldName(); xub_StrLen nIndex = sFieldname.Search(':'); if (nIndex != sFieldname.Len()) diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx index 6755ac255a..92b2449862 100644 --- a/sw/source/filter/ww8/ww8glsy.cxx +++ b/sw/source/filter/ww8/ww8glsy.cxx @@ -219,7 +219,7 @@ bool WW8Glossary::Load( SwTextBlocks &rBlocks, bool bSaveRelFile ) if ( 0 != (nStrings = static_cast< USHORT >(aStrings.size()))) { - SfxObjectShellRef xDocSh(new SwDocShell(SFX_CREATE_MODE_INTERNAL)); + SfxObjectShellLock xDocSh(new SwDocShell(SFX_CREATE_MODE_INTERNAL)); if (xDocSh->DoInitNew(0)) { SwDoc *pD = ((SwDocShell*)(&xDocSh))->GetDoc(); diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 6ed8225f68..ff3ae7fb77 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -62,7 +62,6 @@ #include <editeng/brshitem.hxx> #include <svx/rectenum.hxx> #include <editeng/opaqitem.hxx> -#include <editeng/shaditem.hxx> #include <editeng/boxitem.hxx> #include <editeng/outliner.hxx> // #79453# #include <editeng/frmdiritem.hxx> diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 0690061f5c..8cb7ad2f91 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -29,16 +29,20 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" -#include <hash_set> #include <com/sun/star/embed/ElementModes.hpp> #include <com/sun/star/embed/XStorage.hpp> + +#include <hash_set> #include <unotools/ucbstreamhelper.hxx> #include <tools/solar.h> #include <rtl/tencinfo.h> +#include <rtl/random.h> #include <sot/storage.hxx> #include <sfx2/docinf.hxx> #include <sfx2/docfile.hxx> +#include <sfx2/request.hxx> +#include <sfx2/frame.hxx> #include <tools/urlobj.hxx> #include <unotools/tempfile.hxx> #include <svtools/sfxecode.hxx> @@ -107,6 +111,7 @@ #include <com/sun/star/i18n/ForbiddenCharacters.hpp> #include <comphelper/extract.hxx> +#include <comphelper/sequenceashashmap.hxx> #include <fltini.hxx> #include <algorithm> @@ -668,10 +673,10 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt, { pObj->SetMergedItemSet(aSet); pObj->SetModel(pSdrModel); - + if (bVerticalText && dynamic_cast< SdrTextObj* >( pObj ) ) dynamic_cast< SdrTextObj* >( pObj )->SetVerticalWriting(sal_True); - + if ( bIsSimpleDrawingTextBox ) { if ( nTextRotationAngle ) @@ -690,7 +695,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt, 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 @@ -942,13 +947,13 @@ long lcl_GetTrueMargin(const SvxLRSpaceItem &rLR, const SwNumFmt &rFmt, // --> OD 2010-05-06 #i103711# // --> OD 2010-05-11 #i105414# -void SyncIndentWithList( SvxLRSpaceItem &rLR, +void SyncIndentWithList( SvxLRSpaceItem &rLR, const SwNumFmt &rFmt, const bool bFirstLineOfstSet, const bool bLeftIndentSet ) { if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) - { + { long nWantedFirstLinePos; long nExtraListIndent = lcl_GetTrueMargin(rLR, rFmt, nWantedFirstLinePos); rLR.SetTxtLeft(nWantedFirstLinePos - nExtraListIndent); @@ -956,7 +961,7 @@ void SyncIndentWithList( SvxLRSpaceItem &rLR, } else if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) { - if ( !bFirstLineOfstSet && bLeftIndentSet && + if ( !bFirstLineOfstSet && bLeftIndentSet && rFmt.GetFirstLineIndent() != 0 ) { rLR.SetTxtFirstLineOfst( rFmt.GetFirstLineIndent() ); @@ -1025,7 +1030,7 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, pNum = GetNumFmtFromStack(*aRegion.GetPoint(), *pTxtNode); if (!pNum) - { + { pNum = GetNumFmtFromTxtNode(*pTxtNode); } @@ -3673,7 +3678,7 @@ void wwSectionManager::InsertSegments() bool bThisAndNextAreCompatible = (aNext != aEnd) ? ((aIter->GetPageWidth() == aNext->GetPageWidth()) && (aIter->GetPageHeight() == aNext->GetPageHeight()) && (aIter->IsLandScape() == aNext->IsLandScape())) : true; - if ((aNext != aEnd && aNext->IsContinous() && bThisAndNextAreCompatible) || bProtected) + if (((aNext != aEnd && aNext->IsContinous() && bThisAndNextAreCompatible) || bProtected)) { bIgnoreCols = true; if ((aIter->NoCols() > 1) || bProtected) @@ -4628,6 +4633,90 @@ namespace return aPassw; } + uno::Sequence< beans::NamedValue > InitXorWord95Codec( ::msfilter::MSCodec_XorWord95& rCodec, SfxMedium& rMedium, WW8Fib* pWwFib ) + { + uno::Sequence< beans::NamedValue > aEncryptionData; + SFX_ITEMSET_ARG( rMedium.GetItemSet(), pEncryptionData, SfxUnoAnyItem, SID_ENCRYPTIONDATA, sal_False ); + if ( pEncryptionData && ( pEncryptionData->GetValue() >>= aEncryptionData ) && !rCodec.InitCodec( aEncryptionData ) ) + aEncryptionData.realloc( 0 ); + + if ( !aEncryptionData.getLength() ) + { + String sUniPassword = QueryPasswordForMedium( rMedium ); + + ByteString sPassword(sUniPassword, WW8Fib::GetFIBCharset( pWwFib->chseTables ) ); + + xub_StrLen nLen = sPassword.Len(); + if( nLen <= 15 ) + { + sal_uInt8 pPassword[16]; + memset( pPassword, 0, sizeof( pPassword ) ); + + for (xub_StrLen nChar = 0; nChar < sPassword.Len(); ++nChar ) + pPassword[nChar] = sPassword.GetChar(nChar); + + rCodec.InitKey( pPassword ); + aEncryptionData = rCodec.GetEncryptionData(); + + // the export supports RC4 algorithm only, so we have to generate the related EncryptionData as well, + // so that Save can export the document without asking for a password; + // as result there will be EncryptionData for both algorithms in the MediaDescriptor + ::msfilter::MSCodec_Std97 aCodec97; + + // Generate random number with a seed of time as salt. + TimeValue aTime; + osl_getSystemTime( &aTime ); + rtlRandomPool aRandomPool = rtl_random_createPool(); + rtl_random_addBytes ( aRandomPool, &aTime, 8 ); + + sal_uInt8 pDocId[ 16 ]; + rtl_random_getBytes( aRandomPool, pDocId, 16 ); + + rtl_random_destroyPool( aRandomPool ); + + sal_uInt16 pStd97Pass[16]; + memset( pStd97Pass, 0, sizeof( pStd97Pass ) ); + for (xub_StrLen nChar = 0; nChar < nLen; ++nChar ) + pStd97Pass[nChar] = sUniPassword.GetChar(nChar); + + aCodec97.InitKey( pStd97Pass, pDocId ); + + // merge the EncryptionData, there should be no conflicts + ::comphelper::SequenceAsHashMap aEncryptionHash( aEncryptionData ); + aEncryptionHash.update( ::comphelper::SequenceAsHashMap( aCodec97.GetEncryptionData() ) ); + aEncryptionHash >> aEncryptionData; + } + } + + return aEncryptionData; + } + + uno::Sequence< beans::NamedValue > InitStd97Codec( ::msfilter::MSCodec_Std97& rCodec, sal_uInt8 pDocId[16], SfxMedium& rMedium ) + { + uno::Sequence< beans::NamedValue > aEncryptionData; + SFX_ITEMSET_ARG( rMedium.GetItemSet(), pEncryptionData, SfxUnoAnyItem, SID_ENCRYPTIONDATA, sal_False ); + if ( pEncryptionData && ( pEncryptionData->GetValue() >>= aEncryptionData ) && !rCodec.InitCodec( aEncryptionData ) ) + aEncryptionData.realloc( 0 ); + + if ( !aEncryptionData.getLength() ) + { + String sUniPassword = QueryPasswordForMedium( rMedium ); + + xub_StrLen nLen = sUniPassword.Len(); + if ( nLen <= 15 ) + { + sal_Unicode pPassword[16]; + memset( pPassword, 0, sizeof( pPassword ) ); + for (xub_StrLen nChar = 0; nChar < nLen; ++nChar ) + pPassword[nChar] = sUniPassword.GetChar(nChar); + + rCodec.InitKey( pPassword, pDocId ); + aEncryptionData = rCodec.GetEncryptionData(); + } + } + + return aEncryptionData; + } } ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss) @@ -4681,31 +4770,22 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss) if (bDecrypt) { nErrRet = ERRCODE_SVX_WRONGPASS; - switch (eAlgo) + SfxMedium* pMedium = mpDocShell->GetMedium(); + + if ( pMedium ) { - default: - nErrRet = ERRCODE_SVX_READ_FILTER_CRYPT; - break; - case XOR: + switch (eAlgo) { - String sUniPassword = - QueryPasswordForMedium(*(mpDocShell->GetMedium())); - - ByteString sPassword(sUniPassword, - WW8Fib::GetFIBCharset(pWwFib->chseTables)); - - xub_StrLen nLen = sPassword.Len(); - // DR: do not cut a wrong (too long) password - if( nLen <= 15 ) + default: + nErrRet = ERRCODE_SVX_READ_FILTER_CRYPT; + break; + case XOR: { - sal_uInt8 aPassword[16] = {0}; - - for (xub_StrLen nChar = 0; nChar < sPassword.Len(); ++nChar ) - aPassword[nChar] = sPassword.GetChar(nChar); - msfilter::MSCodec_XorWord95 aCtx; - aCtx.InitKey(aPassword); - if (aCtx.VerifyKey(pWwFib->nKey, pWwFib->nHash)) + uno::Sequence< beans::NamedValue > aEncryptionData = InitXorWord95Codec( aCtx, *pMedium, pWwFib ); + + // if initialization has failed the EncryptionData should be empty + if ( aEncryptionData.getLength() && aCtx.VerifyKey( pWwFib->nKey, pWwFib->nHash ) ) { nErrRet = 0; pTempMain = MakeTemp(aDecryptMain); @@ -4737,22 +4817,15 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss) DecryptXOR(aCtx, *pDataStream, aDecryptData); pDataStream = &aDecryptData; } + + pMedium->GetItemSet()->ClearItem( SID_PASSWORD ); + pMedium->GetItemSet()->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ) ); } } - } - break; - case RC4: - { - String sUniPassword = - QueryPasswordForMedium(*(mpDocShell->GetMedium())); - - xub_StrLen nLen = sUniPassword.Len(); - // DR: do not cut a wrong (too long) password - if (nLen <= 15) + break; + case RC4: { - sal_Unicode aPassword[16] = {0}; - for (xub_StrLen nChar = 0; nChar < nLen; ++nChar ) - aPassword[nChar] = sUniPassword.GetChar(nChar); + msfilter::MSCodec_Std97 aCtx; sal_uInt8 aDocId[ 16 ]; pTableStream->Read(aDocId, 16); @@ -4761,9 +4834,9 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss) sal_uInt8 aSaltHash[ 16 ]; pTableStream->Read(aSaltHash, 16); - msfilter::MSCodec_Std97 aCtx; - aCtx.InitKey(aPassword, aDocId); - if (aCtx.VerifyKey(aSaltData, aSaltHash)) + // if initialization has failed the EncryptionData should be empty + uno::Sequence< beans::NamedValue > aEncryptionData = InitStd97Codec( aCtx, aDocId, *pMedium ); + if ( aEncryptionData.getLength() && aCtx.VerifyKey( aSaltData, aSaltHash ) ) { nErrRet = 0; @@ -4782,17 +4855,13 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss) DecryptRC4(aCtx, *pDataStream, aDecryptData); pDataStream = &aDecryptData; } - SfxMedium* pMedium = mpDocShell->GetMedium(); - if ( pMedium ) - { - SfxItemSet* pSet = pMedium->GetItemSet(); - if ( pSet ) - pSet->Put( SfxStringItem(SID_PASSWORD, sUniPassword) ); - } + + pMedium->GetItemSet()->ClearItem( SID_PASSWORD ); + pMedium->GetItemSet()->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ) ); } } + break; } - break; } if (nErrRet == 0) diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 7ee43e688a..648f9f865f 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -40,6 +40,7 @@ #include <editeng/boxitem.hxx> #include <editeng/lrspitem.hxx> #include <editeng/fhgtitem.hxx> +#include <editeng/fhgtitem.hxx> #include <editeng/hyznitem.hxx> #include <editeng/frmdiritem.hxx> #include <editeng/langitem.hxx> @@ -1961,7 +1962,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) : default: ; } - aSprmIter.advance(); + aSprmIter++; } if( !nLoop ) diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 966e6e6b0d..2d2b0826a0 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -96,6 +96,7 @@ #include <xmloff/odffields.hxx> #include <stdio.h> +#include <algorithm> using namespace com::sun::star; using namespace sw::util; @@ -2211,7 +2212,6 @@ void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich, break; case 0: //unchecked nChecked = false; - break; default: OSL_ENSURE(!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 7500453e1d..c793fd2c49 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -85,7 +85,7 @@ #include <fmtclds.hxx> #include <pagedesc.hxx> #include <SwStyleNameMapper.hxx> - +#include <IMark.hxx> #include "ww8scan.hxx" // WW8FieldDesc #include "ww8par.hxx" #include "ww8par2.hxx" @@ -2958,6 +2958,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr ) } #endif + if (pF->nLRes < 3) return FLD_TEXT; // ignore (#i25440#) @@ -3485,6 +3486,7 @@ eF_ResT SwWW8ImplReader::Read_F_Hyperlink( WW8FieldDesc* /*pF*/, String& rStr ) } #endif + String sURL, sTarget, sMark; bool bDataImport = false; //HYPERLINk "filename" [switches] diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 894962d413..4ecb00e357 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -45,6 +45,7 @@ #include <editeng/crsditem.hxx> #include <editeng/postitem.hxx> #include <editeng/wghtitem.hxx> +#include <editeng/adjitem.hxx> #include <editeng/colritem.hxx> #include <editeng/brshitem.hxx> #include <editeng/spltitem.hxx> diff --git a/sw/source/filter/xml/makefile.mk b/sw/source/filter/xml/makefile.mk deleted file mode 100644 index 10a653fc7a..0000000000 --- a/sw/source/filter/xml/makefile.mk +++ /dev/null @@ -1,76 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=xml - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(mydebug)" != "" -CDEFS=$(CDEFS) -Dmydebug -.ENDIF - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - $(SLO)$/xmlimpit.obj \ - $(SLO)$/xmlitemm.obj \ - $(SLO)$/xmlitmpr.obj - -EXCEPTIONSFILES= \ - $(SLO)$/XMLRedlineImportHelper.obj \ - $(SLO)$/swxml.obj \ - $(SLO)$/wrtxml.obj \ - $(SLO)$/xmlbrsh.obj \ - $(SLO)$/xmlexp.obj \ - $(SLO)$/xmlexpit.obj \ - $(SLO)$/xmlfmt.obj \ - $(SLO)$/xmlfmte.obj \ - $(SLO)$/xmlfonte.obj \ - $(SLO)$/xmlimp.obj \ - $(SLO)$/xmlitem.obj \ - $(SLO)$/xmliteme.obj \ - $(SLO)$/xmlitemi.obj \ - $(SLO)$/xmlithlp.obj \ - $(SLO)$/xmlmeta.obj \ - $(SLO)$/xmlscript.obj \ - $(SLO)$/xmltble.obj \ - $(SLO)$/xmltbli.obj \ - $(SLO)$/xmltext.obj \ - $(SLO)$/xmltexte.obj \ - $(SLO)$/xmltexti.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index 82df5d4c6c..e48ed20363 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -245,10 +245,10 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass ) for( sal_uInt16 j=0; j < nWhichIds; j++ ) { sal_uInt16 nWhichId = aWhichIds[j]; - sal_uInt16 i=0, nItems = rPool.GetItemCount( nWhichId ); + sal_uInt32 i=0, nItems = rPool.GetItemCount2( nWhichId ); for( i = 0; i < nItems; ++i ) { - if( 0 != (pItem = rPool.GetItem( nWhichId , i ) ) ) + if( 0 != (pItem = rPool.GetItem2( nWhichId , i ) ) ) { const SvXMLAttrContainerItem *pUnknown = PTR_CAST( SvXMLAttrContainerItem, pItem ); diff --git a/sw/source/filter/xml/xmlfonte.cxx b/sw/source/filter/xml/xmlfonte.cxx index c86306cfa8..ebc004f873 100644 --- a/sw/source/filter/xml/xmlfonte.cxx +++ b/sw/source/filter/xml/xmlfonte.cxx @@ -81,10 +81,10 @@ SwXMLFontAutoStylePool_Impl::SwXMLFontAutoStylePool_Impl( Add( rFont.GetFamilyName(), rFont.GetStyleName(), static_cast< sal_uInt16 >(rFont.GetFamily()), static_cast< sal_uInt16 >(rFont.GetPitch()), rFont.GetCharSet() ); - sal_uInt16 nItems = rPool.GetItemCount( nWhichId ); - for( sal_uInt16 j = 0; j < nItems; ++j ) + sal_uInt32 nItems = rPool.GetItemCount2( nWhichId ); + for( sal_uInt32 j = 0; j < nItems; ++j ) { - if( 0 != (pItem = rPool.GetItem( nWhichId, j ) ) ) + if( 0 != (pItem = rPool.GetItem2( nWhichId, j ) ) ) { const SvxFontItem *pFont = (const SvxFontItem *)pItem; diff --git a/sw/source/filter/xml/xmliteme.cxx b/sw/source/filter/xml/xmliteme.cxx index c69da83f7b..565c69c63b 100644 --- a/sw/source/filter/xml/xmliteme.cxx +++ b/sw/source/filter/xml/xmliteme.cxx @@ -41,7 +41,7 @@ #include "xmlbrshe.hxx" #include <editeng/tstpitem.hxx> #include <editeng/brshitem.hxx> -#include <vcl/fldunit.hxx> +#include <tools/fldunit.hxx> #include <swmodule.hxx> #include <doc.hxx> #include "fmtornt.hxx" diff --git a/sw/source/filter/xml/xmlitemi.cxx b/sw/source/filter/xml/xmlitemi.cxx index 34f93d8131..dab53a3bfc 100644 --- a/sw/source/filter/xml/xmlitemi.cxx +++ b/sw/source/filter/xml/xmlitemi.cxx @@ -44,6 +44,7 @@ #include <editeng/boxitem.hxx> #include <editeng/fontitem.hxx> #include <editeng/tstpitem.hxx> +#include <editeng/boxitem.hxx> #include <editeng/brshitem.hxx> #include <editeng/langitem.hxx> diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx index b8e4d1cba8..c56aaa7748 100644 --- a/sw/source/filter/xml/xmltble.cxx +++ b/sw/source/filter/xml/xmltble.cxx @@ -2,7 +2,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,7 +83,7 @@ class SwXMLTableColumn_Impl : public SwWriteTableCol public: - SwXMLTableColumn_Impl( sal_uInt16 nPosition ) : + SwXMLTableColumn_Impl( sal_uInt32 nPosition ) : SwWriteTableCol( nPosition ), nRelWidth( 0UL ) {}; @@ -138,7 +138,7 @@ SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) : nWidth( 0UL ) { #if OSL_DEBUG_LEVEL > 1 - sal_uInt16 nEndCPos = 0U; + sal_uInt32 nEndCPos = 0U; #endif sal_uInt16 nLines = rLines.Count(); sal_uInt16 nLine; @@ -148,14 +148,14 @@ SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) : const SwTableBoxes& rBoxes = pLine->GetTabBoxes(); sal_uInt16 nBoxes = rBoxes.Count(); - sal_uInt16 nCPos = 0U; + sal_uInt32 nCPos = 0U; for( sal_uInt16 nBox=0U; nBox<nBoxes; nBox++ ) { const SwTableBox *pBox = rBoxes[nBox]; if( nBox < nBoxes-1U || nWidth==0UL ) { - nCPos = nCPos + (sal_uInt16)SwWriteTable::GetBoxWidth( pBox ); + nCPos = nCPos + SwWriteTable::GetBoxWidth( pBox ); SwXMLTableColumn_Impl *pCol = new SwXMLTableColumn_Impl( nCPos ); @@ -172,16 +172,16 @@ SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) : else { #if OSL_DEBUG_LEVEL > 1 - sal_uInt16 nCheckPos = - nCPos + (sal_uInt16)SwWriteTable::GetBoxWidth( pBox ); + sal_uInt32 nCheckPos = + nCPos + SwWriteTable::GetBoxWidth( pBox ); if( !nEndCPos ) { nEndCPos = nCheckPos; } #endif - nCPos = (sal_uInt16)nWidth; + nCPos = nWidth; #if OSL_DEBUG_LEVEL > 1 - SwXMLTableColumn_Impl aCol( (sal_uInt16)nWidth ); + SwXMLTableColumn_Impl aCol( nWidth ); OSL_ENSURE( aCols.Seek_Entry(&aCol), "couldn't find last column" ); OSL_ENSURE( SwXMLTableColumn_Impl(nCheckPos) == SwXMLTableColumn_Impl(nCPos), @@ -593,13 +593,13 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines, // pass 2: export column styles { const SwXMLTableColumns_Impl& rCols = pLines->GetColumns(); - sal_uInt16 nCPos = 0U; + sal_uInt32 nCPos = 0U; sal_uInt16 nColumns = rCols.Count(); for( sal_uInt16 nColumn=0U; nColumn<nColumns; nColumn++ ) { SwXMLTableColumn_Impl *pColumn = rCols[nColumn]; - sal_uInt16 nOldCPos = nCPos; + sal_uInt32 nOldCPos = nCPos; nCPos = pColumn->GetPos(); sal_uInt32 nWidth = nCPos - nOldCPos; @@ -625,7 +625,7 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines, nColAbsWidth += (nBaseWidth/2UL); nColAbsWidth /= nBaseWidth; } - pColumn->SetWidthOpt( (sal_uInt16)nColAbsWidth, sal_False ); + pColumn->SetWidthOpt( nColAbsWidth, sal_False ); } ULONG nExpPos = 0; @@ -669,16 +669,16 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines, const SwTableBoxes& rBoxes = pLine->GetTabBoxes(); sal_uInt16 nBoxes = rBoxes.Count(); - sal_uInt16 nCPos = 0U; + sal_uInt32 nCPos = 0U; sal_uInt16 nCol = 0U; for( sal_uInt16 nBox=0U; nBox<nBoxes; nBox++ ) { SwTableBox *pBox = rBoxes[nBox]; if( nBox < nBoxes-1U ) - nCPos = nCPos + (sal_uInt16)SwWriteTable::GetBoxWidth( pBox ); + nCPos = nCPos + SwWriteTable::GetBoxWidth( pBox ); else - nCPos = (sal_uInt16)pLines->GetWidth(); + nCPos = pLines->GetWidth(); // Und ihren Index @@ -952,7 +952,7 @@ void SwXMLExport::ExportTableLine( const SwTableLine& rLine, const SwTableBoxes& rBoxes = rLine.GetTabBoxes(); sal_uInt16 nBoxes = rBoxes.Count(); - sal_uInt16 nCPos = 0U; + sal_uInt32 nCPos = 0U; sal_uInt16 nCol = 0U; for( sal_uInt16 nBox=0U; nBox<nBoxes; nBox++ ) { @@ -968,9 +968,9 @@ void SwXMLExport::ExportTableLine( const SwTableLine& rLine, } if( nBox < nBoxes-1U ) - nCPos = nCPos + (sal_uInt16)SwWriteTable::GetBoxWidth( pBox ); + nCPos = nCPos + SwWriteTable::GetBoxWidth( pBox ); else - nCPos = (sal_uInt16)rLines.GetWidth(); + nCPos = rLines.GetWidth(); // Und ihren Index const sal_uInt16 nOldCol = nCol; diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 3f5ccf0cb6..2bc60604e8 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -1534,14 +1534,14 @@ void SwXMLTableContext::InsertColumn( sal_Int32 nWidth2, sal_Bool bRelWidth2, else if( nWidth2 > USHRT_MAX ) nWidth2 = USHRT_MAX; aColumnWidths.Insert( (sal_uInt16)nWidth2, aColumnWidths.Count() ); - aColumnRelWidths.Insert( bRelWidth2, aColumnRelWidths.Count() ); + aColumnRelWidths.push_back( bRelWidth2 ); if( (pDfltCellStyleName && pDfltCellStyleName->getLength() > 0) || pColumnDefaultCellStyleNames ) { if( !pColumnDefaultCellStyleNames ) { pColumnDefaultCellStyleNames = new SvStringsDtor; - sal_uInt16 nCount = aColumnRelWidths.Count() - 1; + size_t nCount = aColumnRelWidths.size() - 1; while( nCount-- ) pColumnDefaultCellStyleNames->Insert( new String, pColumnDefaultCellStyleNames->Count() ); @@ -1644,7 +1644,7 @@ void SwXMLTableContext::InsertCell( const OUString& rStyleName, for( i=GetColumnCount(); i<nColsReq; i++ ) { aColumnWidths.Insert( MINLAY, aColumnWidths.Count() ); - aColumnRelWidths.Insert( sal_True, aColumnRelWidths.Count() ); + aColumnRelWidths.push_back( sal_True ); } // adjust columns in *all* rows, if columns must be inserted for( i=0; i<pRows->Count(); i++ ) diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx index bf07daf9bf..2becd710c2 100644 --- a/sw/source/ui/app/appenv.cxx +++ b/sw/source/ui/app/appenv.cxx @@ -171,7 +171,7 @@ void SwModule::InsertEnv( SfxRequest& rReq ) pOldSh = pMyDocSh ? pMyDocSh->GetWrtShell() : 0; // Create new document (don't show!) - SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); + SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xDocSh->DoInitNew( 0 ); pFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 ); pNewView = (SwView*) pFrame->GetViewShell(); diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index 4676f13bcd..d59efd6af9 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -939,7 +939,7 @@ void NewXForms( SfxRequest& rReq ) // copied & excerpted from SwModule::InsertLab(..) // create new document - SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD) ); + SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD) ); xDocSh->DoInitNew( 0 ); // initialize XForms diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx index b86ac5100c..81770c64a4 100644 --- a/sw/source/ui/app/applab.cxx +++ b/sw/source/ui/app/applab.cxx @@ -201,7 +201,7 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel) aLabCfg.Commit(); // Create new document - SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD)); + SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD)); xDocSh->DoInitNew( 0 ); // Printer diff --git a/sw/source/ui/app/appopt.cxx b/sw/source/ui/app/appopt.cxx index 3fb282426e..6234667e54 100644 --- a/sw/source/ui/app/appopt.cxx +++ b/sw/source/ui/app/appopt.cxx @@ -28,14 +28,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" -#include <hintids.hxx> -#include <cmdid.h> // Funktion-Ids - -#include <com/sun/star/i18n/ScriptType.hpp> #define _SVSTDARR_STRINGSDTOR #include <svl/svstdarr.hxx> +#include <com/sun/star/i18n/ScriptType.hpp> + +#include <hintids.hxx> +#include <cmdid.h> // Funktion-Ids #include <vcl/msgbox.hxx> #include <svl/eitem.hxx> #include <sfx2/request.hxx> @@ -55,6 +55,7 @@ #include <edtwin.hxx> #include <swmodule.hxx> #include <view.hxx> +#include <doc.hxx> #include <wrtsh.hxx> #include <IDocumentDeviceAccess.hxx> #include <uitool.hxx> @@ -71,7 +72,6 @@ #include <editeng/langitem.hxx> #include <unotools/lingucfg.hxx> #include <editeng/unolingu.hxx> - #include <globals.hrc> #include <globals.h> // globale Konstanten z.B. #include <svl/slstitm.hxx> @@ -274,8 +274,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) /*--------------------------------------------------------------------- Seite Dokumentansicht auswerten -----------------------------------------------------------------------*/ - if( SFX_ITEM_SET == rSet.GetItemState( - FN_PARAM_DOCDISP, FALSE, &pItem )) + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_DOCDISP, FALSE, &pItem )) { const SwDocDisplayItem* pDocDispItem = (const SwDocDisplayItem*)pItem; @@ -304,16 +303,14 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) Elemente - Item auswerten -----------------------------------------------------------------------*/ - if( SFX_ITEM_SET == rSet.GetItemState( - FN_PARAM_ELEM, FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ELEM, FALSE, &pItem ) ) { const SwElemItem* pElemItem = (const SwElemItem*)pItem; pElemItem->FillViewOptions( aViewOpt ); } - if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_METRIC, - FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_METRIC, FALSE, &pItem ) ) { SFX_APP()->SetOptions(rSet); const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem; @@ -338,8 +335,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) pAppView->ChangeTabMetric(eUnit); } - if( SFX_ITEM_SET == rSet.GetItemState(FN_VSCROLL_METRIC, - FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState(FN_VSCROLL_METRIC, FALSE, &pItem ) ) { const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem; FieldUnit eUnit = (FieldUnit)pMetricItem->GetValue(); @@ -348,8 +344,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) pAppView->ChangeVLinealMetric(eUnit); } - if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, - FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, FALSE, &pItem ) ) { USHORT nTabDist = ((const SfxUInt16Item*)pItem)->GetValue(); pPref->SetDefTab(nTabDist); @@ -376,8 +371,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) Seite Rastereinstellungen auswerten ----------------------------------------------------------------------*/ - if( SFX_ITEM_SET == rSet.GetItemState( - SID_ATTR_GRID_OPTIONS, FALSE, &pItem )) + if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS, FALSE, &pItem )) { const SvxGridItem* pGridItem = (const SvxGridItem*)pItem; @@ -407,8 +401,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) // Writer Drucker Zusatzeinstellungen auswerten //---------------------------------------------------------------------------- - if( SFX_ITEM_SET == rSet.GetItemState( - FN_PARAM_ADDPRINTER, FALSE, &pItem )) + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, FALSE, &pItem )) { SwPrintOptions* pOpt = GetPrtOptions(!bTextDialog); if (pOpt) @@ -422,24 +415,32 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) } - if( SFX_ITEM_SET == rSet.GetItemState( - FN_PARAM_SHADOWCURSOR, FALSE, &pItem )) + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem )) { ((SwShadowCursorItem*)pItem)->FillViewOptions( aViewOpt ); if(pBindings) pBindings->Invalidate(FN_SHADOWCURSOR); } - if( SFX_ITEM_SET == rSet.GetItemState( - FN_PARAM_CRSR_IN_PROTECTED, FALSE, &pItem )) + if( pAppView ) + { + SwWrtShell &rWrtSh = pAppView->GetWrtShell(); + const bool bAlignFormulas = rWrtSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ); + pPref->SetAlignMathObjectsToBaseline( bAlignFormulas ); + + // don't align formulas in documents that are currently loading + if (bAlignFormulas && !rWrtSh.GetDoc()->IsInReading()) + rWrtSh.AlignAllFormulasToBaseline(); + } + + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, FALSE, &pItem )) { aViewOpt.SetCursorInProtectedArea(((const SfxBoolItem*)pItem)->GetValue()); } // dann an der akt. View und Shell die entsp. Elemente setzen - ApplyUsrPref( aViewOpt, pAppView, - bTextDialog? VIEWOPT_DEST_TEXT : VIEWOPT_DEST_WEB); + ApplyUsrPref( aViewOpt, pAppView, bTextDialog? VIEWOPT_DEST_TEXT : VIEWOPT_DEST_WEB); } SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemSet& rSet ) @@ -535,6 +536,15 @@ SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemS if ( fnCreatePage ) pRet = (*fnCreatePage)( pParent, rSet ); } + if (pRet && (nId == RID_SW_TP_OPTSHDWCRSR || nId == RID_SW_TP_HTML_OPTSHDWCRSR)) + { + SwView* pCurrView = GetView(); + if(pCurrView) + { + aSet.Put( SwWrtShellItem( SID_WRT_SHELL, pCurrView->GetWrtShellPtr() ) ); + pRet->PageCreated(aSet); + } + } } break; #if OSL_DEBUG_LEVEL > 1 @@ -580,5 +590,4 @@ SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemS } - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index ab1401af8c..1d43298d58 100644 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -66,7 +66,7 @@ #include <fmtfld.hxx> #include <node.hxx> #include <swwait.hxx> -#include <swprtopt.hxx> +#include <printdata.hxx> #include <frmatr.hxx> #include <view.hxx> // fuer die aktuelle Sicht #include <edtwin.hxx> @@ -209,20 +209,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, return 0; } } - if(rMedium.IsStorage()) - { - const SfxItemSet* pSet = rMedium.GetItemSet(); - const SfxPoolItem *pItem; - if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, TRUE, &pItem)) - { - OSL_ENSURE(pItem->IsA( TYPE(SfxStringItem) ), "Wrong parameter type"); - comphelper::OStorageHelper::SetCommonStoragePassword( rMedium.GetStorage(), ((const SfxStringItem *)pItem)->GetValue() ); - } - // Fuer's Dokument-Einfuegen noch die FF-Version, wenn's der - // eigene Filter ist. - OSL_ENSURE( /*pRead != ReadSw3 || */pRead != ReadXML || pFlt->GetVersion(), - "No FF version set in filter" ); - } + // #i30171# set the UpdateDocMode at the SwDocShell SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False); nUpdateDocMode = pUpdateDocItem ? pUpdateDocItem->GetValue() : document::UpdateDocMode::NO_UPDATE; @@ -470,7 +457,9 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium ) // will set the wrong class id. SvGlobalName aClassName; String aAppName, aLongUserName, aUserName; - SfxObjectShellRef xDocSh = + + // The document is closed explicitly, but using SfxObjectShellLock is still more correct here + SfxObjectShellLock xDocSh = new SwGlobalDocShell( SFX_CREATE_MODE_INTERNAL ); // the global document can not be a template xDocSh->SetupStorage( xStor, SotStorage::GetVersion( xStor ), sal_False ); @@ -699,25 +688,6 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium ) GetDoc()->set(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS, bIsGlblDocSaveLinksSave); } - if( bRet && nMyType != nSaveType ) - { - SvGlobalName aClassName; - String aAppName, aLongUserName, aUserName; - SfxObjectShellRef xDocSh; - switch( nSaveType ) - { - case 0: - xDocSh = new SwDocShell( SFX_CREATE_MODE_INTERNAL ); - break; - case 1: - xDocSh = new SwWebDocShell( SFX_CREATE_MODE_INTERNAL ); - break; - case 2: - xDocSh = new SwGlobalDocShell( SFX_CREATE_MODE_INTERNAL ); - break; - } - } - return bRet; } @@ -755,6 +725,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium ) // #i106906# const sal_Bool bFormerLockView = pWrtShell->IsViewLocked(); pWrtShell->LockView( sal_True ); + // <-- pWrtShell->StartAllAction(); pWrtShell->Push(); SwWriter aWrt( rMedium, *pWrtShell, TRUE ); @@ -767,6 +738,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium ) pWrtShell->EndAllAction(); // #i106906# pWrtShell->LockView( bFormerLockView ); + // <-- } } else @@ -871,7 +843,7 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup, pDev->SetLineColor(); pDev->SetBackground(); BOOL bWeb = 0 != PTR_CAST(SwWebDocShell, this); - SwPrtOptions aOpts( aEmptyStr ); + SwPrintData aOpts; ViewShell::PrtOle2( pDoc, SW_MOD()->GetUsrPref(bWeb), aOpts, pDev, aRect ); pDev->Pop(); @@ -1081,6 +1053,23 @@ void SwDocShell::GetState(SfxItemSet& rSet) rSet.Put( SvxFontListItem( pFontList, SID_ATTR_CHAR_FONTLIST ) ); } break; + case SID_MAIL_PREPAREEXPORT: + { + //check if linked content or possibly hidden content is available + //pDoc->UpdateFlds( NULL, false ); + sfx2::LinkManager& rLnkMgr = pDoc->GetLinkManager(); + const ::sfx2::SvBaseLinks& rLnks = rLnkMgr.GetLinks(); + sal_Bool bRet = sal_False; + if( rLnks.Count() ) + bRet = sal_True; + else + { + //sections with hidden flag, hidden character attribute, hidden paragraph/text or conditional text fields + bRet = pDoc->HasInvisibleContent(); + } + rSet.Put( SfxBoolItem( nWhich, bRet ) ); + } + break; default: OSL_ENSURE(!this,"You cannot get here!"); diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index 553b95d215..2a6056945d 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -2,7 +2,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 @@ -114,6 +114,8 @@ #include <com/sun/star/script/vba/XVBAEventProcessor.hpp> #include <com/sun/star/script/vba/VBAEventId.hpp> #include <editeng/acorrcfg.hxx> +#endif +#include <editeng/acorrcfg.hxx> #include <SwStyleNameMapper.hxx> #include <sfx2/fcontnr.hxx> @@ -197,6 +199,8 @@ void lcl_processCompatibleSfxHint( const uno::Reference< script::vba::XVBAEventP } } } +} +#endif /*-------------------------------------------------------------------- Beschreibung: Benachrichtigung bei geaenderter DocInfo @@ -303,7 +307,7 @@ USHORT SwDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing ) } } return nRet; -} +} /*-------------------------------------------------------------------- Beschreibung: Organizer @@ -962,7 +966,7 @@ void SwDocShell::Execute(SfxRequest& rReq) BYTE nLevel = pDlg->GetLevel(); BYTE nPara = pDlg->GetPara(); SwDoc* pSmryDoc = new SwDoc(); - SfxObjectShellRef xDocSh( new SwDocShell( pSmryDoc, SFX_CREATE_MODE_STANDARD)); + SfxObjectShellLock xDocSh( new SwDocShell( pSmryDoc, SFX_CREATE_MODE_STANDARD)); xDocSh->DoInitNew( 0 ); BOOL bImpress = FN_ABSTRACT_STARIMPRESS == nWhich; @@ -1158,7 +1162,19 @@ void SwDocShell::Execute(SfxRequest& rReq) } break; - case SID_MAIL_EXPORT_FINISHED: + case SID_MAIL_PREPAREEXPORT: + { + //pWrtShell is not set in page preview + if(pWrtShell) + pWrtShell->StartAllAction(); + pDoc->UpdateFlds( NULL, false ); + pDoc->EmbedAllLinks(); + pDoc->RemoveInvisibleContent(); + if(pWrtShell) + pWrtShell->EndAllAction(); + } + break; + case SID_MAIL_EXPORT_FINISHED: { if(pWrtShell) pWrtShell->StartAllAction(); @@ -1189,6 +1205,7 @@ void SwDocShell::Execute(SfxRequest& rReq) if ( !aFileName.Len() ) { FileDialogHelper aDlgHelper( TemplateDescription::FILESAVE_AUTOEXTENSION_TEMPLATE, 0 ); + //set HelpIds const sal_Int16 nControlIds[] = { CommonFilePickerElementIds::PUSHBUTTON_OK, @@ -1208,8 +1225,32 @@ void SwDocShell::Execute(SfxRequest& rReq) nHelpIds[nHelp] = nStartHelpId++; nHelpIds[7] = 0; - aDlgHelper.SetControlHelpIds( nControlIds, nHelpIds ); + const char* aHTMLHelpIds[] = + { + HID_SEND_HTML_CTRL_PUSHBUTTON_OK, + HID_SEND_HTML_CTRL_PUSHBUTTON_CANCEL, + HID_SEND_HTML_CTRL_LISTBOX_FILTER, + HID_SEND_HTML_CTRL_CONTROL_FILEVIEW, + HID_SEND_HTML_CTRL_EDIT_FILEURL, + HID_SEND_HTML_CTRL_CHECKBOX_AUTOEXTENSION, + HID_SEND_HTML_CTRL_LISTBOX_TEMPLATE, + "" + }; + + const char* aMasterHelpIds[] = + { + HID_SEND_MASTER_CTRL_PUSHBUTTON_OK, + HID_SEND_MASTER_CTRL_PUSHBUTTON_CANCEL, + HID_SEND_MASTER_CTRL_LISTBOX_FILTER, + HID_SEND_MASTER_CTRL_CONTROL_FILEVIEW, + HID_SEND_MASTER_CTRL_EDIT_FILEURL, + HID_SEND_MASTER_CTRL_CHECKBOX_AUTOEXTENSION, + HID_SEND_MASTER_CTRL_LISTBOX_TEMPLATE, + "" + }; + const char** pHelpIds = bCreateHtml ? aHTMLHelpIds : aMasterHelpIds; + aDlgHelper.SetControlHelpIds( nControlIds, pHelpIds ); uno::Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker(); const SfxFilter* pFlt; diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx index a3d72763bc..21a8d21e9d 100644 --- a/sw/source/ui/app/docshini.cxx +++ b/sw/source/ui/app/docshini.cxx @@ -200,21 +200,15 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) if(!pStdFont->IsFontDefault(nFontId)) { sEntry = pStdFont->GetFontFor(nFontId); - sal_Bool bDelete = sal_False; - const SfxFont* pFnt = pPrt ? pPrt->GetFontByName(sEntry): 0; - if(!pFnt) + + Font aFont( sEntry, Size( 0, 10 ) ); + if( pPrt ) { - pFnt = new SfxFont( FAMILY_DONTKNOW, sEntry, PITCH_DONTKNOW, - ::gsl_getSystemTextEncoding() ); - bDelete = sal_True; - } - pFontItem = new SvxFontItem(pFnt->GetFamily(), pFnt->GetName(), - aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich); - if(bDelete) - { - delete (SfxFont*) pFnt; - bDelete = sal_False; + aFont = pPrt->GetFontMetric( aFont ); } + + pFontItem = new SvxFontItem(aFont.GetFamily(), aFont.GetName(), + aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich); } else { @@ -293,25 +287,18 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) if(!pStdFont->IsFontDefault(aFontIdPoolId[nIdx])) { sEntry = pStdFont->GetFontFor(aFontIdPoolId[nIdx]); - sal_Bool bDelete = sal_False; - const SfxFont* pFnt = pPrt ? pPrt->GetFontByName(sEntry): 0; - if(!pFnt) - { - pFnt = new SfxFont( FAMILY_DONTKNOW, sEntry, PITCH_DONTKNOW, - ::gsl_getSystemTextEncoding() ); - bDelete = sal_True; - } + + Font aFont( sEntry, Size( 0, 10 ) ); + if( pPrt ) + aFont = pPrt->GetFontMetric( aFont ); + pColl = pDoc->GetTxtCollFromPool(aFontIdPoolId[nIdx + 1]); if( !bHTMLTemplSet || SFX_ITEM_SET != pColl->GetAttrSet().GetItemState( nFontWhich, sal_False ) ) { - pColl->SetFmtAttr(SvxFontItem(pFnt->GetFamily(), pFnt->GetName(), - aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich)); - } - if(bDelete) - { - delete (SfxFont*) pFnt; + pColl->SetFmtAttr(SvxFontItem(aFont.GetFamily(), aFont.GetName(), + aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); } } sal_Int32 nFontHeight = pStdFont->GetFontHeight( static_cast< sal_Int8 >(aFontIdPoolId[nIdx]), 0, eLanguage ); @@ -326,6 +313,12 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) pColl->SetFmtAttr( aFontHeight ); } } + + // the default for documents created via 'File/New' should be 'on' + // (old documents, where this property was not yet implemented, will get the + // value 'false' in the SwDoc c-tor) + pDoc->set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT, + SW_MOD()->GetUsrPref( bWeb )->IsAlignMathObjectsToBaseline() ); } /* #106748# If the default frame direction of a document is RTL @@ -779,4 +772,4 @@ IDocumentDeviceAccess* SwDocShell::getIDocumentDeviceAccess() { return pDoc; } const IDocumentSettingAccess* SwDocShell::getIDocumentSettingAccess() const { return pDoc; } IDocumentChartDataProviderAccess* SwDocShell::getIDocumentChartDataProviderAccess() { return pDoc; } -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/sw/source/ui/app/makefile.mk b/sw/source/ui/app/makefile.mk deleted file mode 100644 index 6048ad2ce8..0000000000 --- a/sw/source/ui/app/makefile.mk +++ /dev/null @@ -1,95 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=app - -LIBTARGET=NO - -# future: DEMO\... - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES =\ - app.src \ - mn.src \ - error.src - - -SLOFILES = \ - $(EXCEPTIONSFILES) - -EXCEPTIONSFILES= \ - $(SLO)$/appenv.obj \ - $(SLO)$/apphdl.obj \ - $(SLO)$/applab.obj \ - $(SLO)$/appopt.obj \ - $(SLO)$/docsh.obj \ - $(SLO)$/docsh2.obj \ - $(SLO)$/docshdrw.obj \ - $(SLO)$/docshini.obj \ - $(SLO)$/docst.obj \ - $(SLO)$/docstyle.obj \ - $(SLO)$/mainwn.obj \ - $(SLO)$/swdll.obj \ - $(SLO)$/swmodul1.obj \ - $(SLO)$/swmodule.obj \ - $(SLO)$/swwait.obj - -LIB1TARGET= $(SLB)$/app.lib - -LIB1OBJFILES= \ - $(SLO)$/appenv.obj \ - $(SLO)$/apphdl.obj \ - $(SLO)$/applab.obj \ - $(SLO)$/appopt.obj \ - $(SLO)$/docsh.obj \ - $(SLO)$/docsh2.obj \ - $(SLO)$/docshdrw.obj \ - $(SLO)$/docshini.obj \ - $(SLO)$/docst.obj \ - $(SLO)$/docstyle.obj \ - $(SLO)$/mainwn.obj \ - $(SLO)$/swmodul1.obj \ - $(SLO)$/swwait.obj - - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -$(SRS)$/app.srs: $(SOLARINCDIR)$/svx$/globlmn.hrc - diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src index a252388251..10f49b03ba 100644 --- a/sw/source/ui/app/mn.src +++ b/sw/source/ui/app/mn.src @@ -25,7 +25,351 @@ * ************************************************************************/ -#include "swmn.hrc" +#include <svx/dialogs.hrc> +#include <svx/globlmn.hrc> +#include "cmdid.h" +#include "app.hrc" +#include "globals.hrc" +#include "helpid.h" +#include "popup.hrc" + +#if 0 + +/* --------------------- F O R M A T --------------------------------- */ +#define SEPARATOR MenuItem { Separator = TRUE; } +//define for ITEM_FORMAT_NUMBERING +#define DEFINE_SLOTID_FOR_NUMBER_BULLETS FN_NUMBER_BULLETS +#define MN_NUMBERING ITEM_FORMAT_NUMBERING + +#define MN_TXT\ + MenuItem\ + {\ + ITEM_FORMAT_CHAR_DLG\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_PARA_DLG\ + };\ + MenuItem\ + {\ + Identifier = FN_FORMAT_PAGE_DLG ; \ + HelpId = CMD_FN_FORMAT_PAGE_DLG ; \ + Text [ en-US ] = "Pa~ge..." ; \ + }; + + +#define MN_TEXT_ATTR\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_FONT\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_FONTHEIGHT\ + };\ + MenuItem\ + {\ + Identifier = MN_FORMAT_STYLE ; \ + Command = ".uno:StyleMenu" ; \ + Text [ en-US ] = "St~yle" ; \ + SubMenu = Menu\ + {\ + ItemList = \ + {\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_WEIGHT\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_POSTURE\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_OVERLINE\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_UNDERLINE\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_STRIKEOUT\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_SHADOWED\ + };\ + MenuItem\ + {\ + ITEM_FORMAT_ATTR_CHAR_CONTOUR\ + };\ + SEPARATOR ; \ + MenuItem\ + {\ + Identifier = FN_SET_SUPER_SCRIPT ; \ + HelpId = CMD_FN_SET_SUPER_SCRIPT ; \ + Text [ en-US ] = "Superscript" ; \ + };\ + MenuItem\ + {\ + Identifier = FN_SET_SUB_SCRIPT ; \ + HelpId = CMD_FN_SET_SUB_SCRIPT ; \ + Text [ en-US ] = "Subscript" ; \ + };\ + };\ + };\ + };\ + MenuItem\ + {\ + Identifier = MN_FORMAT_ALGN ; \ + Command = ".uno:AlignTextMenu" ; \ + Text [ en-US ] = "A~lignment" ; \ + SubMenu = Menu\ + {\ + ItemList = \ + {\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_ATTR_PARA_ADJUST_LEFT\ + };\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_ATTR_PARA_ADJUST_RIGHT\ + };\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_ATTR_PARA_ADJUST_CENTER\ + };\ + MenuItem\ + {\ + Identifier = SID_ATTR_PARA_ADJUST_BLOCK ; \ + HelpId = CMD_SID_ATTR_PARA_ADJUST_BLOCK ; \ + RadioCheck = TRUE ; \ + Text [ en-US ] = "Justified" ; \ + };\ + };\ + };\ + };\ + MenuItem\ + {\ + Identifier = MN_FORMAT_LINESPACE ; \ + Command = ".uno:LineSpacingMenu" ; \ + Text [ en-US ] = "Line Spacing" ; \ + _MenuItemFlags = MIB_RADIOCHECK ; \ + SubMenu = Menu\ + {\ + ItemList = \ + {\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_PARA_LINESPACE_10\ + };\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_PARA_LINESPACE_15\ + };\ + MenuItem\ + {\ + RadioCheck = TRUE ; \ + ITEM_FORMAT_PARA_LINESPACE_20\ + };\ + };\ + };\ + }; + +/* --------------------- M E N U --------------------------------- */ + +/* + + +The application menu bar resource has become obsolete. You can now find the menu bar at the following +location: <project>/uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml + + +*/ + +/* --------------------- D O C U M E N T -------------------------- */ + + +#define _MN_EDIT_FIELD \ + MenuItem \ + { \ + Identifier = FN_EDIT_FIELD ; \ + HelpId = CMD_FN_EDIT_FIELD ; \ + Text [ en-US ] = "Fields..." ; \ + }; +#define _MN_EDIT_FOOTNOTE \ + MenuItem \ + { \ + Identifier = FN_EDIT_FOOTNOTE ; \ + HelpId = CMD_FN_EDIT_FOOTNOTE ; \ + Text [ en-US ] = "Footnote/Endnote~..." ; \ + }; + #define _MN_EDIT_IDX_ENTRY_DLG \ + MenuItem \ + { \ + Identifier = FN_EDIT_IDX_ENTRY_DLG ; \ + HelpId = CMD_FN_EDIT_IDX_ENTRY_DLG ; \ + Text [ en-US ] = "Inde~x Entry..." ; \ + }; + +#define _MN_EDIT_REDLINE \ + MenuItem \ + { \ + Identifier = FN_REDLINE_ACCEPT_DIRECT; \ + HelpId = CMD_FN_REDLINE_ACCEPT_DIRECT ; \ + Text [ en-US ] = "Accept Change" ; \ + };\ + MenuItem \ + { \ + Identifier = FN_REDLINE_REJECT_DIRECT ; \ + HelpId = CMD_FN_REDLINE_REJECT_DIRECT ; \ + Text [ en-US ] = "Reject Change" ; \ + }; \ + SEPARATOR ; +#define _MN_EDIT_BIB_ENTRY_DLG \ + MenuItem \ + { \ + Identifier = FN_EDIT_AUTH_ENTRY_DLG ; \ + HelpId = CMD_FN_EDIT_AUTH_ENTRY_DLG ; \ + Text [ en-US ] = "~Bibliography Entry..."; \ + }; \ + SEPARATOR ; + +#define _MN_EDIT_OPEN_HYPERLINK \ + MenuItem \ + { \ + ITEM_OPEN_HYPERLINK \ + };\ + MenuItem \ + { \ + Identifier = FN_EDIT_HYPERLINK ; \ + HelpId = CMD_FN_EDIT_HYPERLINK ; \ + Text [ en-US ] = "Edit Hyperlink..."; \ + }; \ + MenuItem \ + { \ + Identifier = FN_COPY_HYPERLINK_LOCATION; \ + HelpId = CMD_FN_COPY_HYPERLINK_LOCATION; \ + Text [ en-US ] = "Copy Hyperlink ~Location"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_REMOVE_HYPERLINK ; \ + HelpId = CMD_FN_REMOVE_HYPERLINK ; \ + Text [ en-US ] = "Remo~ve Hyperlink"; \ + }; + +#define _MN_EDIT_OPEN_SMARTTAGMENU \ + MenuItem \ + { \ + ITEM_OPEN_SMARTTAGMENU \ + }; + +#define _MN_EDIT__HYPERLINK \ + MenuItem\ + {\ + Identifier = FN_EDIT_HYPERLINK ; \ + HelpId = CMD_FN_EDIT_HYPERLINK ; \ + Text [ en-US ] = "~Edit Hyperlink" ; \ + }; + +#define _DEFAULT_TEXT_EDIT_ELEMENTS \ + _MN_EDIT_FIELD \ + _MN_EDIT_FOOTNOTE \ + _MN_EDIT_IDX_ENTRY_DLG \ + _MN_EDIT_BIB_ENTRY_DLG \ + _MN_EDIT_REDLINE \ + MenuItem \ + { \ + ITEM_POPUP_TEMPLATE_EDIT \ + }; \ + SEPARATOR ; \ + _MN_EDIT_OPEN_HYPERLINK \ + _MN_EDIT_OPEN_SMARTTAGMENU + + +#define MN_RESET\ + MenuItem\ + {\ + Identifier = FN_FORMAT_RESET ; \ + HelpId = CMD_FN_FORMAT_RESET ; \ + Text [ en-US ] = "~Default Formatting" ; \ + }; + +#define _NUMBERING_RELATED_MENU \ + SEPARATOR ; \ + MenuItem \ + { \ + Identifier = FN_NUMBER_NEWSTART; \ + HelpId = CMD_FN_NUMBER_NEWSTART; \ + Text[ en-US ] = "Restart Numbering"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_NUM_CONTINUE; \ + HelpId = CMD_FN_NUM_CONTINUE; \ + Text[ en-US ] = "Continue previous numbering"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_NUM_BULLET_UP; \ + HelpId = CMD_FN_NUM_BULLET_UP; \ + Text[ en-US ] = "Up One Level"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_NUM_BULLET_DOWN; \ + HelpId = CMD_FN_NUM_BULLET_DOWN; \ + Text[ en-US ] = "Down One Level"; \ + }; + +#define BASE_TEXT_POPUPMENU_BEGIN \ +{ \ + ItemList = \ + { \ + MN_RESET \ + _NUMBERING_RELATED_MENU \ + SEPARATOR ; \ + MN_TEXT_ATTR \ + SEPARATOR ; \ + MN_TXT \ + MN_NUMBERING \ + ITEM_TRANSLITERATE_MENU \ + SEPARATOR ; + +// not in Writer/Web +#define BASE_TEXT_POPUPMENU_NOWEB \ + MenuItem \ + { \ + Identifier = FN_UPDATE_CUR_TOX ; \ + HelpId = CMD_FN_UPDATE_CUR_TOX ; \ + Text [ en-US ] = "~Update Index/Table"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_EDIT_CURRENT_TOX; \ + HelpId = CMD_FN_EDIT_CURRENT_TOX; \ + Text [ en-US ] = "~Edit Index/Table"; \ + }; \ + MenuItem \ + { \ + Identifier = FN_REMOVE_CUR_TOX; \ + HelpId = CMD_FN_REMOVE_CUR_TOX; \ + Text [ en-US ] = "Delete Index/Table"; \ + }; \ + SEPARATOR ; + +#define BASE_TEXT_POPUPMENU_END \ + _DEFAULT_TEXT_EDIT_ELEMENTS \ + }; \ +}; /*------------------------------------------------------------------------ Beschreibung: Menu Window @@ -35,7 +379,7 @@ MenuItem\ {\ Identifier = FN_INSERT_CAPTION ;\ - HelpID = FN_INSERT_CAPTION ;\ + HelpId = CMD_FN_INSERT_CAPTION ;\ Text [ en-US ] = "~Caption..." ;\ }; @@ -43,31 +387,30 @@ MenuItem\ {\ Identifier = FN_FORMAT_TABLE_DLG ; \ - HelpID = FN_FORMAT_TABLE_DLG ; \ + HelpId = CMD_FN_FORMAT_TABLE_DLG ; \ Text [ en-US ] = "~Table..." ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_MERGE_TABLE ; \ - HelpID = FN_TABLE_MERGE_TABLE ; \ + HelpId = CMD_FN_TABLE_MERGE_TABLE ; \ Text [ en-US ] = "Merge Tables";\ };\ MenuItem\ {\ Identifier = FN_TABLE_SPLIT_TABLE ; \ - HelpID = FN_TABLE_SPLIT_TABLE ; \ + HelpId = CMD_FN_TABLE_SPLIT_TABLE ; \ Text [ en-US ] = "~Split Table" ; \ };\ MenuItem\ {\ Identifier = FN_NUM_FORMAT_TABLE_DLG ; \ - HelpID = FN_NUM_FORMAT_TABLE_DLG ; \ + HelpId = CMD_FN_NUM_FORMAT_TABLE_DLG ; \ Text [ en-US ] = "N~umber Format..." ; \ };\ MenuItem\ {\ Identifier = MN_CELL ; \ - HelpID = MN_CELL ; \ Command = ".uno:CellMenu" ; \ Text [ en-US ] = "~Cell" ; \ SubMenu = Menu\ @@ -77,45 +420,45 @@ MenuItem\ {\ Identifier = FN_TABLE_MERGE_CELLS ; \ - HelpID = FN_TABLE_MERGE_CELLS ; \ + HelpId = CMD_FN_TABLE_MERGE_CELLS ; \ Text [ en-US ] = "~Merge" ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_SPLIT_CELLS ; \ - HelpID = FN_TABLE_SPLIT_CELLS ; \ + HelpId = CMD_FN_TABLE_SPLIT_CELLS ; \ Text [ en-US ] = "~Split..." ; \ };\ SEPARATOR ; \ MenuItem\ {\ Identifier = FN_TABLE_VERT_NONE ; \ - HelpID = FN_TABLE_VERT_NONE ; \ + HelpId = CMD_FN_TABLE_VERT_NONE ; \ Text [ en-US ] = "~Top" ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_VERT_CENTER ; \ - HelpID = FN_TABLE_VERT_CENTER ; \ + HelpId = CMD_FN_TABLE_VERT_CENTER ; \ Text [ en-US ] = "C~enter" ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_VERT_BOTTOM ; \ - HelpID = FN_TABLE_VERT_BOTTOM ; \ + HelpId = CMD_FN_TABLE_VERT_BOTTOM ; \ Text [ en-US ] = "~Bottom" ; \ };\ SEPARATOR ; \ MenuItem\ {\ Identifier = FN_TABLE_SET_READ_ONLY_CELLS ; \ - HelpID = FN_TABLE_SET_READ_ONLY_CELLS ; \ + HelpId = CMD_FN_TABLE_SET_READ_ONLY_CELLS ; \ Text [ en-US ] = "~Protect" ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_UNSET_READ_ONLY_CELLS ; \ - HelpID = FN_TABLE_UNSET_READ_ONLY_CELLS ; \ + HelpId = CMD_FN_TABLE_UNSET_READ_ONLY_CELLS ; \ Text [ en-US ] = "~Unprotect" ; \ };\ };\ @@ -136,44 +479,44 @@ MenuItem\ {\ Identifier = FN_TABLE_SET_ROW_HEIGHT ; \ - HelpID = FN_TABLE_SET_ROW_HEIGHT ; \ + HelpId = CMD_FN_TABLE_SET_ROW_HEIGHT ; \ Text [ en-US ] = "~Height..." ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_ROW_SPLIT;\ - HelpID = FN_TABLE_ROW_SPLIT ; \ + HelpId = CMD_FN_TABLE_ROW_SPLIT ; \ Text [ en-US ] = "Allow Row to Break A~cross Pages and Columns" ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_OPTIMAL_HEIGHT ; \ - HelpID = FN_TABLE_OPTIMAL_HEIGHT ; \ + HelpId = CMD_FN_TABLE_OPTIMAL_HEIGHT ; \ Text [ en-US ] = "~Optimal Height" ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_BALANCE_ROWS ; \ - HelpID = FN_TABLE_BALANCE_ROWS ; \ + HelpId = CMD_FN_TABLE_BALANCE_ROWS ; \ Text [ en-US ] = "Space ~Equally" ; \ };\ SEPARATOR ; \ MenuItem\ {\ Identifier = FN_TABLE_SELECT_ROW ; \ - HelpID = FN_TABLE_SELECT_ROW ; \ + HelpId = CMD_FN_TABLE_SELECT_ROW ; \ Text [ en-US ] = "~Select" ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_INSERT_ROW_DLG ; \ - HelpID = FN_TABLE_INSERT_ROW_DLG ; \ + HelpId = CMD_FN_TABLE_INSERT_ROW_DLG ; \ Text [ en-US ] = "~Insert..." ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_DELETE_ROW ; \ - HelpID = FN_TABLE_DELETE_ROW ; \ + HelpId = CMD_FN_TABLE_DELETE_ROW ; \ Text [ en-US ] = "~Delete" ; \ };\ };\ @@ -192,38 +535,38 @@ MenuItem\ {\ Identifier = FN_TABLE_SET_COL_WIDTH ; \ - HelpID = FN_TABLE_SET_COL_WIDTH ; \ + HelpId = CMD_FN_TABLE_SET_COL_WIDTH ; \ Text [ en-US ] = "~Width..." ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_ADJUST_CELLS ; \ - HelpID = FN_TABLE_ADJUST_CELLS ; \ + HelpId = CMD_FN_TABLE_ADJUST_CELLS ; \ Text [ en-US ] = "~Optimal Width " ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_BALANCE_CELLS ; \ - HelpID = FN_TABLE_BALANCE_CELLS ; \ + HelpId = CMD_FN_TABLE_BALANCE_CELLS ; \ Text [ en-US ] = "Space ~Equally" ; \ };\ SEPARATOR ; \ MenuItem\ {\ Identifier = FN_TABLE_SELECT_COL ; \ - HelpID = FN_TABLE_SELECT_COL ; \ + HelpId = CMD_FN_TABLE_SELECT_COL ; \ Text [ en-US ] = "~Select" ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_INSERT_COL_DLG ; \ - HelpID = FN_TABLE_INSERT_COL_DLG ; \ + HelpId = CMD_FN_TABLE_INSERT_COL_DLG ; \ Text [ en-US ] = "~Insert..." ; \ };\ MenuItem\ {\ Identifier = FN_TABLE_DELETE_COL ; \ - HelpID = FN_TABLE_DELETE_COL ; \ + HelpId = CMD_FN_TABLE_DELETE_COL ; \ Text [ en-US ] = "~Delete" ; \ };\ };\ @@ -244,7 +587,7 @@ MenuItem\ {\ Identifier = FN_DRAWTEXT_ATTR_DLG ; \ - HelpID = FN_DRAWTEXT_ATTR_DLG ; \ + HelpId = CMD_FN_DRAWTEXT_ATTR_DLG ; \ Text [ en-US ] = "Te~xt..." ; \ }; @@ -252,7 +595,7 @@ MenuItem\ {\ Identifier = FN_NAME_SHAPE ; \ - HelpID = FN_NAME_SHAPE ; \ + HelpId = CMD_FN_NAME_SHAPE ; \ Text [ en-US ] = "Name..." ; \ }; @@ -260,7 +603,7 @@ MenuItem\ {\ Identifier = FN_TITLE_DESCRIPTION_SHAPE; \ - HelpID = FN_TITLE_DESCRIPTION_SHAPE; \ + HelpId = CMD_FN_TITLE_DESCRIPTION_SHAPE; \ Text [ en-US ] = "Description..." ; \ }; @@ -268,7 +611,7 @@ MenuItem\ {\ Identifier = FN_FORMAT_FRAME_DLG ; \ - HelpID = FN_FORMAT_FRAME_DLG ; \ + HelpId = CMD_FN_FORMAT_FRAME_DLG ; \ Text [ en-US ] = "~Frame..." ; \ }; @@ -323,13 +666,13 @@ MenuItem\ {\ Identifier = FN_FRAME_UP ; \ - HelpID = FN_FRAME_UP ; \ + HelpId = CMD_FN_FRAME_UP ; \ Text [ en-US ] = "Bring ~Forward" ; \ };\ MenuItem\ {\ Identifier = FN_FRAME_DOWN ; \ - HelpID = FN_FRAME_DOWN ; \ + HelpId = CMD_FN_FRAME_DOWN ; \ Text [ en-US ] = "Send Back~ward" ; \ }; @@ -409,45 +752,45 @@ MenuItem\ {\ Identifier = FN_REPLY ;\ - HelpID = FN_DELETE_NOTE ;\ + HelpID = CMD_FN_REPLY ;\ Text [ en-US ] = "Reply" ;\ };\ SEPARATOR ; \ MenuItem\ {\ - Identifier = FN_DELETE_NOTE ;\ - HelpID = FN_DELETE_NOTE ;\ + Identifier = FN_DELETE_COMMENT ;\ + HelpID = CMD_FN_DELETE_COMMENT ;\ Text [ en-US ] = "Delete ~Comment" ;\ };\ MenuItem\ {\ Identifier = FN_DELETE_NOTE_AUTHOR ;\ - HelpID = FN_DELETE_NOTE_AUTHOR ;\ + HelpId = CMD_FN_DELETE_NOTE_AUTHOR ;\ Text [ en-US ] = "Delete ~All Comments by $1" ;\ };\ MenuItem\ {\ Identifier = FN_DELETE_ALL_NOTES ;\ - HelpID = FN_DELETE_ALL_NOTES ;\ + HelpId = CMD_FN_DELETE_ALL_NOTES ;\ Text [ en-US ] = "~Delete All Comments" ;\ };\ /* MenuItem\ {\ Identifier = FN_HIDE_NOTE ;\ - HelpID = FN_HIDE_NOTE ;\ + HelpId = CMD_FN_HIDE_NOTE ;\ Text [ en-US ] = "~Hide comment" ;\ };\ MenuItem\ {\ Identifier = FN_HIDE_NOTE_AUTHOR ;\ - HelpID = FN_HIDE_NOTE_AUTHOR ;\ + HelpId = CMD_FN_HIDE_NOTE_AUTHOR ;\ Text [ en-US ] = "Hide ~author" ;\ };\ MenuItem\ {\ Identifier = FN_HIDE_ALL_NOTES ;\ - HelpID = FN_HIDE_ALL_NOTES ;\ + HelpId = CMD_FN_HIDE_ALL_NOTES ;\ Text [ en-US ] = "Hide all ~comments" ;\ }; */ @@ -490,13 +833,13 @@ Menu MN_TAB_POPUPMENU MenuItem { Identifier = FN_VIEW_TABLEGRID ; - HelpID = FN_VIEW_TABLEGRID ; + HelpId = CMD_FN_VIEW_TABLEGRID ; Text [ en-US ] = "Table Boundaries" ; }; MenuItem { Identifier = FN_SET_MODOPT_TBLNUMFMT ; - HelpID = FN_SET_MODOPT_TBLNUMFMT ; + HelpId = CMD_FN_SET_MODOPT_TBLNUMFMT ; Text [ en-US ] = "~Number Recognition"; }; SEPARATOR ; @@ -508,7 +851,7 @@ Menu MN_TAB_POPUPMENU MenuItem\ {\ Identifier = FN_FRAME_WRAP_CONTOUR ; \ - HelpID = FN_FRAME_WRAP_CONTOUR ; \ + HelpId = CMD_FN_FRAME_WRAP_CONTOUR ; \ Text [ en-US ] = "~Contour" ; \ }; @@ -516,7 +859,7 @@ Menu MN_TAB_POPUPMENU MenuItem\ {\ Identifier = SID_CONTOUR_DLG ; \ - HelpID = SID_CONTOUR_DLG ; \ + HelpId = CMD_SID_CONTOUR_DLG ; \ Text [ en-US ] = "~Edit Contour..." ; \ }; @@ -527,7 +870,6 @@ Menu MN_TAB_POPUPMENU MenuItem\ {\ Identifier = MN_WRAP ; \ - HelpID = MN_WRAP ; \ Command = ".uno:WrapMenu" ; \ Text [ en-US ] = "~Wrap" ; \ SubMenu = Menu\ @@ -538,35 +880,35 @@ Menu MN_TAB_POPUPMENU {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_NOWRAP ; \ - HelpID = FN_FRAME_NOWRAP ; \ + HelpId = CMD_FN_FRAME_NOWRAP ; \ Text [ en-US ] = "~No Wrap" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_WRAP ; \ - HelpID = FN_FRAME_WRAP ; \ + HelpId = CMD_FN_FRAME_WRAP ; \ Text [ en-US ] = "~Page Wrap" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_WRAP_IDEAL ; \ - HelpID = FN_FRAME_WRAP_IDEAL ; \ + HelpId = CMD_FN_FRAME_WRAP_IDEAL ; \ Text [ en-US ] = "~Optimal Page Wrap" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_WRAPTHRU ; \ - HelpID = FN_FRAME_WRAPTHRU ; \ + HelpId = CMD_FN_FRAME_WRAPTHRU ; \ Text [ en-US ] = "~Wrap Through" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_WRAPTHRU_TRANSP ; \ - HelpID = FN_FRAME_WRAPTHRU_TRANSP ; \ + HelpId = CMD_FN_FRAME_WRAPTHRU_TRANSP ; \ Text [ en-US ] = "In ~Background" ; \ };\ SEPARATOR ; \ @@ -576,7 +918,7 @@ Menu MN_TAB_POPUPMENU {\ Checkable = TRUE ; \ Identifier = FN_WRAP_ANCHOR_ONLY ; \ - HelpID = FN_WRAP_ANCHOR_ONLY ; \ + HelpId = CMD_FN_WRAP_ANCHOR_ONLY ; \ Text [ en-US ] = "~First Paragraph" ; \ };\ };\ @@ -594,7 +936,6 @@ String MN_DRAW_POPUPMENU MenuItem\ {\ Identifier = MN_WRAP ; \ - HelpID = MN_WRAP ; \ Command = ".uno:WrapMenu" ; \ SubMenu = Menu\ {\ @@ -604,35 +945,35 @@ String MN_DRAW_POPUPMENU {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_NOWRAP ; \ - HelpID = FN_FRAME_NOWRAP ; \ + HelpId = CMD_FN_FRAME_NOWRAP ; \ Text [ en-US ] = "~No Wrap" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_WRAP ; \ - HelpID = FN_FRAME_WRAP ; \ + HelpId = CMD_FN_FRAME_WRAP ; \ Text [ en-US ] = "~Page Wrap" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_WRAP_IDEAL ; \ - HelpID = FN_FRAME_WRAP_IDEAL ; \ + HelpId = CMD_FN_FRAME_WRAP_IDEAL ; \ Text [ en-US ] = "~Optimal Page Wrap" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_WRAPTHRU ; \ - HelpID = FN_FRAME_WRAPTHRU ; \ + HelpId = CMD_FN_FRAME_WRAPTHRU ; \ Text [ en-US ] = "~Wrap Through" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_FRAME_WRAPTHRU_TRANSP ; \ - HelpID = FN_FRAME_WRAPTHRU_TRANSP ; \ + HelpId = CMD_FN_FRAME_WRAPTHRU_TRANSP ; \ Text [ en-US ] = "In ~Background" ; \ };\ SEPARATOR ; \ @@ -641,14 +982,14 @@ String MN_DRAW_POPUPMENU {\ Checkable = TRUE ; \ Identifier = FN_WRAP_ANCHOR_ONLY ; \ - HelpID = FN_WRAP_ANCHOR_ONLY ; \ + HelpId = CMD_FN_WRAP_ANCHOR_ONLY ; \ Text [ en-US ] = "~First Paragraph" ; \ };\ SEPARATOR ; \ MenuItem\ {\ Identifier = FN_DRAW_WRAP_DLG ; \ - HelpID = FN_DRAW_WRAP_DLG ; \ + HelpId = CMD_FN_DRAW_WRAP_DLG ; \ Text [ en-US ] = "~Edit..." ; \ };\ };\ @@ -667,7 +1008,7 @@ String MN_DRAW_POPUPMENU {\ RadioCheck = TRUE ; \ Identifier = FN_TOOL_ANKER_FRAME ; \ - HelpID = FN_TOOL_ANKER_FRAME ; \ + HelpId = CMD_FN_TOOL_ANKER_FRAME ; \ Text [ en-US ] = "To ~Frame" ; \ }; @@ -675,7 +1016,7 @@ String MN_DRAW_POPUPMENU MenuItem\ {\ Identifier = FN_TOOL_ANKER ; \ - HelpID = FN_TOOL_ANKER ; \ + HelpId = CMD_FN_TOOL_ANKER ; \ Command = ".uno:AnchorMenu" ; \ Text [ en-US ] = "An~chor" ; \ SubMenu = Menu\ @@ -686,28 +1027,28 @@ String MN_DRAW_POPUPMENU {\ RadioCheck = TRUE ; \ Identifier = FN_TOOL_ANKER_PAGE ; \ - HelpID = FN_TOOL_ANKER_PAGE ; \ + HelpId = CMD_FN_TOOL_ANKER_PAGE ; \ Text [ en-US ] = "To P~age" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_TOOL_ANKER_PARAGRAPH ; \ - HelpID = FN_TOOL_ANKER_PARAGRAPH ; \ + HelpId = CMD_FN_TOOL_ANKER_PARAGRAPH ; \ Text [ en-US ] = "To ~Paragraph" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_TOOL_ANKER_AT_CHAR ; \ - HelpID = FN_TOOL_ANKER_AT_CHAR ; \ + HelpId = CMD_FN_TOOL_ANKER_AT_CHAR ; \ Text [ en-US ] = "To ~Character" ; \ };\ MenuItem\ {\ RadioCheck = TRUE ; \ Identifier = FN_TOOL_ANKER_CHAR ; \ - HelpID = FN_TOOL_ANKER_CHAR ; \ + HelpId = CMD_FN_TOOL_ANKER_CHAR ; \ Text [ en-US ] = "As C~haracter" ; \ };\ MN_AT_FRAME\ @@ -793,7 +1134,7 @@ Menu MN_DRWTXT_POPUPMENU MenuItem\ {\ Identifier = FN_DELETE_COMMENT ;\ - HelpID = FN_DELETE_COMMENT ;\ + HelpId = CMD_FN_DELETE_COMMENT ;\ Text [ en-US ] = "Delete ~Changes Note" ;\ };\ @@ -870,7 +1211,6 @@ String MN_GRF_POPUPMENU MenuItem\ {\ Identifier = MN_FORMAT_FRM_HORZ ; \ - HelpID = MN_FORMAT_FRM_HORZ ; \ Command = ".uno:AlignFrameMenu" ; \ SubMenu = Menu\ {\ @@ -879,38 +1219,38 @@ String MN_GRF_POPUPMENU MenuItem\ {\ Identifier = FN_FRAME_ALIGN_HORZ_LEFT ; \ - HelpID = FN_FRAME_ALIGN_HORZ_LEFT ; \ + HelpId = CMD_FN_FRAME_ALIGN_HORZ_LEFT ; \ Text [ en-US ] = "~Left" ; \ };\ MenuItem\ {\ Identifier = FN_FRAME_ALIGN_HORZ_CENTER ; \ - HelpID = FN_FRAME_ALIGN_HORZ_CENTER ; \ + HelpId = CMD_FN_FRAME_ALIGN_HORZ_CENTER ; \ Text [ en-US ] = "~Centered" ; \ };\ MenuItem\ {\ Identifier = FN_FRAME_ALIGN_HORZ_RIGHT ; \ - HelpID = FN_FRAME_ALIGN_HORZ_RIGHT ; \ + HelpId = CMD_FN_FRAME_ALIGN_HORZ_RIGHT ; \ Text [ en-US ] = "~Right" ; \ };\ SEPARATOR ; \ MenuItem\ {\ Identifier = FN_FRAME_ALIGN_VERT_TOP ; \ - HelpID = FN_FRAME_ALIGN_VERT_TOP ; \ + HelpId = CMD_FN_FRAME_ALIGN_VERT_TOP ; \ Text [ en-US ] = "Base at ~Top" ; \ };\ MenuItem\ {\ Identifier = FN_FRAME_ALIGN_VERT_CENTER ; \ - HelpID = FN_FRAME_ALIGN_VERT_CENTER ; \ + HelpId = CMD_FN_FRAME_ALIGN_VERT_CENTER ; \ Text [ en-US ] = "Base in ~Middle" ; \ };\ MenuItem\ {\ Identifier = FN_FRAME_ALIGN_VERT_BOTTOM ; \ - HelpID = FN_FRAME_ALIGN_VERT_BOTTOM ; \ + HelpId = CMD_FN_FRAME_ALIGN_VERT_BOTTOM ; \ Text [ en-US ] = "Base at ~Bottom" ; \ };\ };\ @@ -931,13 +1271,13 @@ Menu MN_GRF_POPUPMENU MenuItem { Identifier = FN_FORMAT_GRAFIC_DLG ; - HelpID = FN_FORMAT_GRAFIC_DLG ; + HelpId = CMD_FN_FORMAT_GRAFIC_DLG ; Text [ en-US ] = "~Picture..." ; }; MenuItem { Identifier = FN_SAVE_GRAPHIC; - HelpID = FN_SAVE_GRAPHIC; + HelpId = CMD_FN_SAVE_GRAPHIC; Text [ en-US ] = "Save Graphics..." ; }; MN_FRM_CAPTION_ITEM @@ -997,7 +1337,7 @@ Menu MN_OLE_POPUPMENU MenuItem { Identifier = FN_FORMAT_FRAME_DLG ; - HelpID = FN_FORMAT_FRAME_DLG ; + HelpId = CMD_FN_FORMAT_FRAME_DLG ; Text [ en-US ] = "Object..." ; }; SEPARATOR ; @@ -1040,13 +1380,13 @@ Menu MN_PPREVIEW_POPUPMENU MenuItem { Identifier = FN_PAGEUP ; - HelpID = FN_PAGEUP ; + HelpId = CMD_FN_PAGEUP ; Text [ en-US ] = "Previous Page" ; }; MenuItem { Identifier = FN_PAGEDOWN ; - HelpID = FN_PAGEDOWN ; + HelpId = CMD_FN_PAGEDOWN ; Text [ en-US ] = "Next Page" ; }; MenuItem @@ -1057,14 +1397,14 @@ Menu MN_PPREVIEW_POPUPMENU MenuItem { Identifier = FN_PRINT_PAGEPREVIEW ; - HelpID = FN_PRINT_PAGEPREVIEW ; + HelpId = CMD_FN_PRINT_PAGEPREVIEW ; Text [ en-US ] = "Print" ; }; SEPARATOR ; MenuItem { Identifier = SID_PRINTPREVIEW; - HelpID = SID_PRINTPREVIEW; + HelpId = CMD_SID_PRINTPREVIEW; Text [ en-US ] = "Close Preview" ; }; }; @@ -1102,3 +1442,5 @@ Menu MN_TEXT_POPUPMENU BASE_TEXT_POPUPMENU_NOWEB BASE_TEXT_POPUPMENU_END + +#endif diff --git a/sw/source/ui/cctrl/makefile.mk b/sw/source/ui/cctrl/makefile.mk deleted file mode 100644 index 9a72754367..0000000000 --- a/sw/source/ui/cctrl/makefile.mk +++ /dev/null @@ -1,59 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=cctrl - -AUTOSEG=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -CXXFILES = \ - actctrl.cxx \ - popbox.cxx \ - swlbox.cxx - -SLOFILES = \ - $(EXCEPTIONSFILES) - -EXCEPTIONSFILES = \ - $(SLO)$/actctrl.obj \ - $(SLO)$/popbox.obj \ - $(SLO)$/swlbox.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx index 933d67f7a3..76c6b79ed8 100644 --- a/sw/source/ui/chrdlg/break.cxx +++ b/sw/source/ui/chrdlg/break.cxx @@ -188,7 +188,7 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) : } String aFmtName; - for(i = RES_POOLPAGE_BEGIN; i <= RES_POOLPAGE_REGISTER; ++i) + for(i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i) if(LISTBOX_ENTRY_NOTFOUND == aPageCollBox.GetEntryPos( aFmtName = SwStyleNameMapper::GetUIName( i, aFmtName ))) ::InsertStringSorted(aFmtName, aPageCollBox, 1 ); diff --git a/sw/source/ui/chrdlg/ccoll.src b/sw/source/ui/chrdlg/ccoll.src index 14afc8bb69..4245782d15 100644 --- a/sw/source/ui/chrdlg/ccoll.src +++ b/sw/source/ui/chrdlg/ccoll.src @@ -44,6 +44,7 @@ TabPage TP_CONDCOLL }; CheckBox CB_CONDITION { + HelpID = "sw:CheckBox:TP_CONDCOLL:CB_CONDITION"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -83,6 +84,7 @@ TabPage TP_CONDCOLL }; ListBox LB_STYLE { + HelpID = "sw:ListBox:TP_CONDCOLL:LB_STYLE"; Pos = MAP_APPFONT ( 188 , 39 ) ; Size = MAP_APPFONT ( 60 , 108 ) ; TabStop = TRUE ; @@ -93,6 +95,7 @@ TabPage TP_CONDCOLL }; ListBox LB_FILTER { + HelpID = "sw:ListBox:TP_CONDCOLL:LB_FILTER"; Pos = MAP_APPFONT ( 188 , 150 ) ; Size = MAP_APPFONT ( 60 , 50 ) ; DropDown = TRUE ; @@ -103,6 +106,7 @@ TabPage TP_CONDCOLL }; PushButton PB_REMOVE { + HelpID = "sw:PushButton:TP_CONDCOLL:PB_REMOVE"; Pos = MAP_APPFONT ( 129 , 165 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; TabStop = TRUE ; @@ -111,6 +115,7 @@ TabPage TP_CONDCOLL }; PushButton PB_ASSIGN { + HelpID = "sw:PushButton:TP_CONDCOLL:PB_ASSIGN"; Pos = MAP_APPFONT ( 185 , 165 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/chrdlg/chardlg.src b/sw/source/ui/chrdlg/chardlg.src index e6a6a82729..ba39ec72a8 100644 --- a/sw/source/ui/chrdlg/chardlg.src +++ b/sw/source/ui/chrdlg/chardlg.src @@ -120,6 +120,7 @@ TabPage TP_CHAR_URL }; Edit ED_URL { + HelpID = "sw:Edit:TP_CHAR_URL:ED_URL"; Pos = MAP_APPFONT ( 88 , 15 ) ; Size = MAP_APPFONT ( 104 , 12 ) ; Border = TRUE ; @@ -127,6 +128,7 @@ TabPage TP_CHAR_URL }; PushButton PB_URL { + HelpID = "sw:PushButton:TP_CHAR_URL:PB_URL"; Pos = MAP_APPFONT ( 198 , 14 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -140,6 +142,7 @@ TabPage TP_CHAR_URL }; Edit ED_TEXT { + HelpID = "sw:Edit:TP_CHAR_URL:ED_TEXT"; Pos = MAP_APPFONT ( 88 , 31 ) ; Size = MAP_APPFONT ( 104 , 12 ) ; Border = TRUE ; @@ -154,6 +157,7 @@ TabPage TP_CHAR_URL }; Edit ED_NAME { + HelpID = "sw:Edit:TP_CHAR_URL:ED_NAME"; Pos = MAP_APPFONT ( 88 , 47 ) ; Size = MAP_APPFONT ( 104 , 12 ) ; Border = TRUE ; @@ -168,6 +172,7 @@ TabPage TP_CHAR_URL }; ComboBox LB_TARGET { + HelpID = "sw:ComboBox:TP_CHAR_URL:LB_TARGET"; Pos = MAP_APPFONT ( 88 , 63 ) ; Size = MAP_APPFONT ( 104 , 60 ) ; TabStop = TRUE ; @@ -177,6 +182,7 @@ TabPage TP_CHAR_URL }; PushButton PB_EVENT { + HelpID = "sw:PushButton:TP_CHAR_URL:PB_EVENT"; Pos = MAP_APPFONT ( 12 , 79 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -196,6 +202,7 @@ TabPage TP_CHAR_URL }; ListBox LB_VISITED { + HelpID = "sw:ListBox:TP_CHAR_URL:LB_VISITED"; Pos = MAP_APPFONT ( 88 , 113 ) ; Size = MAP_APPFONT ( 104 , 60 ) ; Border = TRUE ; @@ -212,6 +219,7 @@ TabPage TP_CHAR_URL }; ListBox LB_NOT_VISITED { + HelpID = "sw:ListBox:TP_CHAR_URL:LB_NOT_VISITED"; Pos = MAP_APPFONT ( 88 , 129 ) ; Size = MAP_APPFONT ( 104 , 60 ) ; Border = TRUE ; diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx index 9bc149cfb0..c84858e7a1 100644 --- a/sw/source/ui/chrdlg/drpcps.cxx +++ b/sw/source/ui/chrdlg/drpcps.cxx @@ -349,10 +349,10 @@ void SwDropCapsPict::DrawPrev( const Point& rPt ) Font aOldFont = mpPrinter->GetFont(); USHORT nScript; - USHORT nIdx = 0; + size_t nIdx = 0; xub_StrLen nStart = 0; xub_StrLen nEnd; - USHORT nCnt = maScriptChg.Count(); + size_t nCnt = maScriptChg.size(); if( nCnt ) { @@ -391,10 +391,10 @@ void SwDropCapsPict::CheckScript( void ) return; maScriptText = maText; - USHORT nCnt = maScriptChg.Count(); + size_t nCnt = maScriptChg.size(); if( nCnt ) { - maScriptChg.Remove( 0, nCnt ); + maScriptChg.clear(); maScriptType.Remove( 0, nCnt ); maTextWidth.Remove( 0, nCnt ); nCnt = 0; @@ -421,7 +421,7 @@ void SwDropCapsPict::CheckScript( void ) do { nChg = (xub_StrLen)xBreak->endOfScript( maText, nChg, nScript ); - maScriptChg.Insert( nChg, nCnt ); + maScriptChg.push_back( nChg ); maScriptType.Insert( nScript, nCnt ); maTextWidth.Insert( ULONG(0), nCnt++ ); @@ -438,10 +438,10 @@ Size SwDropCapsPict::CalcTextSize( void ) InitPrinter(); USHORT nScript; - USHORT nIdx = 0; + size_t nIdx = 0; xub_StrLen nStart = 0; xub_StrLen nEnd; - USHORT nCnt = maScriptChg.Count(); + size_t nCnt = maScriptChg.size(); if( nCnt ) { nEnd = maScriptChg[ nIdx ]; diff --git a/sw/source/ui/chrdlg/drpcps.src b/sw/source/ui/chrdlg/drpcps.src index 473deefe2e..c07085f9f9 100644 --- a/sw/source/ui/chrdlg/drpcps.src +++ b/sw/source/ui/chrdlg/drpcps.src @@ -58,12 +58,14 @@ TabPage TP_DROPCAPS Hide = TRUE ; CheckBox CB_SWITCH { + HelpID = "sw:CheckBox:TP_DROPCAPS:CB_SWITCH"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Text [ en-US ] = "Display drop caps" ; }; CheckBox CB_WORD { + HelpID = "sw:CheckBox:TP_DROPCAPS:CB_WORD"; Pos = MAP_APPFONT ( 12 , 28 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Text [ en-US ] = "~Whole word" ; @@ -76,6 +78,7 @@ TabPage TP_DROPCAPS }; NumericField FLD_DROPCAPS { + HelpID = "sw:NumericField:TP_DROPCAPS:FLD_DROPCAPS"; Border = TRUE ; First = 1 ; Last = 9 ; @@ -97,6 +100,7 @@ TabPage TP_DROPCAPS }; NumericField FLD_LINES { + HelpID = "sw:NumericField:TP_DROPCAPS:FLD_LINES"; Border = TRUE ; First = 2 ; Last = 9 ; @@ -118,6 +122,7 @@ TabPage TP_DROPCAPS }; MetricField FLD_DISTANCE { + HelpID = "sw:MetricField:TP_DROPCAPS:FLD_DISTANCE"; Border = TRUE ; DecimalDigits = 2 ; First = 0 ; @@ -154,6 +159,7 @@ TabPage TP_DROPCAPS }; Edit EDT_TEXT { + HelpID = "sw:Edit:TP_DROPCAPS:EDT_TEXT"; Border = TRUE ; Left = TRUE ; Pos = MAP_APPFONT ( 143 , 100 ) ; @@ -170,6 +176,7 @@ TabPage TP_DROPCAPS }; ListBox BOX_TEMPLATE { + HelpID = "sw:ListBox:TP_DROPCAPS:BOX_TEMPLATE"; Border = TRUE ; DropDown = TRUE ; Pos = MAP_APPFONT ( 143 , 116 ) ; diff --git a/sw/source/ui/chrdlg/makefile.mk b/sw/source/ui/chrdlg/makefile.mk deleted file mode 100644 index 8d8c3624b3..0000000000 --- a/sw/source/ui/chrdlg/makefile.mk +++ /dev/null @@ -1,72 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=chrdlg -LIBTARGET=NO -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - swbreak.src \ - chardlg.src \ - chrdlg.src \ - drpcps.src \ - ccoll.src \ - paradlg.src \ - numpara.src - -EXCEPTIONSFILES = \ - $(SLO)$/break.obj \ - $(SLO)$/ccoll.obj \ - $(SLO)$/chardlg.obj \ - $(SLO)$/drpcps.obj \ - $(SLO)$/numpara.obj \ - $(SLO)$/pardlg.obj \ - $(SLO)$/swuiccoll.obj \ - $(SLO)$/tblnumfm.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/ccoll.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/chrdlg/numpara.src b/sw/source/ui/chrdlg/numpara.src index df83af40ce..9d2e30a64c 100644 --- a/sw/source/ui/chrdlg/numpara.src +++ b/sw/source/ui/chrdlg/numpara.src @@ -50,6 +50,7 @@ TabPage TP_NUMPARA }; ListBox LB_OUTLINE_LEVEL { + HelpID = "sw:ListBox:TP_NUMPARA:LB_OUTLINE_LEVEL"; Pos = MAP_APPFONT ( 130 , 14 ) ; Size = MAP_APPFONT ( 118 , 65 ) ; DropDown = TRUE ; @@ -97,6 +98,7 @@ TabPage TP_NUMPARA }; ListBox LB_NUMBER_STYLE { + HelpID = "sw:ListBox:TP_NUMPARA:LB_NUMBER_STYLE"; Pos = MAP_APPFONT ( 130 , 41 ) ; Size = MAP_APPFONT ( 118 , 65 ) ; DropDown = TRUE ; @@ -108,6 +110,7 @@ TabPage TP_NUMPARA }; TriStateBox CB_NEW_START { + HelpID = "sw:TriStateBox:TP_NUMPARA:CB_NEW_START"; Pos = MAP_APPFONT ( 12 , 58 ) ; Size = MAP_APPFONT ( 160 , 10 ) ; Hide = TRUE ; @@ -116,6 +119,7 @@ TabPage TP_NUMPARA }; TriStateBox CB_NUMBER_NEW_START { + HelpID = "sw:TriStateBox:TP_NUMPARA:CB_NUMBER_NEW_START"; Pos = MAP_APPFONT ( 21 , 73 ) ; Size = MAP_APPFONT ( 103 , 10 ) ; Hide = TRUE ; @@ -124,6 +128,7 @@ TabPage TP_NUMPARA }; NumericField NF_NEW_START { + HelpID = "sw:NumericField:TP_NUMPARA:NF_NEW_START"; Border = TRUE ; Pos = MAP_APPFONT ( 130 , 72 ) ; Size = MAP_APPFONT ( 26 , 12 ) ; @@ -147,6 +152,7 @@ TabPage TP_NUMPARA }; TriStateBox CB_COUNT_PARA { + HelpID = "sw:TriStateBox:TP_NUMPARA:CB_COUNT_PARA"; Pos = MAP_APPFONT ( 12 , 100 ) ; Size = MAP_APPFONT ( 160 , 10 ) ; TabStop = TRUE ; @@ -154,6 +160,7 @@ TabPage TP_NUMPARA }; TriStateBox CB_RESTART_PARACOUNT { + HelpID = "sw:TriStateBox:TP_NUMPARA:CB_RESTART_PARACOUNT"; Pos = MAP_APPFONT ( 12 , 116 ) ; Size = MAP_APPFONT ( 160 , 10 ) ; TabStop = TRUE ; @@ -168,6 +175,7 @@ TabPage TP_NUMPARA }; NumericField NF_RESTART_PARA { + HelpID = "sw:NumericField:TP_NUMPARA:NF_RESTART_PARA"; Border = TRUE ; Pos = MAP_APPFONT ( 130 , 130 ) ; Size = MAP_APPFONT ( 26 , 12 ) ; diff --git a/sw/source/ui/chrdlg/swbreak.src b/sw/source/ui/chrdlg/swbreak.src index c626278748..1ed8491a31 100644 --- a/sw/source/ui/chrdlg/swbreak.src +++ b/sw/source/ui/chrdlg/swbreak.src @@ -32,7 +32,7 @@ // #define DLG_BREAK 256 ModalDialog DLG_BREAK { - HelpID = FN_INSERT_BREAK_DLG ; + HelpID = CMD_FN_INSERT_BREAK_DLG ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 161 , 114 ) ; @@ -63,6 +63,7 @@ ModalDialog DLG_BREAK }; RadioButton RB_LINE { + HelpID = "sw:RadioButton:DLG_BREAK:RB_LINE"; Pos = MAP_APPFONT ( 12 , 15 ) ; Size = MAP_APPFONT ( 63 , 10 ) ; Text [ en-US ] = "~Line break" ; @@ -71,6 +72,7 @@ ModalDialog DLG_BREAK }; RadioButton RB_PAGE { + HelpID = "sw:RadioButton:DLG_BREAK:RB_PAGE"; Pos = MAP_APPFONT ( 12 , 39 ) ; Size = MAP_APPFONT ( 63 , 10 ) ; Text [ en-US ] = "~Page break" ; @@ -79,6 +81,7 @@ ModalDialog DLG_BREAK }; RadioButton RB_COL { + HelpID = "sw:RadioButton:DLG_BREAK:RB_COL"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 69 , 10 ) ; Text [ en-US ] = "~Column break" ; @@ -100,6 +103,7 @@ ModalDialog DLG_BREAK }; ListBox LB_COLL { + HelpID = "sw:ListBox:DLG_BREAK:LB_COLL"; Pos = MAP_APPFONT ( 12 , 62 ) ; Size = MAP_APPFONT ( 75 , 50 ) ; TabStop = TRUE ; @@ -112,6 +116,7 @@ ModalDialog DLG_BREAK }; CheckBox CB_PAGENUM { + HelpID = "sw:CheckBox:DLG_BREAK:CB_PAGENUM"; Pos = MAP_APPFONT ( 12 , 79 ) ; Size = MAP_APPFONT ( 84 , 10 ) ; /* ### ACHTUNG: Neuer Text in Resource? Seitennummer ~ändern : Seitennummer ~õndern */ @@ -120,6 +125,7 @@ ModalDialog DLG_BREAK }; NumericField ED_PAGENUM { + HelpID = "sw:NumericField:DLG_BREAK:ED_PAGENUM"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 94 ) ; Size = MAP_APPFONT ( 31 , 12 ) ; diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx index 8112b6fdd1..adb75f9139 100644 --- a/sw/source/ui/chrdlg/swuiccoll.cxx +++ b/sw/source/ui/chrdlg/swuiccoll.cxx @@ -103,7 +103,7 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet) aStyleLB.SetSelectHdl( LINK(this, SwCondCollPage, SelectHdl)); aFilterLB.SetSelectHdl( LINK(this, SwCondCollPage, SelectHdl)); - aTbLinks.SetWindowBits(WB_HSCROLL|WB_CLIPCHILDREN); + aTbLinks.SetStyle(aTbLinks.GetStyle()|WB_HSCROLL|WB_CLIPCHILDREN); aTbLinks.SetSelectionMode( SINGLE_SELECTION ); aTbLinks.SetTabs( &nTabs[0], MAP_APPFONT ); aTbLinks.Resize(); // OS: Hack fuer richtige Selektion diff --git a/sw/source/ui/config/cfgitems.cxx b/sw/source/ui/config/cfgitems.cxx index 17e5786c57..a96c6a39fe 100644 --- a/sw/source/ui/config/cfgitems.cxx +++ b/sw/source/ui/config/cfgitems.cxx @@ -382,4 +382,4 @@ int SwTestItem::operator==( const SfxPoolItem& rAttr ) const -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx index 19de971f92..1775569e70 100644 --- a/sw/source/ui/config/mailconfigpage.cxx +++ b/sw/source/ui/config/mailconfigpage.cxx @@ -306,7 +306,7 @@ SwTestAccountSettingsDialog::SwTestAccountSettingsDialog(SwMailConfigPage* pPare m_aStatusLB.SetHelpId(HID_MM_TESTACCOUNTSETTINGS_TLB); static long nTabs[] = {2, 0, aSz.Width()/2 }; - m_aStatusLB.SetWindowBits( WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); + m_aStatusLB.SetStyle( m_aStatusLB.GetStyle() | WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); m_aStatusLB.SetSelectionMode( SINGLE_SELECTION ); m_aStatusLB.SetTabs(&nTabs[0], MAP_PIXEL); short nEntryHeight = m_aStatusLB.GetEntryHeight(); diff --git a/sw/source/ui/config/mailconfigpage.src b/sw/source/ui/config/mailconfigpage.src index 1c9f269d10..e5ffb3f73d 100644 --- a/sw/source/ui/config/mailconfigpage.src +++ b/sw/source/ui/config/mailconfigpage.src @@ -53,6 +53,7 @@ TabPage TP_MAILCONFIG }; Edit ED_DISPLAYNAME { + HelpID = "sw:Edit:TP_MAILCONFIG:ED_DISPLAYNAME"; Pos = MAP_APPFONT ( 88 , 14 ) ; Size = MAP_APPFONT ( 160 , 12 ) ; Border = TRUE; @@ -65,12 +66,14 @@ TabPage TP_MAILCONFIG }; Edit ED_ADDRESS { + HelpID = "sw:Edit:TP_MAILCONFIG:ED_ADDRESS"; Pos = MAP_APPFONT ( 88 , 29 ) ; Size = MAP_APPFONT ( 160 , 12 ) ; Border = TRUE; }; CheckBox CB_REPLYTO { + HelpID = "sw:CheckBox:TP_MAILCONFIG:CB_REPLYTO"; Pos = MAP_APPFONT ( 12 , 45 ) ; Size = MAP_APPFONT ( 242 , 10 ) ; Text[ en-US ] = "Send replies to ~different e-mail address"; @@ -83,6 +86,7 @@ TabPage TP_MAILCONFIG }; Edit ED_REPLYTO { + HelpID = "sw:Edit:TP_MAILCONFIG:ED_REPLYTO"; Pos = MAP_APPFONT ( 88 , 58 ) ; Size = MAP_APPFONT ( 160 , 12 ) ; Border = TRUE; @@ -101,6 +105,7 @@ TabPage TP_MAILCONFIG }; Edit ED_SERVER { + HelpID = "sw:Edit:TP_MAILCONFIG:ED_SERVER"; Pos = MAP_APPFONT ( 88 , 87 ) ; Size = MAP_APPFONT ( 105 , 12 ) ; Border = TRUE; @@ -114,6 +119,7 @@ TabPage TP_MAILCONFIG }; NumericField NF_PORT { + HelpID = "sw:NumericField:TP_MAILCONFIG:NF_PORT"; Pos = MAP_APPFONT ( 223 , 87 ) ; Size = MAP_APPFONT ( 25 , 12 ) ; Border = TRUE; @@ -127,12 +133,14 @@ TabPage TP_MAILCONFIG }; CheckBox CB_SECURE { + HelpID = "sw:CheckBox:TP_MAILCONFIG:CB_SECURE"; Pos = MAP_APPFONT ( 12 , 104 ) ; Size = MAP_APPFONT ( 242 , 10 ) ; Text[ en-US ] = "~Use secure connection (SSL)"; }; PushButton PB_AUTHENTICATION { + HelpID = "sw:PushButton:TP_MAILCONFIG:PB_AUTHENTICATION"; Pos = MAP_APPFONT ( 88 , 118 ) ; Size = MAP_APPFONT ( 105 , 14 ) ; Text[ en-US ] = "Server Au~thentication"; @@ -144,6 +152,7 @@ TabPage TP_MAILCONFIG }; PushButton PB_TEST { + HelpID = "sw:PushButton:TP_MAILCONFIG:PB_TEST"; Pos = MAP_APPFONT ( 88 , 164 ) ; Size = MAP_APPFONT ( 105 , 14 ) ; Text[ en-US ] = "Test S~ettings..."; @@ -179,6 +188,7 @@ ModalDialog DLG_MM_TESTACCOUNTSETTINGS }; MultiLineEdit ED_ERROR { + HelpID = "sw:MultiLineEdit:DLG_MM_TESTACCOUNTSETTINGS:ED_ERROR"; Pos = MAP_APPFONT ( 6 , 79 ) ; Size = MAP_APPFONT ( 238 , 60 ) ; Border = TRUE; @@ -191,6 +201,7 @@ ModalDialog DLG_MM_TESTACCOUNTSETTINGS }; PushButton PB_STOP { + HelpID = "sw:PushButton:DLG_MM_TESTACCOUNTSETTINGS:PB_STOP"; Pos = MAP_APPFONT ( 85 , 156 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "~Stop"; @@ -261,12 +272,14 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION CheckBox CB_AUTHENTICATION { + HelpID = "sw:CheckBox:DLG_MM_SERVERAUTHENTICATION:CB_AUTHENTICATION"; Pos = MAP_APPFONT ( 6 , 3 ) ; Size = MAP_APPFONT ( 238 , 10 ) ; Text[ en-US ] = "The outgoing mail server (SMTP) requires au~thentication"; }; RadioButton RB_SEP_AUTHENTICATION { + HelpID = "sw:RadioButton:DLG_MM_SERVERAUTHENTICATION:RB_SEP_AUTHENTICATION"; Pos = MAP_APPFONT ( 12 , 17 ) ; Size = MAP_APPFONT ( 232 , 10 ) ; Text[ en-US ] = "The outgoing mail server (SMTP) requires ~separate authentication"; @@ -285,6 +298,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; Edit ED_USERNAME { + HelpID = "sw:Edit:DLG_MM_SERVERAUTHENTICATION:ED_USERNAME"; Pos = MAP_APPFONT ( 78 , 42 ) ; Size = MAP_APPFONT ( 115 , 12 ) ; Border = TRUE; @@ -297,6 +311,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; Edit ED_OUTPASSWORD { + HelpID = "sw:Edit:DLG_MM_SERVERAUTHENTICATION:ED_OUTPASSWORD"; Pos = MAP_APPFONT ( 78 , 57 ) ; Size = MAP_APPFONT ( 115 , 12 ) ; Border = TRUE; @@ -304,6 +319,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; RadioButton RB_SMPTAFTERPOP { + HelpID = "sw:RadioButton:DLG_MM_SERVERAUTHENTICATION:RB_SMPTAFTERPOP"; Pos = MAP_APPFONT ( 12 , 73 ) ; Size = MAP_APPFONT ( 232 , 20 ) ; WordBreak = TRUE; @@ -323,6 +339,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; Edit ED_SERVER { + HelpID = "sw:Edit:DLG_MM_SERVERAUTHENTICATION:ED_SERVER"; Pos = MAP_APPFONT ( 78 , 108 ) ; Size = MAP_APPFONT ( 115 , 12 ) ; Border = TRUE; @@ -336,6 +353,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; NumericField NF_PORT { + HelpID = "sw:NumericField:DLG_MM_SERVERAUTHENTICATION:NF_PORT"; Pos = MAP_APPFONT ( 219 , 108 ) ; Size = MAP_APPFONT ( 25 , 12 ) ; Border = TRUE; @@ -355,12 +373,14 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; RadioButton RB_POP3 { + HelpID = "sw:RadioButton:DLG_MM_SERVERAUTHENTICATION:RB_POP3"; Pos = MAP_APPFONT ( 78 , 125 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text[ en-US ] = "~POP 3"; }; RadioButton RB_IMAP { + HelpID = "sw:RadioButton:DLG_MM_SERVERAUTHENTICATION:RB_IMAP"; Pos = MAP_APPFONT ( 78 , 138 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text[ en-US ] = "~IMAP"; @@ -373,6 +393,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; Edit ED_INUSERNAME { + HelpID = "sw:Edit:DLG_MM_SERVERAUTHENTICATION:ED_INUSERNAME"; Pos = MAP_APPFONT ( 78 , 150 ) ; Size = MAP_APPFONT ( 115 , 12 ) ; Border = TRUE; @@ -385,6 +406,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; Edit ED_INPASSWORD { + HelpID = "sw:Edit:DLG_MM_SERVERAUTHENTICATION:ED_INPASSWORD"; Pos = MAP_APPFONT ( 78 , 165 ) ; Size = MAP_APPFONT ( 115 , 12 ) ; Border = TRUE; diff --git a/sw/source/ui/config/makefile.mk b/sw/source/ui/config/makefile.mk deleted file mode 100644 index d624e466c8..0000000000 --- a/sw/source/ui/config/makefile.mk +++ /dev/null @@ -1,87 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=config -LIBTARGET=NO -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- -IMGLST_SRS=$(SRS)$/config.srs -BMP_IN=$(PRJ)$/win/imglst - -SRS1NAME=$(TARGET) -SRC1FILES = \ - mailconfigpage.src \ - optdlg.src \ - optload.src \ - optcomp.src \ - redlopt.src - -EXCEPTIONSFILES = \ - $(SLO)$/barcfg.obj \ - $(SLO)$/cfgitems.obj \ - $(SLO)$/fontcfg.obj \ - $(SLO)$/mailconfigpage.obj \ - $(SLO)$/modcfg.obj \ - $(SLO)$/optcomp.obj \ - $(SLO)$/optload.obj \ - $(SLO)$/optpage.obj \ - $(SLO)$/prtopt.obj \ - $(SLO)$/uinums.obj \ - $(SLO)$/usrpref.obj \ - $(SLO)$/viewopt.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - $(SLO)$/caption.obj \ - $(SLO)$/dbconfig.obj - -LIB1TARGET= $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/barcfg.obj \ - $(SLO)$/caption.obj \ - $(SLO)$/cfgitems.obj \ - $(SLO)$/dbconfig.obj \ - $(SLO)$/fontcfg.obj \ - $(SLO)$/modcfg.obj \ - $(SLO)$/prtopt.obj \ - $(SLO)$/uinums.obj \ - $(SLO)$/usrpref.obj \ - $(SLO)$/viewopt.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/config/modcfg.cxx b/sw/source/ui/config/modcfg.cxx index e06fad61ae..5a16df05d0 100644 --- a/sw/source/ui/config/modcfg.cxx +++ b/sw/source/ui/config/modcfg.cxx @@ -38,6 +38,7 @@ #include <svx/svxids.hrc> #include <editeng/svxenum.hxx> #include <osl/diagnose.h> +#include <tools/debug.hxx> #include <tools/globname.hxx> #include <swtypes.hxx> diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index ad15ef4b43..8ce34d29a1 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -151,7 +151,7 @@ SwCompatibilityOptPage::SwCompatibilityOptPage( Window* pParent, const SfxItemSe pEntry->SetUserData( (void*)(ULONG)nResId ); } } - m_aOptionsLB.SetWindowBits( m_aOptionsLB.GetStyle() | WB_HSCROLL | WB_HIDESELECTION ); + m_aOptionsLB.SetStyle( m_aOptionsLB.GetStyle() | WB_HSCROLL | WB_HIDESELECTION ); m_aOptionsLB.SetHighlightRange(); FreeResource(); diff --git a/sw/source/ui/config/optcomp.src b/sw/source/ui/config/optcomp.src index 3682b49477..fee89d732d 100644 --- a/sw/source/ui/config/optcomp.src +++ b/sw/source/ui/config/optcomp.src @@ -50,6 +50,7 @@ TabPage TP_OPTCOMPATIBILITY_PAGE }; ListBox LB_FORMATTING { + HelpID = "sw:ListBox:TP_OPTCOMPATIBILITY_PAGE:LB_FORMATTING"; Pos = MAP_APPFONT ( 12 , 25 ) ; Size = MAP_APPFONT ( 118 , 24 ) ; DropDown = TRUE; @@ -70,12 +71,14 @@ TabPage TP_OPTCOMPATIBILITY_PAGE }; PushButton PB_RESET { + HelpID = "sw:PushButton:TP_OPTCOMPATIBILITY_PAGE:PB_RESET"; Pos = MAP_APPFONT ( 125 , 165 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Reset"; }; PushButton PB_DEFAULT { + HelpID = "sw:PushButton:TP_OPTCOMPATIBILITY_PAGE:PB_DEFAULT"; Pos = MAP_APPFONT ( 188 , 165 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "Use as ~Default"; diff --git a/sw/source/ui/config/optdlg.hrc b/sw/source/ui/config/optdlg.hrc index 31f2e7041f..d58d1b6ac4 100644 --- a/sw/source/ui/config/optdlg.hrc +++ b/sw/source/ui/config/optdlg.hrc @@ -30,7 +30,7 @@ #define FL_NOPRINT 2 #define FL_WINDOW 3 -#define CB_GRF 1 +#define CB_GRF 1 #define CB_TBL 2 #define CB_DRWFAST 3 #define CB_FIELD 4 @@ -39,10 +39,10 @@ #define CB_SPACE 7 #define CB_HSPACE 8 #define CB_SHYPH 9 -#define CB_FLD_HIDDEN 10 +#define CB_FLD_HIDDEN 10 #define CB_BREAK 11 #define CB_ANY_RULER 12 -#define CB_CROSS 14 +#define CB_CROSS 14 #define CB_HSCROLL 15 #define CB_VSCROLL 16 #define CB_HRULER 17 @@ -50,7 +50,7 @@ #define FL_LINE 22 #define CB_POSTIT 23 #define CB_VRULER_RIGHT 24 -#define CB_BIGHANDLE 25 +#define CB_BIGHANDLE 25 #define FL_SETTINGS 26 #define LB_METRIC 27 @@ -191,7 +191,7 @@ #define FL_TABLE_SEPARATOR 139 #define CB_PROSPECT_RTL 140 -#define FL_SHDWCRSFLAG 1 +#define FL_SHDWCRSFLAG 1 #define CB_SHDWCRSONOFF 2 #define FL_SHDWCRSMODE 3 #define FT_SHDWCRSFILLMODE 4 @@ -201,5 +201,8 @@ #define RB_SHDWCRSFILLSPACE 8 #define CB_ALLOW_IN_PROT 12 #define FL_CRSR_OPT 13 -#define FL_SEPARATOR_SHDW 14 +#define FL_SEPARATOR_SHDW 14 +#define FL_LAYOUT_OPTIONS 15 +#define CB_MATH_BASELINE_ALIGNMENT 16 + diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src index a2573ed3c1..8514146cc2 100644 --- a/sw/source/ui/config/optdlg.src +++ b/sw/source/ui/config/optdlg.src @@ -56,18 +56,21 @@ TabPage TP_CONTENT_OPT }; CheckBox CB_CROSS { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_CROSS"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 118 , 10 ) ; Text [ en-US ] = "Guides ~while moving"; }; CheckBox CB_HANDLE { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_HANDLE"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 118 , 10 ) ; Text [ en-US ] = "Sim~ple handles"; }; CheckBox CB_BIGHANDLE { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_BIGHANDLE"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 118 , 10 ) ; Text [ en-US ] = "Large handles"; @@ -81,54 +84,63 @@ TabPage TP_CONTENT_OPT }; CheckBox CB_HSCROLL { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_HSCROLL"; Pos = MAP_APPFONT ( 136 , 14 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "H~orizontal scrollbar" ; }; CheckBox CB_VSCROLL { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_VSCROLL"; Pos = MAP_APPFONT ( 136 , 27 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "~Vertical scrollbar" ; }; CheckBox CB_ANY_RULER { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_ANY_RULER"; Pos = MAP_APPFONT ( 136 , 40 ) ; Size = MAP_APPFONT ( 65 , 10 ) ; Text [ en-US ] = "R~uler" ; }; CheckBox CB_HRULER { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_HRULER"; Pos = MAP_APPFONT ( 142 , 53 ) ; Size = MAP_APPFONT ( 62 , 10 ) ; Text [ en-US ] = "Hori~zontal ruler" ; }; ListBox LB_HMETRIC { + HelpID = "sw:ListBox:TP_CONTENT_OPT:LB_HMETRIC"; Pos = MAP_APPFONT ( 206 , 51 ) ; Size = MAP_APPFONT ( 45 , 60 ) ; DropDown = TRUE; }; CheckBox CB_VRULER { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_VRULER"; Pos = MAP_APPFONT ( 142 , 66 ) ; Size = MAP_APPFONT ( 62 , 10 ) ; Text [ en-US ] = "Verti~cal ruler" ; }; CheckBox CB_VRULER_RIGHT { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_VRULER_RIGHT"; Pos = MAP_APPFONT ( 148 , 79 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "Right-aligned"; }; ListBox LB_VMETRIC { + HelpID = "sw:ListBox:TP_CONTENT_OPT:LB_VMETRIC"; Pos = MAP_APPFONT ( 206 , 64 ) ; Size = MAP_APPFONT ( 45 , 60 ) ; DropDown = TRUE; }; CheckBox CB_SMOOTH_SCROLL { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_SMOOTH_SCROLL"; Pos = MAP_APPFONT ( 136 , 79 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "S~mooth scroll" ; @@ -142,6 +154,7 @@ TabPage TP_CONTENT_OPT }; CheckBox CB_GRF { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_GRF"; Pos = MAP_APPFONT ( 12 , 67 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "~Graphics and objects" ; @@ -150,24 +163,28 @@ TabPage TP_CONTENT_OPT }; CheckBox CB_TBL { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_TBL"; Pos = MAP_APPFONT ( 12 , 80 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "~Tables " ; }; CheckBox CB_DRWFAST { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_DRWFAST"; Pos = MAP_APPFONT ( 12 , 93 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Dra~wings and controls" ; }; CheckBox CB_FIELD { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_FIELD"; Pos = MAP_APPFONT ( 12 , 106 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "~Field codes" ; }; CheckBox CB_POSTIT { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_POSTIT"; Pos = MAP_APPFONT ( 12 , 119 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "~Comments" ; @@ -188,6 +205,7 @@ TabPage TP_CONTENT_OPT }; ListBox LB_METRIC { + HelpID = "sw:ListBox:TP_CONTENT_OPT:LB_METRIC"; Pos = MAP_APPFONT ( 199, 133 ) ; Size = MAP_APPFONT ( 50 , 50 ) ; Border = TRUE ; @@ -214,6 +232,7 @@ TabPage TP_OPTPRINT_PAGE }; CheckBox CB_PGRF /*functionally merged with CB_PDRAW*/ { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PGRF"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Pictures and objects" ; @@ -224,6 +243,7 @@ TabPage TP_OPTPRINT_PAGE removed, tables now always get printed CheckBox CB_PTAB { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PTAB"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Tables" ; @@ -233,6 +253,7 @@ TabPage TP_OPTPRINT_PAGE functionally merged with CB_PGRF (pictures and graphics) CheckBox CB_PDRAW { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PDRAW"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Dra~wings" ; @@ -240,30 +261,35 @@ TabPage TP_OPTPRINT_PAGE */ CheckBox CB_CTRLFLD { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_CTRLFLD"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Form control~s" ; }; CheckBox CB_BACKGROUND { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_BACKGROUND"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Page ba~ckground" ; }; CheckBox CB_BLACK_FONT { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_BLACK_FONT"; Pos = MAP_APPFONT ( 12 , 53 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Print text in blac~k" ; }; CheckBox CB_HIDDEN_TEXT { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_HIDDEN_TEXT"; Pos = MAP_APPFONT ( 12 , 66 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Hidden te~xt" ; }; CheckBox CB_TEXT_PLACEHOLDER { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_TEXT_PLACEHOLDER"; Pos = MAP_APPFONT ( 12 , 79 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Text ~placeholder" ; @@ -283,6 +309,7 @@ TabPage TP_OPTPRINT_PAGE }; CheckBox CB_LEFTP { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_LEFTP"; Pos = MAP_APPFONT ( 96 , 14 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Left pages" ; @@ -291,6 +318,7 @@ TabPage TP_OPTPRINT_PAGE }; CheckBox CB_RIGHTP { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_RIGHTP"; Pos = MAP_APPFONT ( 96 , 27 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Right pages" ; @@ -299,6 +327,7 @@ TabPage TP_OPTPRINT_PAGE removed, noe handled by the new print dialog (i.e. vcl) itself CheckBox CB_REVERSE { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_REVERSE"; Pos = MAP_APPFONT ( 96 , 40 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Re~versed" ; @@ -306,12 +335,14 @@ TabPage TP_OPTPRINT_PAGE */ CheckBox CB_PROSPECT { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PROSPECT"; Pos = MAP_APPFONT ( 96 , 40 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Broch~ure" ; }; CheckBox CB_PROSPECT_RTL { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PROSPECT_RTL"; Pos = MAP_APPFONT ( 103 , 53 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Right to Left" ; @@ -319,6 +350,7 @@ TabPage TP_OPTPRINT_PAGE }; RadioButton RB_NO { + HelpID = "sw:RadioButton:TP_OPTPRINT_PAGE:RB_NO"; Pos = MAP_APPFONT ( 180 , 14 ) ; Size = MAP_APPFONT ( 74 , 10 ) ; Text [ en-US ] = "~None" ; @@ -327,18 +359,21 @@ TabPage TP_OPTPRINT_PAGE }; RadioButton RB_ONLY { + HelpID = "sw:RadioButton:TP_OPTPRINT_PAGE:RB_ONLY"; Pos = MAP_APPFONT ( 180 , 27 ) ; Size = MAP_APPFONT ( 74 , 10 ) ; Text [ en-US ] = "Comments ~only" ; }; RadioButton RB_END { + HelpID = "sw:RadioButton:TP_OPTPRINT_PAGE:RB_END"; Pos = MAP_APPFONT ( 180 , 40 ) ; Size = MAP_APPFONT ( 74 , 10 ) ; Text [ en-US ] = "End of docu~ment" ; }; RadioButton RB_PAGEEND { + HelpID = "sw:RadioButton:TP_OPTPRINT_PAGE:RB_PAGEEND"; Pos = MAP_APPFONT ( 180 , 53 ) ; Size = MAP_APPFONT ( 74 , 10 ) ; Text [ en-US ] = "~End of page" ; @@ -365,6 +400,7 @@ TabPage TP_OPTPRINT_PAGE }; CheckBox CB_PRINTEMPTYPAGES { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PRINTEMPTYPAGES"; Pos = MAP_APPFONT ( 12 , 106 ) ; Size = MAP_APPFONT ( 200 , 10 ) ; TabStop = TRUE ; @@ -373,6 +409,7 @@ TabPage TP_OPTPRINT_PAGE /* CheckBox CB_SINGLEJOBS { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_SINGLEJOBS"; Pos = MAP_APPFONT ( 12 , 119 ) ; Size = MAP_APPFONT ( 200 , 10 ) ; TabStop = TRUE ; @@ -381,6 +418,7 @@ TabPage TP_OPTPRINT_PAGE */ CheckBox CB_PAPERFROMSETUP { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PAPERFROMSETUP"; Pos = MAP_APPFONT ( 12 , 119 ) ; Size = MAP_APPFONT ( 200 , 10 ) ; TabStop = TRUE ; @@ -395,6 +433,7 @@ TabPage TP_OPTPRINT_PAGE }; ListBox LB_FAX { + HelpID = "sw:ListBox:TP_OPTPRINT_PAGE:LB_FAX"; Border = TRUE ; Pos = MAP_APPFONT ( 70 , 132 ) ; Size = MAP_APPFONT ( 184 , 70 ) ; @@ -437,6 +476,7 @@ TabPage TP_STD_FONT }; MetricBox LB_STANDARD_SIZE { + HelpID = "sw:MetricBox:TP_STD_FONT:LB_STANDARD_SIZE"; Pos = MAP_APPFONT ( 204 , 25 ) ; Size = MAP_APPFONT ( 30 , 60 ) ; Border = TRUE ; @@ -444,6 +484,7 @@ TabPage TP_STD_FONT }; MetricBox LB_TITLE_SIZE { + HelpID = "sw:MetricBox:TP_STD_FONT:LB_TITLE_SIZE"; Pos = MAP_APPFONT ( 204 , 42 ) ; Size = MAP_APPFONT ( 30 , 60 ) ; Border = TRUE ; @@ -451,6 +492,7 @@ TabPage TP_STD_FONT }; MetricBox LB_LIST_SIZE { + HelpID = "sw:MetricBox:TP_STD_FONT:LB_LIST_SIZE"; Pos = MAP_APPFONT ( 204 , 59 ) ; Size = MAP_APPFONT ( 30 , 60 ) ; Border = TRUE ; @@ -458,6 +500,7 @@ TabPage TP_STD_FONT }; MetricBox LB_LABEL_SIZE { + HelpID = "sw:MetricBox:TP_STD_FONT:LB_LABEL_SIZE"; Pos = MAP_APPFONT ( 204 , 76 ) ; Size = MAP_APPFONT ( 30 , 60 ) ; Border = TRUE ; @@ -465,6 +508,7 @@ TabPage TP_STD_FONT }; MetricBox LB_INDEX_SIZE { + HelpID = "sw:MetricBox:TP_STD_FONT:LB_INDEX_SIZE"; Pos = MAP_APPFONT ( 204 , 93 ) ; Size = MAP_APPFONT ( 30 , 60 ) ; Border = TRUE ; @@ -507,6 +551,7 @@ TabPage TP_STD_FONT }; ComboBox LB_STANDARD { + HelpID = "sw:ComboBox:TP_STD_FONT:LB_STANDARD"; Pos = MAP_APPFONT ( 63 , 25 ) ; Size = MAP_APPFONT ( 135 , 73 ) ; TabStop = TRUE ; @@ -515,6 +560,7 @@ TabPage TP_STD_FONT }; ComboBox LB_TITLE { + HelpID = "sw:ComboBox:TP_STD_FONT:LB_TITLE"; Pos = MAP_APPFONT ( 63 , 42 ) ; Size = MAP_APPFONT ( 135, 73 ) ; TabStop = TRUE ; @@ -523,6 +569,7 @@ TabPage TP_STD_FONT }; ComboBox LB_LIST { + HelpID = "sw:ComboBox:TP_STD_FONT:LB_LIST"; Pos = MAP_APPFONT ( 63 , 59 ) ; Size = MAP_APPFONT ( 135 , 73 ) ; TabStop = TRUE ; @@ -531,6 +578,7 @@ TabPage TP_STD_FONT }; ComboBox LB_LABEL { + HelpID = "sw:ComboBox:TP_STD_FONT:LB_LABEL"; Pos = MAP_APPFONT ( 63 , 76 ) ; Size = MAP_APPFONT ( 135 , 73 ) ; TabStop = TRUE ; @@ -539,6 +587,7 @@ TabPage TP_STD_FONT }; ComboBox LB_IDX { + HelpID = "sw:ComboBox:TP_STD_FONT:LB_IDX"; Pos = MAP_APPFONT ( 63 , 94 ) ; Size = MAP_APPFONT ( 135, 73 ) ; TabStop = TRUE ; @@ -547,12 +596,14 @@ TabPage TP_STD_FONT }; CheckBox CB_DOCONLY { + HelpID = "sw:CheckBox:TP_STD_FONT:CB_DOCONLY"; Pos = MAP_APPFONT ( 12 , 111 ) ; Size = MAP_APPFONT ( 147 , 10 ) ; Text [ en-US ] = "C~urrent document only" ; }; PushButton PB_STANDARD { + HelpID = "sw:PushButton:TP_STD_FONT:PB_STANDARD"; Pos = MAP_APPFONT ( 204 , 165 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Default" ; @@ -588,6 +639,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_HEADER { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_HEADER"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 107 , 10 ) ; TabStop = TRUE ; @@ -595,6 +647,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_REPEAT_HEADER { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_REPEAT_HEADER"; Pos = MAP_APPFONT ( 21 , 27 ) ; Size = MAP_APPFONT ( 99 , 10 ) ; TabStop = TRUE ; @@ -602,6 +655,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_DONT_SPLIT { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_DONT_SPLIT"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 107 , 10 ) ; TabStop = TRUE ; @@ -609,6 +663,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_BORDER { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_BORDER"; Pos = MAP_APPFONT ( 12 , 53 ) ; Size = MAP_APPFONT ( 107 , 10 ) ; TabStop = TRUE ; @@ -628,6 +683,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_NUMFORMATTING { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_NUMFORMATTING"; Pos = MAP_APPFONT ( 131 , 14 ) ; Size = MAP_APPFONT ( 118 , 10 ) ; TabStop = TRUE ; @@ -635,6 +691,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_NUMFMT_FORMATTING { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_NUMFMT_FORMATTING"; Pos = MAP_APPFONT ( 140 , 27 ) ; Size = MAP_APPFONT ( 114 , 10 ) ; TabStop = TRUE ; @@ -642,6 +699,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_NUMALIGNMENT { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_NUMALIGNMENT"; Pos = MAP_APPFONT ( 140 , 40 ) ; Size = MAP_APPFONT ( 114 , 10 ) ; TabStop = TRUE ; @@ -667,6 +725,7 @@ TabPage TP_OPTTABLE_PAGE }; MetricField MF_ROWMOVE { + HelpID = "sw:MetricField:TP_OPTTABLE_PAGE:MF_ROWMOVE"; Border = TRUE ; Pos = MAP_APPFONT ( 83 , 91 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -689,6 +748,7 @@ TabPage TP_OPTTABLE_PAGE }; MetricField MF_COLMOVE { + HelpID = "sw:MetricField:TP_OPTTABLE_PAGE:MF_COLMOVE"; Border = TRUE ; Pos = MAP_APPFONT ( 83 , 106 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -717,6 +777,7 @@ TabPage TP_OPTTABLE_PAGE }; MetricField MF_ROWINSERT { + HelpID = "sw:MetricField:TP_OPTTABLE_PAGE:MF_ROWINSERT"; Border = TRUE ; Pos = MAP_APPFONT ( 211 , 91 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -739,6 +800,7 @@ TabPage TP_OPTTABLE_PAGE }; MetricField MF_COLINSERT { + HelpID = "sw:MetricField:TP_OPTTABLE_PAGE:MF_COLINSERT"; Border = TRUE ; Pos = MAP_APPFONT ( 211 , 106 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -761,6 +823,7 @@ TabPage TP_OPTTABLE_PAGE }; RadioButton RB_FIX { + HelpID = "sw:RadioButton:TP_OPTTABLE_PAGE:RB_FIX"; Pos = MAP_APPFONT ( 21 , 133 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Fixed" ; @@ -774,6 +837,7 @@ TabPage TP_OPTTABLE_PAGE }; RadioButton RB_FIXPROP { + HelpID = "sw:RadioButton:TP_OPTTABLE_PAGE:RB_FIXPROP"; Pos = MAP_APPFONT ( 21 , 151 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Fi~xed, proportional" ; @@ -787,6 +851,7 @@ TabPage TP_OPTTABLE_PAGE }; RadioButton RB_VAR { + HelpID = "sw:RadioButton:TP_OPTTABLE_PAGE:RB_VAR"; Pos = MAP_APPFONT ( 21 , 169 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Variable" ; @@ -820,6 +885,7 @@ TabPage TP_OPTSHDWCRSR }; CheckBox CB_PARA { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_PARA"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Pa~ragraph end" ; @@ -828,48 +894,56 @@ TabPage TP_OPTSHDWCRSR }; CheckBox CB_SHYPH { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_SHYPH"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Custom h~yphens" ; }; CheckBox CB_SPACE { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_SPACE"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Spac~es" ; }; CheckBox CB_HSPACE { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_HSPACE"; Pos = MAP_APPFONT ( 12 , 53 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Non-breaking s~paces" ; }; CheckBox CB_TAB { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_TAB"; Pos = MAP_APPFONT ( 12 , 66 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Ta~bs" ; }; CheckBox CB_BREAK { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_BREAK"; Pos = MAP_APPFONT ( 12 , 79 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Brea~ks" ; }; CheckBox CB_CHAR_HIDDEN { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_CHAR_HIDDEN"; Pos = MAP_APPFONT ( 12 , 92 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Hidden text" ; }; CheckBox CB_FLD_HIDDEN { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_FLD_HIDDEN"; Pos = MAP_APPFONT ( 12 , 105 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Fields: Hidden te~xt" ; }; CheckBox CB_FLD_HIDDEN_PARA { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_FLD_HIDDEN_PARA"; Pos = MAP_APPFONT ( 12 , 118 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Fields: Hidden p~aragraphs" ; @@ -888,6 +962,7 @@ TabPage TP_OPTSHDWCRSR }; CheckBox CB_SHDWCRSONOFF { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_SHDWCRSONOFF"; Pos = MAP_APPFONT ( 136 , 14 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -903,6 +978,7 @@ TabPage TP_OPTSHDWCRSR }; RadioButton RB_SHDWCRSFILLMARGIN { + HelpID = "sw:RadioButton:TP_OPTSHDWCRSR:RB_SHDWCRSFILLMARGIN"; Pos = MAP_APPFONT ( 145 , 39 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -911,18 +987,21 @@ TabPage TP_OPTSHDWCRSR }; RadioButton RB_SHDWCRSFILLINDENT { + HelpID = "sw:RadioButton:TP_OPTSHDWCRSR:RB_SHDWCRSFILLINDENT"; Pos = MAP_APPFONT ( 145 , 52 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "~Left paragraph margin" ; }; RadioButton RB_SHDWCRSFILLTAB { + HelpID = "sw:RadioButton:TP_OPTSHDWCRSR:RB_SHDWCRSFILLTAB"; Pos = MAP_APPFONT ( 145 , 66 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "~Tabs" ; }; RadioButton RB_SHDWCRSFILLSPACE { + HelpID = "sw:RadioButton:TP_OPTSHDWCRSR:RB_SHDWCRSFILLSPACE"; Pos = MAP_APPFONT ( 145 , 79 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "Tabs a~nd spaces" ; @@ -935,15 +1014,27 @@ TabPage TP_OPTSHDWCRSR }; CheckBox CB_ALLOW_IN_PROT { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_ALLOW_IN_PROT"; Pos = MAP_APPFONT ( 136 , 107 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; Group = TRUE ; Text [ en-US ] = "Enable"; }; + FixedLine FL_LAYOUT_OPTIONS + { + Pos = MAP_APPFONT ( 6 , 133 ) ; + Size = MAP_APPFONT ( 118 , 8 ) ; + Text [ en-US ] = "Layout assistance"; + }; + CheckBox CB_MATH_BASELINE_ALIGNMENT + { + Pos = MAP_APPFONT ( 12 , 144 ) ; + Size = MAP_APPFONT ( 236 , 10 ) ; + Text [ en-US ] = "Math baseline alignment"; + }; }; - StringArray STR_PRINTOPTUI { ItemList [en-US] = @@ -951,47 +1042,33 @@ StringArray STR_PRINTOPTUI < "%PRODUCTNAME %s"; >; < "Contents"; >; < "Page ba~ckground"; >; - < "Specifies whether to include colors and objects that are inserted to the background of the page (Format - Page - Background) in the printed document."; >; < "P~ictures and other graphic objects"; >; - < "Specifies whether the graphics and drawing or OLE objects of your text document are printed"; >; < "Hidden te~xt"; >; - < "Enable this option to print text that is marked as hidden."; >; < "~Text placeholders"; >; - < "Enable this option to print text placeholders. Disable this option to leave the text placeholders blank in the printout."; >; < "Form control~s"; >; - < "Specifies whether the form control fields of the text document are printed"; >; < "Color"; >; < "Print text in blac~k"; >; - < "Specifies whether to always print text in black."; >; < "Pages"; >; < "Print ~automatically inserted blank pages"; >; - < "If this option is enabled automatically inserted blank pages are printed. This is best if you are printing double-sided. For example, in a book, a \"chapter\" paragraph style has been set to always start with an odd numbered page. If the previous chapter ends on an odd page, %PRODUCTNAME inserts an even numbered blank page. This option controls whether to print that even numbered page or not"; >; < "~Use only paper tray from printer preferences"; >; - < "For printers with multiple trays this option specifies whether the paper tray used is specified by the system settings of the printer."; >; < "Print"; >; < "None (document only)"; >; < "Comments only"; >; < "Place at end of document"; >; < "Place at end of page"; >; - < "Specify where to print comments (if any)."; >; < "~Comments"; >; < "Page sides";>; < "All pages"; >; < "Back sides / left pages"; >; < "Front sides / right pages"; >; - < "Specify which pages to include in the output"; >; < "Include"; >; < "Broch~ure"; >; - < "Select the Brochure option to print the document in brochure format."; >; < "Left-to-right script"; >; < "Right-to-left script"; >; < "Range and copies"; >; < "~All pages"; >; - < "Print the whole document."; >; < "Pa~ges"; >; - < "Print a range of pages of the document."; >; < "~Selection"; >; - < "Print only the selected parts of the document"; >; }; }; diff --git a/sw/source/ui/config/optload.src b/sw/source/ui/config/optload.src index a20d578f47..aa8b311db0 100644 --- a/sw/source/ui/config/optload.src +++ b/sw/source/ui/config/optload.src @@ -53,6 +53,7 @@ TabPage TP_OPTLOAD_PAGE }; RadioButton RB_ALWAYS { + HelpID = "sw:RadioButton:TP_OPTLOAD_PAGE:RB_ALWAYS"; Pos = MAP_APPFONT ( 18 , 26 ) ; Size = MAP_APPFONT ( 75 , 10 ) ; TabStop = TRUE ; @@ -60,6 +61,7 @@ TabPage TP_OPTLOAD_PAGE }; RadioButton RB_REQUEST { + HelpID = "sw:RadioButton:TP_OPTLOAD_PAGE:RB_REQUEST"; Pos = MAP_APPFONT ( 18 , 39 ) ; Size = MAP_APPFONT ( 75 , 10 ) ; TabStop = TRUE ; @@ -67,6 +69,7 @@ TabPage TP_OPTLOAD_PAGE }; RadioButton RB_NEVER { + HelpID = "sw:RadioButton:TP_OPTLOAD_PAGE:RB_NEVER"; Pos = MAP_APPFONT ( 18 , 52 ) ; Size = MAP_APPFONT ( 75 , 10 ) ; TabStop = TRUE ; @@ -80,12 +83,14 @@ TabPage TP_OPTLOAD_PAGE }; CheckBox CB_AUTO_UPDATE_FIELDS { + HelpID = "sw:CheckBox:TP_OPTLOAD_PAGE:CB_AUTO_UPDATE_FIELDS"; Pos = MAP_APPFONT ( 136 , 26) ; Size = MAP_APPFONT ( 118 , 10 ) ; Text [ en-US ] = "~Fields"; }; CheckBox CB_AUTO_UPDATE_CHARTS { + HelpID = "sw:CheckBox:TP_OPTLOAD_PAGE:CB_AUTO_UPDATE_CHARTS"; Pos = MAP_APPFONT ( 136 , 39) ; Size = MAP_APPFONT ( 109 , 10 ) ; Text [ en-US ] = "~Charts"; @@ -104,6 +109,7 @@ TabPage TP_OPTLOAD_PAGE }; ListBox LB_METRIC { + HelpID = "sw:ListBox:TP_OPTLOAD_PAGE:LB_METRIC"; Pos = MAP_APPFONT ( 130, 77 ) ; Size = MAP_APPFONT ( 50 , 50 ) ; Border = TRUE ; @@ -118,6 +124,7 @@ TabPage TP_OPTLOAD_PAGE }; MetricField MF_TAB { + HelpID = "sw:MetricField:TP_OPTLOAD_PAGE:MF_TAB"; Border = TRUE ; Pos = MAP_APPFONT ( 130 , 93 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; @@ -134,6 +141,7 @@ TabPage TP_OPTLOAD_PAGE }; CheckBox CB_USE_SQUARE_PAGE_MODE { + HelpID = "sw:CheckBox:TP_OPTLOAD_PAGE:CB_USE_SQUARE_PAGE_MODE"; Pos = MAP_APPFONT ( 12 , 111) ; Size = MAP_APPFONT ( 248 , 10 ) ; Text [ en-US ] = "Use square page mode for text grid"; @@ -182,6 +190,7 @@ TabPage TP_OPTCAPTION_PAGE }; ListBox LB_ORDER { + HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:LB_ORDER"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 141 ) ; Size = MAP_APPFONT ( 106 , 60 ) ; @@ -231,6 +240,7 @@ TabPage TP_OPTCAPTION_PAGE }; ComboBox BOX_CATEGORY { + HelpID = "sw:ComboBox:TP_OPTCAPTION_PAGE:BOX_CATEGORY"; Pos = MAP_APPFONT ( 189 , 14 ) ; Size = MAP_APPFONT ( 59 , 61 ) ; DropDown = TRUE ; @@ -246,6 +256,7 @@ TabPage TP_OPTCAPTION_PAGE }; ListBox BOX_FORMAT { + HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:BOX_FORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 189 , 29 ) ; Size = MAP_APPFONT ( 59 , 61 ) ; @@ -261,6 +272,7 @@ TabPage TP_OPTCAPTION_PAGE }; Edit ED_NUM_SEP { + HelpID = "sw:Edit:TP_OPTCAPTION_PAGE:ED_NUM_SEP"; Pos = MAP_APPFONT ( 189 , 44 ) ; Size = MAP_APPFONT ( 59 , 12 ) ; Border = TRUE ; @@ -277,6 +289,7 @@ TabPage TP_OPTCAPTION_PAGE }; Edit EDT_TEXT { + HelpID = "sw:Edit:TP_OPTCAPTION_PAGE:EDT_TEXT"; Pos = MAP_APPFONT ( 189 , 59 ) ; Size = MAP_APPFONT ( 59 , 12 ) ; Border = TRUE ; @@ -292,6 +305,7 @@ TabPage TP_OPTCAPTION_PAGE }; ListBox BOX_POS { + HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:BOX_POS"; Pos = MAP_APPFONT ( 189 , 74 ) ; Size = MAP_APPFONT ( 59 , 61 ) ; DropDown = TRUE ; @@ -313,6 +327,7 @@ TabPage TP_OPTCAPTION_PAGE }; ListBox LB_LEVEL { + HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:LB_LEVEL"; Border = TRUE ; Pos = MAP_APPFONT ( 189 , 100 ) ; Size = MAP_APPFONT ( 59 , 60 ) ; @@ -331,6 +346,7 @@ TabPage TP_OPTCAPTION_PAGE }; Edit ED_SEPARATOR { + HelpID = "sw:Edit:TP_OPTCAPTION_PAGE:ED_SEPARATOR"; Pos = MAP_APPFONT ( 189 , 115 ) ; Size = MAP_APPFONT ( 59 , 12 ) ; Border = TRUE ; @@ -351,6 +367,7 @@ TabPage TP_OPTCAPTION_PAGE }; ListBox LB_CHARSTYLE { + HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:LB_CHARSTYLE"; Border = TRUE ; Pos = MAP_APPFONT ( 189 , 141 ) ; Size = MAP_APPFONT ( 59 , 60 ) ; @@ -363,6 +380,7 @@ TabPage TP_OPTCAPTION_PAGE }; CheckBox CB_APPLYBORDER { + HelpID = "sw:CheckBox:TP_OPTCAPTION_PAGE:CB_APPLYBORDER"; Pos = MAP_APPFONT ( 125 , 158 ) ; Size = MAP_APPFONT ( 124 , 10 ) ; Text [ en-US ] = "Apply border and shadow" ; diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index b3e56b90da..a9230c40a0 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -28,29 +28,23 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #ifdef SW_DLLIMPLEMENTATION #undef SW_DLLIMPLEMENTATION #endif - -#include <hintids.hxx> -#include <cmdid.h> -#include <vcl/svapp.hxx> #ifndef _SVSTDARR_HXX #define _SVSTDARR_STRINGSDTOR #include <svl/svstdarr.hxx> #endif -#include <svl/cjkoptions.hxx> -#include <svtools/ctrltool.hxx> -#include <svl/eitem.hxx> -#include <svx/htmlmode.hxx> -#include <sfx2/printer.hxx> -#include <sfx2/bindings.hxx> -#include <svx/xtable.hxx> + +#include <optpage.hxx> +#include <doc.hxx> +#include <hintids.hxx> +#include <cmdid.h> #include <editeng/fhgtitem.hxx> #include <editeng/fontitem.hxx> #include <editeng/langitem.hxx> -#include <svx/dlgutil.hxx> #include <fmtcol.hxx> #include <charatr.hxx> #include <swtypes.hxx> @@ -60,12 +54,11 @@ #include <swmodule.hxx> #include <wrtsh.hxx> #include <uitool.hxx> -#include <cfgitems.hxx> //Items fuer Sw-Seiten +#include <cfgitems.hxx> #include <poolfmt.hxx> #include <uiitems.hxx> #include <initui.hxx> -#include <optpage.hxx> -#include <swprtopt.hxx> +#include <printdata.hxx> #include <modcfg.hxx> #include <srcview.hxx> #include <crstate.hxx> @@ -74,13 +67,26 @@ #include <config.hrc> #include <redlopt.hrc> #include <optdlg.hrc> -#include <svx/strarray.hxx> -#include <svl/slstitm.hxx> -#include <sfx2/request.hxx> #include <swwrtshitem.hxx> +#include <unomid.h> + +#include <editeng/fhgtitem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/langitem.hxx> +#include <sfx2/request.hxx> +#include <sfx2/printer.hxx> +#include <sfx2/bindings.hxx> +#include <svl/slstitm.hxx> #include <svl/ctloptions.hxx> +#include <svl/eitem.hxx> +#include <svl/cjkoptions.hxx> +#include <svtools/ctrltool.hxx> +#include <svx/htmlmode.hxx> +#include <svx/xtable.hxx> +#include <svx/dlgutil.hxx> +#include <svx/strarray.hxx> +#include <vcl/svapp.hxx> -#include <unomid.h> using namespace ::com::sun::star; @@ -650,20 +656,12 @@ void lcl_SetColl(SwWrtShell* pWrtShell, USHORT nType, SfxPrinter* pPrt, const String& rStyle, USHORT nFontWhich) { - BOOL bDelete = FALSE; - const SfxFont* pFnt = pPrt ? pPrt->GetFontByName(rStyle): 0; - if(!pFnt) - { - pFnt = new SfxFont(FAMILY_DONTKNOW, rStyle); - bDelete = TRUE; - } + Font aFont( rStyle, Size( 0, 10 ) ); + if( pPrt ) + aFont = pPrt->GetFontMetric( aFont ); SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(nType); - pColl->SetFmtAttr(SvxFontItem(pFnt->GetFamily(), pFnt->GetName(), - aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich)); - if(bDelete) - { - delete (SfxFont*) pFnt; - } + pColl->SetFmtAttr(SvxFontItem(aFont.GetFamily(), aFont.GetName(), + aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); } void lcl_SetColl(SwWrtShell* pWrtShell, USHORT nType, @@ -742,22 +740,13 @@ BOOL SwStdFontTabPage::FillItemSet( SfxItemSet& ) FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONTSIZE : RES_CHRATR_CTL_FONTSIZE); if(sStandard != sShellStd) { - BOOL bDelete = FALSE; - const SfxFont* pFnt = pPrinter ? pPrinter->GetFontByName(sStandard): 0; - if(!pFnt) - { - pFnt = new SfxFont(FAMILY_DONTKNOW, sStandard); - bDelete = TRUE; - } - pWrtShell->SetDefault(SvxFontItem(pFnt->GetFamily(), pFnt->GetName(), - aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich)); + Font aFont( sStandard, Size( 0, 10 ) ); + if( pPrinter ) + aFont = pPrinter->GetFontMetric( aFont ); + pWrtShell->SetDefault(SvxFontItem(aFont.GetFamily(), aFont.GetName(), + aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_STANDARD); pColl->ResetFmtAttr(nFontWhich); - if(bDelete) - { - delete (SfxFont*) pFnt; - bDelete = FALSE; - } bMod = TRUE; } if(bStandardHeightChanged) @@ -859,15 +848,24 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet) // #i94536# prevent duplication of font entries when 'reset' button is pressed if( !aStandardBox.GetEntryCount() ) { - const USHORT nCount = pPrt->GetFontCount(); - for (USHORT i = 0; i < nCount; ++i) + // get the set of disctinct available family names + std::set< String > aFontNames; + int nFontNames = pPrt->GetDevFontCount(); + for( int i = 0; i < nFontNames; i++ ) + { + FontInfo aInf( pPrt->GetDevFont( i ) ); + aFontNames.insert( aInf.GetName() ); + } + + // insert to listboxes + for( std::set< String >::const_iterator it = aFontNames.begin(); + it != aFontNames.end(); ++it ) { - const String &rString = pPrt->GetFont(i)->GetName(); - aStandardBox.InsertEntry( rString ); - aTitleBox .InsertEntry( rString ); - aListBox .InsertEntry( rString ); - aLabelBox .InsertEntry( rString ); - aIdxBox .InsertEntry( rString ); + aStandardBox.InsertEntry( *it ); + aTitleBox .InsertEntry( *it ); + aListBox .InsertEntry( *it ); + aLabelBox .InsertEntry( *it ); + aIdxBox .InsertEntry( *it ); } } if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_STDFONTS, FALSE, &pItem)) @@ -1373,15 +1371,17 @@ SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( Window* pParent, aFillTabRB( this, SW_RES( RB_SHDWCRSFILLTAB )), aFillSpaceRB( this, SW_RES( RB_SHDWCRSFILLSPACE )), aCrsrOptFL ( this, SW_RES( FL_CRSR_OPT)), - aCrsrInProtCB( this, SW_RES( CB_ALLOW_IN_PROT )) + aCrsrInProtCB( this, SW_RES( CB_ALLOW_IN_PROT )), + m_aLayoutOptionsFL( this, SW_RES( FL_LAYOUT_OPTIONS ) ), + m_aMathBaselineAlignmentCB( this, SW_RES( CB_MATH_BASELINE_ALIGNMENT ) ), + m_pWrtShell( NULL ) { FreeResource(); const SfxPoolItem* pItem = 0; - SwShadowCursorItem aOpt; + SwShadowCursorItem aOpt; if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem )) aOpt = *(SwShadowCursorItem*)pItem; - aOnOffCB.Check( aOpt.IsOn() ); BYTE eMode = aOpt.GetMode(); @@ -1425,6 +1425,15 @@ SfxTabPage* SwShdwCrsrOptionsTabPage::Create( Window* pParent, const SfxItemSet& return new SwShdwCrsrOptionsTabPage( pParent, rSet ); } + +void SwShdwCrsrOptionsTabPage::PageCreated( SfxAllItemSet aSet ) +{ + SFX_ITEMSET_ARG (&aSet,pWrtSh,SwWrtShellItem,SID_WRT_SHELL,sal_False); + if (pWrtSh) + SetWrtShell(pWrtSh->GetValue()); +} + + BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet ) { SwShadowCursorItem aOpt; @@ -1450,6 +1459,10 @@ BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet ) bRet = TRUE; } + m_pWrtShell->GetDoc()->set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT, + m_aMathBaselineAlignmentCB.IsChecked() ); + bRet |= m_aMathBaselineAlignmentCB.IsChecked() != m_aMathBaselineAlignmentCB.GetSavedValue(); + if( aCrsrInProtCB.IsChecked() != aCrsrInProtCB.GetSavedValue()) { rSet.Put(SfxBoolItem(FN_PARAM_CRSR_IN_PROTECTED, aCrsrInProtCB.IsChecked())); @@ -1483,11 +1496,10 @@ BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet ) void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet& rSet ) { const SfxPoolItem* pItem = 0; - SwShadowCursorItem aOpt; + SwShadowCursorItem aOpt; if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem )) aOpt = *(SwShadowCursorItem*)pItem; - aOnOffCB.Check( aOpt.IsOn() ); BYTE eMode = aOpt.GetMode(); @@ -1496,6 +1508,9 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet& rSet ) aFillTabRB.Check( FILL_TAB == eMode ); aFillSpaceRB.Check( FILL_SPACE == eMode ); + m_aMathBaselineAlignmentCB.Check( m_pWrtShell->GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ) ); + m_aMathBaselineAlignmentCB.SaveValue(); + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, FALSE, &pItem )) aCrsrInProtCB.Check(((const SfxBoolItem*)pItem)->GetValue()); aCrsrInProtCB.SaveValue(); @@ -2422,4 +2437,4 @@ IMPL_LINK_INLINE_END( SwTestTabPage, AutoClickHdl, CheckBox *, EMPTYARG ) -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/sw/source/ui/config/prtopt.cxx b/sw/source/ui/config/prtopt.cxx index 55a2f058e3..d9739d88ba 100644 --- a/sw/source/ui/config/prtopt.cxx +++ b/sw/source/ui/config/prtopt.cxx @@ -29,16 +29,15 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include <unotools/configmgr.hxx> #include <prtopt.hxx> -#include <swprtopt.hxx> #include <osl/diagnose.h> #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Sequence.hxx> #include <unomid.h> + using namespace utl; using rtl::OUString; using namespace com::sun::star::uno; diff --git a/sw/source/ui/config/redlopt.src b/sw/source/ui/config/redlopt.src index 2d5da19772..35211f60a7 100644 --- a/sw/source/ui/config/redlopt.src +++ b/sw/source/ui/config/redlopt.src @@ -65,6 +65,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_INS_ATTR { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_INS_ATTR"; Pos = MAP_APPFONT ( 90 , 25 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -92,6 +93,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_INS_COL { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_INS_COL"; Pos = MAP_APPFONT ( 90 , 40 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -118,6 +120,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_DEL_ATTR { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_DEL_ATTR"; Pos = MAP_APPFONT ( 90 , 67 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -131,6 +134,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_DEL_COL { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_DEL_COL"; Pos = MAP_APPFONT ( 90 , 82 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -157,6 +161,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_CHG_ATTR { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_CHG_ATTR"; Pos = MAP_APPFONT ( 90 , 111 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -170,6 +175,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_CHG_COL { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_CHG_COL"; Pos = MAP_APPFONT ( 90 , 126 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -196,6 +202,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_MARKPOS { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_MARKPOS"; Pos = MAP_APPFONT ( 90 , 155 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -217,6 +224,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_LC_COL { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_LC_COL"; Pos = MAP_APPFONT ( 90 , 170 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/config/usrpref.cxx b/sw/source/ui/config/usrpref.cxx index 83739bd4f8..ded24c7abb 100644 --- a/sw/source/ui/config/usrpref.cxx +++ b/sw/source/ui/config/usrpref.cxx @@ -231,28 +231,30 @@ Sequence<OUString> SwLayoutViewConfig::GetPropertyNames() { static const char* aPropNames[] = { - "Line/Guide", // 0 - "Line/SimpleControlPoint", // 1 - "Line/LargeControlPoint", // 2 - "Window/HorizontalScroll", // 3 - "Window/VerticalScroll", // 4 - "Window/ShowRulers", // 5 - "Window/HorizontalRuler", // 6 - "Window/VerticalRuler", // 7 - "Window/HorizontalRulerUnit", // 8 - "Window/VerticalRulerUnit", // 9 - "Window/SmoothScroll", //10 - "Zoom/Value", //11 - "Zoom/Type", //12 - "Other/MeasureUnit", //13 - "Other/TabStop", //14 - "Window/IsVerticalRulerRight", //15 - "ViewLayout/Columns", //16 - "ViewLayout/BookMode", //17 - "Other/IsSquaredPageMode", //18 - "Other/ApplyCharUnit" //19 + "Line/Guide", // 0 + "Line/SimpleControlPoint", // 1 + "Line/LargeControlPoint", // 2 + "Window/HorizontalScroll", // 3 + "Window/VerticalScroll", // 4 + "Window/ShowRulers", // 5 + "Window/HorizontalRuler", // 6 + "Window/VerticalRuler", // 7 + "Window/HorizontalRulerUnit", // 8 + "Window/VerticalRulerUnit", // 9 + "Window/SmoothScroll", //10 + "Zoom/Value", //11 + "Zoom/Type", //12 + "Other/IsAlignMathObjectsToBaseline", //13 + "Other/MeasureUnit", //14 + // below properties are not available in WriterWeb + "Other/TabStop", //15 + "Window/IsVerticalRulerRight", //16 + "ViewLayout/Columns", //17 + "ViewLayout/BookMode", //18 + "Other/IsSquaredPageMode", //19 + "Other/ApplyCharUnit" //20 }; - const int nCount = bWeb ? 14 : 20; + const int nCount = bWeb ? 15 : 21; Sequence<OUString> aNames(nCount); OUString* pNames = aNames.getArray(); for(int i = 0; i < nCount; i++) @@ -283,37 +285,38 @@ void SwLayoutViewConfig::Commit() for(int nProp = 0; nProp < aNames.getLength(); nProp++) { - sal_Bool bSet; + Any &rVal = pValues[nProp]; switch(nProp) { - case 0: bSet = rParent.IsCrossHair(); break;// "Line/Guide", - case 1: bSet = rParent.IsSolidMarkHdl(); break;// "Line/SimpleControlPoint", - case 2: bSet = rParent.IsBigMarkHdl(); break;// "Line/LargeControlPoint", - case 3: bSet = rParent.IsViewHScrollBar(); break;// "Window/HorizontalScroll", - case 4: bSet = rParent.IsViewVScrollBar(); break;// "Window/VerticalScroll", - case 5: bSet = rParent.IsViewAnyRuler(); break; // "Window/ShowRulers" + case 0: rVal <<= (sal_Bool) rParent.IsCrossHair(); break; // "Line/Guide", + case 1: rVal <<= (sal_Bool) rParent.IsSolidMarkHdl(); break; // "Line/SimpleControlPoint", + case 2: rVal <<= (sal_Bool) rParent.IsBigMarkHdl(); break; // "Line/LargeControlPoint", + case 3: rVal <<= (sal_Bool) rParent.IsViewHScrollBar(); break; // "Window/HorizontalScroll", + case 4: rVal <<= (sal_Bool) rParent.IsViewVScrollBar(); break; // "Window/VerticalScroll", + case 5: rVal <<= (sal_Bool) rParent.IsViewAnyRuler(); break; // "Window/ShowRulers" // #i14593# use IsView*Ruler(TRUE) instead of IsView*Ruler() // this preserves the single ruler states even if "Window/ShowRulers" is off - case 6: bSet = rParent.IsViewHRuler(TRUE); break;// "Window/HorizontalRuler", - case 7: bSet = rParent.IsViewVRuler(TRUE); break;// "Window/VerticalRuler", + case 6: rVal <<= (sal_Bool) rParent.IsViewHRuler(TRUE); break; // "Window/HorizontalRuler", + case 7: rVal <<= (sal_Bool) rParent.IsViewVRuler(TRUE); break; // "Window/VerticalRuler", case 8: if(rParent.bIsHScrollMetricSet) - pValues[nProp] <<= (sal_Int32)rParent.eHScrollMetric; // "Window/HorizontalRulerUnit" + rVal <<= (sal_Int32)rParent.eHScrollMetric; // "Window/HorizontalRulerUnit" break; case 9: if(rParent.bIsVScrollMetricSet) - pValues[nProp] <<= (sal_Int32)rParent.eVScrollMetric; // "Window/VerticalRulerUnit" + rVal <<= (sal_Int32)rParent.eVScrollMetric; // "Window/VerticalRulerUnit" break; - case 10: bSet = rParent.IsSmoothScroll(); break;// "Window/SmoothScroll", - case 11: pValues[nProp] <<= (sal_Int32)rParent.GetZoom(); break;// "Zoom/Value", - case 12: pValues[nProp] <<= (sal_Int32)rParent.GetZoomType(); break;// "Zoom/Type", - case 13: pValues[nProp] <<= (sal_Int32)rParent.GetMetric(); break;// "Other/MeasureUnit", - case 14: pValues[nProp] <<= static_cast<sal_Int32>(TWIP_TO_MM100(rParent.GetDefTab())); break;// "Other/TabStop", - case 15: bSet = rParent.IsVRulerRight(); break;// "Window/IsVerticalRulerRight", - case 16: pValues[nProp] <<= (sal_Int32)rParent.GetViewLayoutColumns(); break;// "ViewLayout/Columns", - case 17: bSet = rParent.IsViewLayoutBookMode(); break;// "ViewLayout/BookMode", - case 18: bSet = rParent.IsSquaredPageMode(); break;// "Other/IsSquaredPageMode", - case 19: bSet = rParent.IsApplyCharUnit(); break;// "Other/ApplyCharUnit", + case 10: rVal <<= (sal_Bool) rParent.IsSmoothScroll(); break; // "Window/SmoothScroll", + case 11: rVal <<= (sal_Int32)rParent.GetZoom(); break; // "Zoom/Value", + case 12: rVal <<= (sal_Int32)rParent.GetZoomType(); break; // "Zoom/Type", + case 13: rVal <<= (sal_Bool) rParent.IsAlignMathObjectsToBaseline(); break; // "Other/IsAlignMathObjectsToBaseline" + case 14: rVal <<= (sal_Int32)rParent.GetMetric(); break; // "Other/MeasureUnit", + case 15: rVal <<= static_cast<sal_Int32>(TWIP_TO_MM100(rParent.GetDefTab())); break;// "Other/TabStop", + case 16: rVal <<= (sal_Bool) rParent.IsVRulerRight(); break; // "Window/IsVerticalRulerRight", + case 17: rVal <<= (sal_Int32)rParent.GetViewLayoutColumns(); break; // "ViewLayout/Columns", + case 18: rVal <<= (sal_Bool) rParent.IsViewLayoutBookMode(); break; // "ViewLayout/BookMode", + case 19: rVal <<= (sal_Bool) rParent.IsSquaredPageMode(); break; // "Other/IsSquaredPageMode", + case 20: bSet = rParent.IsApplyCharUnit(); break;// "Other/ApplyCharUnit", } if(nProp < 8 || nProp == 10 || nProp == 15 || nProp == 17 || nProp == 18 || nProp == 19 ) pValues[nProp].setValue(&bSet, ::getBooleanCppuType()); @@ -333,7 +336,12 @@ void SwLayoutViewConfig::Load() { if(pValues[nProp].hasValue()) { +#warning thes Magic numbers are almost certainly wrong !... sal_Bool bSet = nProp < 8 || nProp == 10 || nProp == 17 || nProp == 18 || nProp == 19 ? *(sal_Bool*)pValues[nProp].getValue() : sal_False; + sal_Bool bSet = sal_False; + pValues[nProp] >>= nInt32Val; + pValues[nProp] >>= bSet; + switch(nProp) { case 0: rParent.SetCrossHair(bSet); break;// "Line/Guide", @@ -347,58 +355,25 @@ void SwLayoutViewConfig::Load() case 8: { rParent.bIsHScrollMetricSet = sal_True; - sal_Int32 nUnit = 0; - pValues[nProp] >>= nUnit; - rParent.eHScrollMetric = ((FieldUnit)nUnit); // "Window/HorizontalRulerUnit" + rParent.eHScrollMetric = ((FieldUnit)nInt32Val); // "Window/HorizontalRulerUnit" } break; case 9: { rParent.bIsVScrollMetricSet = sal_True; - sal_Int32 nUnit = 0; - pValues[nProp] >>= nUnit; - rParent.eVScrollMetric = ((FieldUnit)nUnit); // "Window/VerticalRulerUnit" + rParent.eVScrollMetric = ((FieldUnit)nInt32Val); // "Window/VerticalRulerUnit" } break; case 10: rParent.SetSmoothScroll(bSet); break;// "Window/SmoothScroll", - case 11: - { - sal_Int32 nVal = 0; - pValues[nProp] >>= nVal; - rParent.SetZoom( static_cast< USHORT >(nVal) ); - } - break;// "Zoom/Value", - case 12: - { - sal_Int32 nVal = 0; - pValues[nProp] >>= nVal; - rParent.SetZoomType( static_cast< SvxZoomType >(nVal) ); - } - break;// "Zoom/Type", - case 13: - { - sal_Int32 nUnit = 0; - pValues[nProp] >>= nUnit; - rParent.SetMetric((FieldUnit)nUnit, TRUE); - } - break;// "Other/MeasureUnit", - case 14: - { - sal_Int32 nTab = 0; - pValues[nProp] >>= nTab; - rParent.SetDefTab(MM100_TO_TWIP(nTab), TRUE); - } - break;// "Other/TabStop", - case 15: rParent.SetVRulerRight(bSet); break;// "Window/IsVerticalRulerRight", - case 16: - { - sal_Int32 nColumns = 0; - pValues[nProp] >>= nColumns; - rParent.SetViewLayoutColumns( static_cast<USHORT>(nColumns) ); - } - break;// "ViewLayout/Columns", - case 17: rParent.SetViewLayoutBookMode(bSet); break;// "ViewLayout/BookMode", - case 18: rParent.SetDefaultPageMode(bSet,TRUE); break;// "Other/IsSquaredPageMode", + case 11: rParent.SetZoom( static_cast< USHORT >(nInt32Val) ); break;// "Zoom/Value", + case 12: rParent.SetZoomType( static_cast< SvxZoomType >(nInt32Val) ); break;// "Zoom/Type", + case 13: rParent.SetAlignMathObjectsToBaseline(bSet); break;// "Other/IsAlignMathObjectsToBaseline" + case 14: rParent.SetMetric((FieldUnit)nInt32Val, TRUE); break;// "Other/MeasureUnit", + case 15: rParent.SetDefTab(MM100_TO_TWIP(nInt32Val), TRUE); break;// "Other/TabStop", + case 16: rParent.SetVRulerRight(bSet); break;// "Window/IsVerticalRulerRight", + case 17: rParent.SetViewLayoutColumns( static_cast<USHORT>(nInt32Val) ); break;// "ViewLayout/Columns", + case 18: rParent.SetViewLayoutBookMode(bSet); break;// "ViewLayout/BookMode", + case 19: rParent.SetDefaultPageMode(bSet,TRUE); break;// "Other/IsSquaredPageMode", case 19: rParent.SetApplyCharUnit(bSet); break;// "Other/ApplyUserChar" } } diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index 6b3c1a494f..ff022e72a2 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -211,7 +211,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent) : m_aListLB.SetHelpId(HID_MM_ADDRESSLIST_TLB); static long nTabs[] = {2, 0, aSz.Width()/2 }; - m_aListLB.SetWindowBits( WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); + m_aListLB.SetStyle( m_aListLB.GetStyle() | WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); m_aListLB.SetSelectionMode( SINGLE_SELECTION ); m_aListLB.SetTabs(&nTabs[0], MAP_PIXEL); m_aOK.SetClickHdl( LINK( this, SwAddressListDialog, OKHdl_Impl)); diff --git a/sw/source/ui/dbui/addresslistdialog.src b/sw/source/ui/dbui/addresslistdialog.src index 64fcaf7806..a9f933ecda 100644 --- a/sw/source/ui/dbui/addresslistdialog.src +++ b/sw/source/ui/dbui/addresslistdialog.src @@ -61,30 +61,35 @@ ModalDialog DLG_MM_ADDRESSLISTDIALOG }; PushButton PB_LOADLIST { + HelpID = "sw:PushButton:DLG_MM_ADDRESSLISTDIALOG:PB_LOADLIST"; Pos = MAP_APPFONT ( 194 , 43 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Add..."; }; PushButton PB_CREATELIST { + HelpID = "sw:PushButton:DLG_MM_ADDRESSLISTDIALOG:PB_CREATELIST"; Pos = MAP_APPFONT ( 194 , 60 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Create..."; }; PushButton PB_FILTER { + HelpID = "sw:PushButton:DLG_MM_ADDRESSLISTDIALOG:PB_FILTER"; Pos = MAP_APPFONT ( 194 , 77 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Filter..."; }; PushButton PB_EDIT { + HelpID = "sw:PushButton:DLG_MM_ADDRESSLISTDIALOG:PB_EDIT"; Pos = MAP_APPFONT ( 194 , 94 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Edit..."; }; PushButton PB_TABLE { + HelpID = "sw:PushButton:DLG_MM_ADDRESSLISTDIALOG:PB_TABLE"; Pos = MAP_APPFONT ( 194 , 111 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "Change ~Table..."; diff --git a/sw/source/ui/dbui/createaddresslistdialog.src b/sw/source/ui/dbui/createaddresslistdialog.src index d2e4e5f84e..1679aa18f2 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.src +++ b/sw/source/ui/dbui/createaddresslistdialog.src @@ -67,24 +67,28 @@ ModalDialog DLG_MM_CREATEADDRESSLIST }; PushButton PB_NEW { + HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_NEW"; Pos = MAP_APPFONT ( 262 , 14 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~New"; }; PushButton PB_DELETE { + HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_DELETE"; Pos = MAP_APPFONT ( 262 , 32 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Delete"; }; PushButton PB_FIND { + HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_FIND"; Pos = MAP_APPFONT ( 262 , 50 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Find..."; }; PushButton PB_CUSTOMIZE { + HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_CUSTOMIZE"; Pos = MAP_APPFONT ( 262 , 68 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "C~ustomize..."; @@ -97,18 +101,21 @@ ModalDialog DLG_MM_CREATEADDRESSLIST }; PushButton PB_START { + HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_START"; Pos = MAP_APPFONT ( 100 , 180 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Text = "|<"; }; PushButton PB_PREV { + HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_PREV"; Pos = MAP_APPFONT ( 123 , 180 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Text = "<"; }; NumericField NF_SETNO { + HelpID = "sw:NumericField:DLG_MM_CREATEADDRESSLIST:NF_SETNO"; Pos = MAP_APPFONT ( 146 , 180 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Border = TRUE; @@ -122,12 +129,14 @@ ModalDialog DLG_MM_CREATEADDRESSLIST }; PushButton PB_NEXT { + HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_NEXT"; Pos = MAP_APPFONT ( 169 , 180 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Text = ">"; }; PushButton PB_END { + HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_END"; Pos = MAP_APPFONT ( 192 , 180 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Text = ">|"; @@ -179,18 +188,21 @@ ModelessDialog DLG_MM_FIND_ENTRY }; Edit ED_FIND { + HelpID = "sw:Edit:DLG_MM_FIND_ENTRY:ED_FIND"; Pos = MAP_APPFONT ( 6 , 14) ; Size = MAP_APPFONT ( 120 , 12 ) ; Border = TRUE; }; CheckBox CB_FINDONLY { + HelpID = "sw:CheckBox:DLG_MM_FIND_ENTRY:CB_FINDONLY"; Pos = MAP_APPFONT ( 6 , 32 ) ; Size = MAP_APPFONT ( 120 , 10 ) ; Text [ en-US ] = "Find ~only in"; }; ListBox LB_FINDONLY { + HelpID = "sw:ListBox:DLG_MM_FIND_ENTRY:LB_FINDONLY"; Pos = MAP_APPFONT ( 12 , 45 ) ; Size = MAP_APPFONT ( 114 , 50 ) ; Border = TRUE; @@ -198,6 +210,7 @@ ModelessDialog DLG_MM_FIND_ENTRY }; PushButton PB_FIND { + HelpID = "sw:PushButton:DLG_MM_FIND_ENTRY:PB_FIND"; Pos = MAP_APPFONT ( 132 , 3 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; DefButton = TRUE; diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.src b/sw/source/ui/dbui/customizeaddresslistdialog.src index 38afd0bfe1..d95be1128a 100644 --- a/sw/source/ui/dbui/customizeaddresslistdialog.src +++ b/sw/source/ui/dbui/customizeaddresslistdialog.src @@ -47,30 +47,35 @@ ModalDialog DLG_MM_CUSTOMIZE_ADDRESS_LIST }; ListBox LB_FIELDS { + HelpID = "sw:ListBox:DLG_MM_CUSTOMIZE_ADDRESS_LIST:LB_FIELDS"; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 112 , 120 ) ; Border = TRUE; }; PushButton PB_ADD { + HelpID = "sw:PushButton:DLG_MM_CUSTOMIZE_ADDRESS_LIST:PB_ADD"; Pos = MAP_APPFONT ( 144 , 3 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Add..."; }; PushButton PB_DELETE { + HelpID = "sw:PushButton:DLG_MM_CUSTOMIZE_ADDRESS_LIST:PB_DELETE"; Pos = MAP_APPFONT ( 144 , 20 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Delete"; }; PushButton PB_RENAME { + HelpID = "sw:PushButton:DLG_MM_CUSTOMIZE_ADDRESS_LIST:PB_RENAME"; Pos = MAP_APPFONT ( 144 , 37 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Rename..."; }; ImageButton PB_UP { + HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZE_ADDRESS_LIST:PB_UP"; Pos = MAP_APPFONT ( 124 , 58 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; SYMBOL = IMAGEBUTTON_ARROW_UP; @@ -78,6 +83,7 @@ ModalDialog DLG_MM_CUSTOMIZE_ADDRESS_LIST }; ImageButton PB_DOWN { + HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZE_ADDRESS_LIST:PB_DOWN"; Pos = MAP_APPFONT ( 124 , 75 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; SYMBOL = IMAGEBUTTON_ARROW_DOWN; @@ -124,6 +130,7 @@ ModalDialog DLG_MM_ADD_RENAME_ENTRY }; Edit ED_FIELDNAME { + HelpID = "sw:Edit:DLG_MM_ADD_RENAME_ENTRY:ED_FIELDNAME"; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 120 , 12 ) ; Border = TRUE; diff --git a/sw/source/ui/dbui/dbinsdlg.src b/sw/source/ui/dbui/dbinsdlg.src index d08305dde1..5a3292d1d0 100644 --- a/sw/source/ui/dbui/dbinsdlg.src +++ b/sw/source/ui/dbui/dbinsdlg.src @@ -46,6 +46,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; RadioButton RB_AS_TABLE { + HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_AS_TABLE"; Pos = MAP_APPFONT ( 80 , 6 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; TabStop = TRUE ; @@ -54,6 +55,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; RadioButton RB_AS_FIELD { + HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_AS_FIELD"; Pos = MAP_APPFONT ( 145 , 6 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; TabStop = TRUE ; @@ -61,6 +63,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; RadioButton RB_AS_TEXT { + HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_AS_TEXT"; Pos = MAP_APPFONT ( 210 , 6 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; TabStop = TRUE ; @@ -106,6 +109,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; RadioButton RB_DBFMT_FROM_DB { + HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_DBFMT_FROM_DB"; Pos = MAP_APPFONT ( 15 , 128 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; TabStop = TRUE ; @@ -114,12 +118,14 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; RadioButton RB_DBFMT_FROM_USR { + HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_DBFMT_FROM_USR"; Pos = MAP_APPFONT ( 15 , 143 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; TabStop = TRUE ; }; ListBox LB_DBFMT_FROM_USR { + HelpID = "sw:ListBox:DLG_AP_INSERT_DB_SEL:LB_DBFMT_FROM_USR"; Border = TRUE ; Pos = MAP_APPFONT ( 30 , 142 ) ; Size = MAP_APPFONT ( 75 , 44 ) ; @@ -130,6 +136,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL /* -------------- Page Text / Fields -------------------------------- */ ListBox LB_TXT_DB_COLUMN { + HelpID = "sw:ListBox:DLG_AP_INSERT_DB_SEL:LB_TXT_DB_COLUMN"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 41 ) ; Size = MAP_APPFONT ( 93 , 70 ) ; @@ -138,6 +145,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; ImageButton IB_DBCOL_TOEDIT { + HelpID = "sw:ImageButton:DLG_AP_INSERT_DB_SEL:IB_DBCOL_TOEDIT"; Pos = MAP_APPFONT ( 111 , 41 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; TabStop = TRUE ; @@ -153,6 +161,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; MultiLineEdit ED_DB_TEXT { + HelpID = "sw:MultiLineEdit:DLG_AP_INSERT_DB_SEL:ED_DB_TEXT"; Border = TRUE ; Pos = MAP_APPFONT ( 137 , 41 ) ; Size = MAP_APPFONT ( 142 , 70 ) ; @@ -172,6 +181,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; ListBox LB_DB_PARA_COLL { + HelpID = "sw:ListBox:DLG_AP_INSERT_DB_SEL:LB_DB_PARA_COLL"; Border = TRUE ; Pos = MAP_APPFONT ( 182 , 127 ) ; Size = MAP_APPFONT ( 97 , 59 ) ; @@ -183,6 +193,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL /* -------------- Page Table ---------------------------------------- */ ListBox LB_TBL_DB_COLUMN { + HelpID = "sw:ListBox:DLG_AP_INSERT_DB_SEL:LB_TBL_DB_COLUMN"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 41 ) ; Size = MAP_APPFONT ( 93 , 70 ) ; @@ -190,6 +201,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; ImageButton IB_DBCOL_ALL_TO { + HelpID = "sw:ImageButton:DLG_AP_INSERT_DB_SEL:IB_DBCOL_ALL_TO"; Pos = MAP_APPFONT ( 111 , 41 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; TabStop = TRUE ; @@ -204,6 +216,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; ImageButton IB_DBCOL_ONE_TO { + HelpID = "sw:ImageButton:DLG_AP_INSERT_DB_SEL:IB_DBCOL_ONE_TO"; Pos = MAP_APPFONT ( 111 , 56 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; TabStop = TRUE ; @@ -218,6 +231,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; ImageButton IB_DBCOL_ONE_FROM { + HelpID = "sw:ImageButton:DLG_AP_INSERT_DB_SEL:IB_DBCOL_ONE_FROM"; Pos = MAP_APPFONT ( 111 , 84 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; TabStop = TRUE ; @@ -232,6 +246,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; ImageButton IB_DBCOL_ALL_FROM { + HelpID = "sw:ImageButton:DLG_AP_INSERT_DB_SEL:IB_DBCOL_ALL_FROM"; Pos = MAP_APPFONT ( 111 , 99 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; TabStop = TRUE ; @@ -253,6 +268,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; ListBox LB_TABLE_COL { + HelpID = "sw:ListBox:DLG_AP_INSERT_DB_SEL:LB_TABLE_COL"; Border = TRUE ; Pos = MAP_APPFONT ( 137 , 41 ) ; Size = MAP_APPFONT ( 75 , 70 ) ; @@ -265,6 +281,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; CheckBox CB_TABLE_HEADON { + HelpID = "sw:CheckBox:DLG_AP_INSERT_DB_SEL:CB_TABLE_HEADON"; Pos = MAP_APPFONT ( 111 , 128 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -273,6 +290,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; RadioButton RB_HEADL_COLNMS { + HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_HEADL_COLNMS"; Pos = MAP_APPFONT ( 120 , 142 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; TabStop = TRUE ; @@ -281,6 +299,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; RadioButton RB_HEADL_EMPTY { + HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_HEADL_EMPTY"; Pos = MAP_APPFONT ( 120 , 155 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; TabStop = TRUE ; @@ -288,6 +307,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; PushButton PB_TBL_FORMAT { + HelpID = "sw:PushButton:DLG_AP_INSERT_DB_SEL:PB_TBL_FORMAT"; Pos = MAP_APPFONT ( 214 , 128 ) ; Size = MAP_APPFONT ( 65 , 12 ) ; Text [ en-US ] = "Pr~operties..." ; @@ -295,6 +315,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL }; PushButton PB_TBL_AUTOFMT { + HelpID = "sw:PushButton:DLG_AP_INSERT_DB_SEL:PB_TBL_AUTOFMT"; Pos = MAP_APPFONT ( 214 , 144 ) ; Size = MAP_APPFONT ( 65 , 12 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index b7a69e280e..f94fbf2d8b 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -63,10 +63,8 @@ #include <unotools/tempfile.hxx> #include <unotools/pathoptions.hxx> #include <svl/urihelper.hxx> -#ifndef _SVSTDARR_HXX #define _SVSTDARR_STRINGSDTOR #include <svl/svstdarr.hxx> -#endif #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <svl/stritem.hxx> @@ -87,7 +85,6 @@ #include <swundo.hxx> #include <flddat.hxx> #include <modcfg.hxx> -#include <swprtopt.hxx> #include <shellio.hxx> #include <dbui.hxx> #include <dbmgr.hxx> @@ -137,6 +134,7 @@ #include <memory> #include <vector> #include <unomid.h> +#include <section.hxx> using namespace ::osl; using namespace ::svx; @@ -823,6 +821,23 @@ void lcl_CopyFollowPageDesc( } } +void lcl_RemoveSectionLinks( SwWrtShell& rWorkShell ) +{ + //reset all links of the sections of synchronized labels + USHORT nSections = rWorkShell.GetSectionFmtCount(); + for( USHORT nSection = 0; nSection < nSections; ++nSection ) + { + SwSectionData aSectionData( *rWorkShell.GetSectionFmt( nSection ).GetSection() ); + if( aSectionData.GetType() == FILE_LINK_SECTION ) + { + aSectionData.SetType( CONTENT_SECTION ); + aSectionData.SetLinkFileName( String() ); + rWorkShell.UpdateSection( nSection, aSectionData ); + } + } + rWorkShell.SetLabelDoc( sal_False ); +} + BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, const SwMergeDescriptor& rMergeDescriptor) { @@ -901,7 +916,11 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, // in case of creating a single resulting file this has to be created here SwWrtShell* pTargetShell = 0; - SfxObjectShellRef xTargetDocShell; + + // the shell will be explicitly closed at the end of the method, but it is + // still more safe to use SfxObjectShellLock here + SfxObjectShellLock xTargetDocShell; + SwView* pTargetView = 0; std::auto_ptr< utl::TempFile > aTempFile; String sModifiedStartingPageDesc; @@ -1026,7 +1045,8 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, Application::Reschedule(); // create and save new document - SfxObjectShellRef xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL )); + // The SfxObjectShell will be closed explicitly later but it is more safe to use SfxObjectShellLock here + SfxObjectShellLock xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL )); SfxMedium* pWorkMed = new SfxMedium( sSourceDocumentURL, STREAM_STD_READ, TRUE ); pWorkMed->SetFilter( pSfxFlt ); @@ -1062,6 +1082,10 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, // copy created file into the target document rWorkShell.ConvertFieldsToText(); rWorkShell.SetNumberingRestart(); + if( bSynchronizedDoc ) + { + lcl_RemoveSectionLinks( rWorkShell ); + } // insert the document into the target document rWorkShell.SttEndDoc(FALSE); @@ -1441,7 +1465,8 @@ ULONG SwNewDBMgr::GetColumnFmt( uno::Reference< XDataSource> xSource, if(!xSource.is()) { uno::Reference<XChild> xChild(xConnection, UNO_QUERY); - xSource = uno::Reference<XDataSource>(xChild->getParent(), UNO_QUERY); + if ( xChild.is() ) + xSource = uno::Reference<XDataSource>(xChild->getParent(), UNO_QUERY); } if(xSource.is() && xConnection.is() && xColumn.is() && pNFmtr) { @@ -2415,6 +2440,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh, if(xResSet.is()) aDescriptor[daCursor] <<= xResSet; + // SfxObjectShellRef is ok, since there should be no control over the document lifetime here SfxObjectShellRef xDocShell = rSh.GetView().GetViewFrame()->GetObjectShell(); SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE), xDocShell)); { @@ -2445,7 +2471,9 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh, } else { - SfxObjectShellRef xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL )); + // the shell will be explicitly closed, but it is more safe to use SfxObjectShellLock here + // especially for the case that the loading has failed + SfxObjectShellLock xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL )); SfxMedium* pWorkMed = new SfxMedium( sTempURL, STREAM_STD_READ, TRUE ); pWorkMed->SetFilter( pSfxFlt ); if( xWorkDocSh->DoLoad(pWorkMed) ) @@ -2775,7 +2803,8 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, } // copy the source document - SfxObjectShellRef xWorkDocSh; + // the copy will be closed later, but it is more safe to use SfxObjectShellLock here + SfxObjectShellLock xWorkDocSh; if(nDocNo == 1 ) { uno::Reference< util::XCloneable > xClone( rSourceView.GetDocShell()->GetModel(), uno::UNO_QUERY); @@ -2812,7 +2841,10 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, rWorkShell.RemoveInvisibleContent(); rWorkShell.ConvertFieldsToText(); rWorkShell.SetNumberingRestart(); - + if( bSynchronizedDoc ) + { + lcl_RemoveSectionLinks( rWorkShell ); + } // insert the document into the target document rWorkShell.SttEndDoc(FALSE); diff --git a/sw/source/ui/dbui/dbtree.cxx b/sw/source/ui/dbui/dbtree.cxx index ae57a84d69..f3a07fdd8e 100644 --- a/sw/source/ui/dbui/dbtree.cxx +++ b/sw/source/ui/dbui/dbtree.cxx @@ -2,7 +2,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 @@ -216,7 +216,7 @@ void SwDBTreeList::InitTreeList() if(!pImpl->HasContext() && pImpl->GetWrtShell()) return; SetSelectionMode(SINGLE_SELECTION); - SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); + SetStyle(GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); // Font nicht setzen, damit der Font des Controls uebernommen wird! SetSpaceBetweenEntries(0); SetNodeBitmaps( aImageList.GetImage(IMG_COLLAPSE), diff --git a/sw/source/ui/dbui/dbui.src b/sw/source/ui/dbui/dbui.src index ce6b297064..b13e870604 100644 --- a/sw/source/ui/dbui/dbui.src +++ b/sw/source/ui/dbui/dbui.src @@ -31,6 +31,7 @@ ModalDialog DLG_DBSELECTION { + HelpID = "sw:ModalDialog:DLG_DBSELECTION"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 168 , 132 ) ; diff --git a/sw/source/ui/dbui/mailmergechildwindow.cxx b/sw/source/ui/dbui/mailmergechildwindow.cxx index 610903c445..3f8a620e07 100644 --- a/sw/source/ui/dbui/mailmergechildwindow.cxx +++ b/sw/source/ui/dbui/mailmergechildwindow.cxx @@ -366,7 +366,7 @@ SwSendMailDialog::SwSendMailDialog(Window *pParent, SwMailMergeConfigItem& rConf m_aStatusLB.SetHelpId(HID_MM_MAILSTATUS_TLB); static long nTabs[] = {3, 0, nPos1, aSz.Width() }; - m_aStatusLB.SetWindowBits( WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); + m_aStatusLB.SetStyle( m_aStatusLB.GetStyle() | WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); m_aStatusLB.SetSelectionMode( SINGLE_SELECTION ); m_aStatusLB.SetTabs(&nTabs[0], MAP_PIXEL); m_aStatusLB.SetSpaceBetweenEntries(3); diff --git a/sw/source/ui/dbui/mailmergechildwindow.src b/sw/source/ui/dbui/mailmergechildwindow.src index bdbf4e4917..0ca098fad1 100644 --- a/sw/source/ui/dbui/mailmergechildwindow.src +++ b/sw/source/ui/dbui/mailmergechildwindow.src @@ -244,6 +244,7 @@ ModalDialog DLG_MM_SENDWARNING }; MultiLineEdit ED_DETAILS { + HelpID = "sw:MultiLineEdit:DLG_MM_SENDWARNING:ED_DETAILS"; Pos = MAP_APPFONT ( 40 , 50 ) ; Size = MAP_APPFONT ( 194 , 50 ) ; Border = TRUE; diff --git a/sw/source/ui/dbui/mailmergewizard.src b/sw/source/ui/dbui/mailmergewizard.src index ad7d574800..2756f5ff7a 100644 --- a/sw/source/ui/dbui/mailmergewizard.src +++ b/sw/source/ui/dbui/mailmergewizard.src @@ -30,6 +30,7 @@ ModalDialog DLG_MAILMERGEWIZARD { + HelpID = "sw:ModalDialog:DLG_MAILMERGEWIZARD"; OutputSize = TRUE ; SVLook = TRUE ; Text [ en-US ] = "Mail Merge Wizard" ; diff --git a/sw/source/ui/dbui/makefile.mk b/sw/source/ui/dbui/makefile.mk deleted file mode 100644 index f125f07851..0000000000 --- a/sw/source/ui/dbui/makefile.mk +++ /dev/null @@ -1,108 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=dbui -LIBTARGET=no -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- -IMGLST_SRS=$(SRS)$/dbui.srs -BMP_IN=$(PRJ)$/win/imglst - - -SRS1NAME=$(TARGET) -SRC1FILES = \ - addresslistdialog.src \ - createaddresslistdialog.src \ - customizeaddresslistdialog.src \ - dbinsdlg.src \ - dbui.src \ - dbtablepreviewdialog.src \ - mailmergechildwindow.src \ - mailmergewizard.src \ - mmdocselectpage.src \ - mmlayoutpage.src \ - mmoutputpage.src \ - mmoutputtypepage.src \ - mmaddressblockpage.src \ - mmgreetingspage.src \ - mmmergepage.src \ - mmpreparemergepage.src \ - selectdbtabledialog.src \ - -EXCEPTIONSFILES= \ - $(SLO)$/addresslistdialog.obj \ - $(SLO)$/createaddresslistdialog.obj \ - $(SLO)$/customizeaddresslistdialog.obj \ - $(SLO)$/dbinsdlg.obj \ - $(SLO)$/dbmgr.obj \ - $(SLO)$/dbtablepreviewdialog.obj \ - $(SLO)$/dbtree.obj \ - $(SLO)$/dbui.obj \ - $(SLO)$/maildispatcher.obj \ - $(SLO)$/mailmergechildwindow.obj \ - $(SLO)$/mailmergehelper.obj \ - $(SLO)$/mailmergewizard.obj \ - $(SLO)$/mmaddressblockpage.obj \ - $(SLO)$/mmconfigitem.obj \ - $(SLO)$/mmdocselectpage.obj \ - $(SLO)$/mmgreetingspage.obj \ - $(SLO)$/mmlayoutpage.obj \ - $(SLO)$/mmmergepage.obj \ - $(SLO)$/mmoutputpage.obj \ - $(SLO)$/mmoutputtypepage.obj \ - $(SLO)$/mmpreparemergepage.obj \ - $(SLO)$/selectdbtabledialog.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - $(SLO)$/swdbtoolsclient.obj - - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/dbmgr.obj \ - $(SLO)$/dbtree.obj \ - $(SLO)$/dbui.obj \ - $(SLO)$/maildispatcher.obj \ - $(SLO)$/mailmergehelper.obj \ - $(SLO)$/mailmergechildwindow.obj \ - $(SLO)$/mmconfigitem.obj \ - $(SLO)$/swdbtoolsclient.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index 528a3491a7..a7d9b39779 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -1010,6 +1010,25 @@ SwAssignFieldsControl::SwAssignFieldsControl( uno::Sequence< ::rtl::OUString> aAssignments = rConfigItem.GetColumnAssignment( rConfigItem.GetCurrentDBData() ); Link aMatchHdl = LINK(this, SwAssignFieldsControl, MatchHdl_Impl); Link aFocusHdl = LINK(this, SwAssignFieldsControl, GotFocusHdl_Impl); + + static const char* aHIDs[] = + { + HID_MM_HEADER_0, + HID_MM_HEADER_1, + HID_MM_HEADER_2, + HID_MM_HEADER_3, + HID_MM_HEADER_4, + HID_MM_HEADER_5, + HID_MM_HEADER_6, + HID_MM_HEADER_7, + HID_MM_HEADER_8, + HID_MM_HEADER_9, + HID_MM_HEADER_10, + HID_MM_HEADER_11, + HID_MM_HEADER_12, + HID_MM_HEADER_13 + }; + //fill the controls for(USHORT i = 0; i < rHeaders.Count(); ++i) { @@ -1019,7 +1038,7 @@ SwAssignFieldsControl::SwAssignFieldsControl( sLabel.Insert(rHeader, 1); pNewText->SetText(sLabel); ListBox* pNewLB = new ListBox(&m_aWindow, ResId(LB_FIELDS, *rResId.GetResMgr())); - pNewLB->SetHelpId( HID_MM_HEADER_0 + i ); + pNewLB->SetHelpId( aHIDs[i] ); pNewLB->SelectEntryPos(0); for(sal_Int32 nField = 0; nField < aFields.getLength(); ++nField) pNewLB->InsertEntry(pFields[nField]); @@ -1318,7 +1337,7 @@ DDListBox::DDListBox(SwCustomizeAddressBlockDialog* pParent, const ResId rResId) SvTreeListBox(pParent, rResId), m_pParentDialog(pParent) { - SetWindowBits( /*WB_HASBUTTONS|WB_HASBUTTONSATROOT|*/ + SetStyle( GetStyle() | /*WB_HASBUTTONS|WB_HASBUTTONSATROOT|*/ WB_CLIPCHILDREN ); SetSelectionMode( SINGLE_SELECTION ); SetDragDropMode( SV_DRAGDROP_CTRL_COPY ); diff --git a/sw/source/ui/dbui/mmaddressblockpage.src b/sw/source/ui/dbui/mmaddressblockpage.src index 9058cfb7ee..3f8756f03c 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.src +++ b/sw/source/ui/dbui/mmaddressblockpage.src @@ -63,6 +63,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE }; PushButton PB_ADDRESSLIST { + HelpID = "sw:PushButton:DLG_MM_ADDRESSBLOCK_PAGE:PB_ADDRESSLIST"; Pos = MAP_APPFONT ( 154 , 27 ) ; Size = MAP_APPFONT ( 100 , 14 ) ; Text[ en-US ] = "Select A~ddress List..."; @@ -91,6 +92,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE }; CheckBox CB_ADDRESS { + HelpID = "sw:CheckBox:DLG_MM_ADDRESSBLOCK_PAGE:CB_ADDRESS"; Pos = MAP_APPFONT ( 16 , 66 ) ; Size = MAP_APPFONT ( 242 , 10 ) ; Text[ en-US ] = "~This document shall contain an address block"; @@ -103,6 +105,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE }; PushButton PB_SETTINGS { + HelpID = "sw:PushButton:DLG_MM_ADDRESSBLOCK_PAGE:PB_SETTINGS"; Pos = MAP_APPFONT ( 194 , 110 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Group = FALSE; @@ -110,6 +113,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE }; CheckBox CB_HIDE_EMPTY_PARA { + HelpID = "sw:CheckBox:DLG_MM_ADDRESSBLOCK_PAGE:CB_HIDE_EMPTY_PARA"; Pos = MAP_APPFONT ( 24 , 127 ) ; Size = MAP_APPFONT ( 230 , 10 ) ; Text[ en-US ] = "~Suppress lines with just empty fields"; @@ -134,6 +138,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE }; PushButton PB_ASSIGN { + HelpID = "sw:PushButton:DLG_MM_ADDRESSBLOCK_PAGE:PB_ASSIGN"; Pos = MAP_APPFONT ( 194 , 151 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text[ en-US ] = "Match ~Fields..."; @@ -169,6 +174,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE }; ImageButton IB_PREVSET { + HelpID = "sw:ImageButton:DLG_MM_ADDRESSBLOCK_PAGE:IB_PREVSET"; Pos = MAP_APPFONT ( 167 , 238 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; SYMBOL = IMAGEBUTTON_PREV; @@ -176,6 +182,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE }; ImageButton IB_NEXTSET { + HelpID = "sw:ImageButton:DLG_MM_ADDRESSBLOCK_PAGE:IB_NEXTSET"; Pos = MAP_APPFONT ( 178 , 238 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; SYMBOL = IMAGEBUTTON_NEXT ; @@ -212,18 +219,21 @@ ModalDialog DLG_MM_SELECTADDRESSBLOCK }; PushButton PB_NEW { + HelpID = "sw:PushButton:DLG_MM_SELECTADDRESSBLOCK:PB_NEW"; Pos = MAP_APPFONT ( 204 , 14 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "~New..."; }; PushButton PB_CUSTOMIZE { + HelpID = "sw:PushButton:DLG_MM_SELECTADDRESSBLOCK:PB_CUSTOMIZE"; Pos = MAP_APPFONT ( 204 , 31 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "~Edit..."; }; PushButton PB_DELETE { + HelpID = "sw:PushButton:DLG_MM_SELECTADDRESSBLOCK:PB_DELETE"; Pos = MAP_APPFONT ( 204 , 48 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Group = FALSE; @@ -238,24 +248,28 @@ ModalDialog DLG_MM_SELECTADDRESSBLOCK }; RadioButton RB_NEVER { + HelpID = "sw:RadioButton:DLG_MM_SELECTADDRESSBLOCK:RB_NEVER"; Pos = MAP_APPFONT ( 12 , 131 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text[ en-US ] = "N~ever include the country/region"; }; RadioButton RB_ALWAYS { + HelpID = "sw:RadioButton:DLG_MM_SELECTADDRESSBLOCK:RB_ALWAYS"; Pos = MAP_APPFONT ( 12 , 145 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text[ en-US ] = "~Always include the country/region"; }; RadioButton RB_DEPENDENT { + HelpID = "sw:RadioButton:DLG_MM_SELECTADDRESSBLOCK:RB_DEPENDENT"; Pos = MAP_APPFONT ( 12 , 159 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text[ en-US ] = "Only ~include the country/region if it is not:"; }; Edit ED_COUNTRY { + HelpID = "sw:Edit:DLG_MM_SELECTADDRESSBLOCK:ED_COUNTRY"; Pos = MAP_APPFONT ( 18 , 172 ) ; Size = MAP_APPFONT ( 180 , 12 ) ; Border = TRUE; @@ -330,6 +344,7 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK }; ImageButton IB_INSERTFIELD { + HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZEADDRESSBLOCK:IB_INSERTFIELD"; Pos = MAP_APPFONT ( 80 , 29 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; Symbol = IMAGEBUTTON_ARROW_RIGHT; @@ -341,6 +356,7 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK }; ImageButton IB_REMOVEFIELD { + HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZEADDRESSBLOCK:IB_REMOVEFIELD"; Pos = MAP_APPFONT ( 80 , 46 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; Symbol = IMAGEBUTTON_ARROW_LEFT; @@ -362,12 +378,14 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK }; MultiLineEdit ED_DRAG { + HelpID = "sw:MultiLineEdit:DLG_MM_CUSTOMIZEADDRESSBLOCK:ED_DRAG"; Pos = MAP_APPFONT ( 106 , 14 ) ; Size = MAP_APPFONT ( 160 , 60 ) ; Border = TRUE; }; ImageButton IB_UP { + HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZEADDRESSBLOCK:IB_UP"; Pos = MAP_APPFONT ( 285 , 14 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; Symbol = IMAGEBUTTON_ARROW_UP; @@ -375,6 +393,7 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK }; ImageButton IB_LEFT { + HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZEADDRESSBLOCK:IB_LEFT"; Pos = MAP_APPFONT ( 270 , 29 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; Symbol = IMAGEBUTTON_ARROW_LEFT; @@ -382,6 +401,7 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK }; ImageButton IB_RIGHT { + HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZEADDRESSBLOCK:IB_RIGHT"; Pos = MAP_APPFONT ( 300 , 29 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; Symbol = IMAGEBUTTON_ARROW_RIGHT; @@ -389,6 +409,7 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK }; ImageButton IB_DOWN { + HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZEADDRESSBLOCK:IB_DOWN"; Pos = MAP_APPFONT ( 285 , 48 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; Symbol = IMAGEBUTTON_ARROW_DOWN; @@ -403,6 +424,7 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK }; ComboBox CB_FIELD { + HelpID = "sw:ComboBox:DLG_MM_CUSTOMIZEADDRESSBLOCK:CB_FIELD"; Pos = MAP_APPFONT ( 106 , 89 ) ; Size = MAP_APPFONT ( 160 , 50 ) ; Border = TRUE; @@ -551,6 +573,7 @@ ModalDialog DLG_MM_ASSIGNFIELDS }; ListBox LB_FIELDS { + HelpID = "sw:ListBox:DLG_MM_ASSIGNFIELDS:LB_FIELDS"; Pos = MAP_APPFONT ( 83 , 4 ) ; Size = MAP_APPFONT ( 74 , 50 ) ; TabStop = TRUE; diff --git a/sw/source/ui/dbui/mmdocselectpage.src b/sw/source/ui/dbui/mmdocselectpage.src index ace679af4f..9f6c1df5df 100644 --- a/sw/source/ui/dbui/mmdocselectpage.src +++ b/sw/source/ui/dbui/mmdocselectpage.src @@ -47,48 +47,56 @@ TabPage DLG_MM_DOCSELECT_PAGE }; RadioButton RB_CURRENTDOC { + HelpID = "sw:RadioButton:DLG_MM_DOCSELECT_PAGE:RB_CURRENTDOC"; Pos = MAP_APPFONT ( 12 , 48 ) ; Size = MAP_APPFONT ( 190 , 10 ) ; Text[ en-US ] = "Use the current ~document"; }; RadioButton RB_NEWDOC { + HelpID = "sw:RadioButton:DLG_MM_DOCSELECT_PAGE:RB_NEWDOC"; Pos = MAP_APPFONT ( 12 , 66 ) ; Size = MAP_APPFONT ( 190 , 10 ) ; Text[ en-US ] = "Create a ne~w document"; }; RadioButton RB_LOADDOC { + HelpID = "sw:RadioButton:DLG_MM_DOCSELECT_PAGE:RB_LOADDOC"; Pos = MAP_APPFONT ( 12 , 84) ; Size = MAP_APPFONT ( 190 , 10 ) ; Text[ en-US ] = "Start from ~existing document"; }; PushButton PB_LOADDOC { + HelpID = "sw:PushButton:DLG_MM_DOCSELECT_PAGE:PB_LOADDOC"; Pos = MAP_APPFONT ( 204 , 80) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "B~rowse..."; }; RadioButton RB_LOADTEMPLATE { + HelpID = "sw:RadioButton:DLG_MM_DOCSELECT_PAGE:RB_LOADTEMPLATE"; Pos = MAP_APPFONT ( 12 , 103 ) ; Size = MAP_APPFONT ( 190 , 10 ) ; Text[ en-US ] = "Start from a t~emplate"; }; PushButton PB_BROWSETEMPLATE { + HelpID = "sw:PushButton:DLG_MM_DOCSELECT_PAGE:PB_BROWSETEMPLATE"; Pos = MAP_APPFONT ( 204 , 99 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "B~rowse..."; }; RadioButton RB_RECENTDOC { + HelpID = "sw:RadioButton:DLG_MM_DOCSELECT_PAGE:RB_RECENTDOC"; Pos = MAP_APPFONT ( 12 , 120) ; Size = MAP_APPFONT ( 190 , 10 ) ; Text[ en-US ] = "Start fro~m a recently saved starting document"; }; ListBox LB_RECENTDOC { + HelpID = "sw:ListBox:DLG_MM_DOCSELECT_PAGE:LB_RECENTDOC"; Pos = MAP_APPFONT ( 20 , 134 ) ; Size = MAP_APPFONT ( 180 , 50 ) ; DropDown = TRUE; diff --git a/sw/source/ui/dbui/mmgreetingspage.src b/sw/source/ui/dbui/mmgreetingspage.src index fff77d9240..5cae953a35 100644 --- a/sw/source/ui/dbui/mmgreetingspage.src +++ b/sw/source/ui/dbui/mmgreetingspage.src @@ -144,6 +144,7 @@ TabPage DLG_MM_GREETINGS_PAGE }; CheckBox CB_GREETINGLINE { + HelpID = "sw:CheckBox:DLG_MM_GREETINGS_PAGE:CB_GREETINGLINE"; Pos = MAP_APPFONT ( 12 , 27 ); Size = MAP_APPFONT ( 242 , 10 ); Text[ en-US ] = "This document should contain a salutation"; @@ -163,6 +164,7 @@ TabPage DLG_MM_GREETINGS_PAGE }; PushButton PB_ASSIGN { + HelpID = "sw:PushButton:DLG_MM_GREETINGS_PAGE:PB_ASSIGN"; Pos = MAP_APPFONT ( 204 , 179 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "~Match fields..."; @@ -175,6 +177,7 @@ TabPage DLG_MM_GREETINGS_PAGE }; ImageButton IB_PREVSET { + HelpID = "sw:ImageButton:DLG_MM_GREETINGS_PAGE:IB_PREVSET"; Pos = MAP_APPFONT ( 177 , 204 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; SYMBOL = IMAGEBUTTON_PREV; @@ -182,6 +185,7 @@ TabPage DLG_MM_GREETINGS_PAGE }; ImageButton IB_NEXTSET { + HelpID = "sw:ImageButton:DLG_MM_GREETINGS_PAGE:IB_NEXTSET"; Pos = MAP_APPFONT ( 188 , 204 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; SYMBOL = IMAGEBUTTON_NEXT ; @@ -208,6 +212,7 @@ ModalDialog DLG_MM_MAILBODY Text [ en-US ] = "E-Mail Message"; CheckBox CB_GREETINGLINE { + HelpID = "sw:CheckBox:DLG_MM_MAILBODY:CB_GREETINGLINE"; Pos = MAP_APPFONT ( 6 , 3 ) ; Size = MAP_APPFONT ( 242 , 10 ) ; Text[ en-US ] = "This e-mail should contain a salutation"; @@ -221,6 +226,7 @@ ModalDialog DLG_MM_MAILBODY }; MultiLineEdit MLE_BODY { + HelpID = "sw:MultiLineEdit:DLG_MM_MAILBODY:MLE_BODY"; Pos = MAP_APPFONT ( 12, 151 ) ; Size = MAP_APPFONT ( 180 , 50 ) ; Border = TRUE; diff --git a/sw/source/ui/dbui/mmlayoutpage.src b/sw/source/ui/dbui/mmlayoutpage.src index 07582a45ef..94e1387306 100644 --- a/sw/source/ui/dbui/mmlayoutpage.src +++ b/sw/source/ui/dbui/mmlayoutpage.src @@ -48,6 +48,7 @@ TabPage DLG_MM_LAYOUT_PAGE }; CheckBox CB_ALIGN { + HelpID = "sw:CheckBox:DLG_MM_LAYOUT_PAGE:CB_ALIGN"; Pos = MAP_APPFONT ( 6 , 40 ) ; Size = MAP_APPFONT ( 118 , 10 ) ; Text[ en-US ] = "Align to text body"; @@ -60,6 +61,7 @@ TabPage DLG_MM_LAYOUT_PAGE }; MetricField MF_LEFT { + HelpID = "sw:MetricField:DLG_MM_LAYOUT_PAGE:MF_LEFT"; Pos = MAP_APPFONT ( 78 , 52 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -83,6 +85,7 @@ TabPage DLG_MM_LAYOUT_PAGE }; MetricField MF_TOP { + HelpID = "sw:MetricField:DLG_MM_LAYOUT_PAGE:MF_TOP"; Pos = MAP_APPFONT ( 78 , 67 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -112,6 +115,7 @@ TabPage DLG_MM_LAYOUT_PAGE }; PushButton MF_UP { + HelpID = "sw:PushButton:DLG_MM_LAYOUT_PAGE:MF_UP"; Pos = MAP_APPFONT ( 68 , 96 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "~Up"; @@ -124,6 +128,7 @@ TabPage DLG_MM_LAYOUT_PAGE }; PushButton PB_DOWN { + HelpID = "sw:PushButton:DLG_MM_LAYOUT_PAGE:PB_DOWN"; Pos = MAP_APPFONT ( 68 , 113 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "~Down"; @@ -143,6 +148,7 @@ TabPage DLG_MM_LAYOUT_PAGE }; ListBox LB_ZOOM { + HelpID = "sw:ListBox:DLG_MM_LAYOUT_PAGE:LB_ZOOM"; Pos = MAP_APPFONT ( 204 , 182 ) ; Size = MAP_APPFONT ( 50 , 50 ) ; Border = TRUE; diff --git a/sw/source/ui/dbui/mmmergepage.src b/sw/source/ui/dbui/mmmergepage.src index fd9fffc0de..8480e97e0e 100644 --- a/sw/source/ui/dbui/mmmergepage.src +++ b/sw/source/ui/dbui/mmmergepage.src @@ -49,6 +49,7 @@ TabPage DLG_MM_MERGE_PAGE }; PushButton PB_EDIT { + HelpID = "sw:PushButton:DLG_MM_MERGE_PAGE:PB_EDIT"; Pos = MAP_APPFONT ( 70 , 67 ) ; Size = MAP_APPFONT ( 120 , 14 ) ; Text [ en-US ] = "~Edit individual document..."; @@ -67,30 +68,35 @@ TabPage DLG_MM_MERGE_PAGE }; Edit ED_FIND { + HelpID = "sw:Edit:DLG_MM_MERGE_PAGE:ED_FIND"; Pos = MAP_APPFONT ( 55 ,114 ) ; Size = MAP_APPFONT ( 140 , 12 ) ; Border = TRUE; }; PushButton PB_FIND { + HelpID = "sw:PushButton:DLG_MM_MERGE_PAGE:PB_FIND"; Pos = MAP_APPFONT ( 198 ,113 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Find..."; }; CheckBox CB_WHOLEWORDS { + HelpID = "sw:CheckBox:DLG_MM_MERGE_PAGE:CB_WHOLEWORDS"; Pos = MAP_APPFONT ( 55 , 131 ) ; Size = MAP_APPFONT ( 180 , 10 ) ; Text [ en-US ] = "Whole wor~ds only"; }; CheckBox CB_BACKWARDS { + HelpID = "sw:CheckBox:DLG_MM_MERGE_PAGE:CB_BACKWARDS"; Pos = MAP_APPFONT ( 55 , 144 ) ; Size = MAP_APPFONT ( 180 , 10 ) ; Text [ en-US ] = "Back~wards"; }; CheckBox CB_MATCHCASE { + HelpID = "sw:CheckBox:DLG_MM_MERGE_PAGE:CB_MATCHCASE"; Pos = MAP_APPFONT ( 55 , 157 ) ; Size = MAP_APPFONT ( 180 , 10 ) ; Text [ en-US ] = "Ma~tch case"; diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index f3bb4b4663..5f03a2409f 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -782,7 +782,8 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton) aSaveMonitor.aPrintInfo.SetText(sStat); //now extract a document from the target document - SfxObjectShellRef xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); + // the shell will be closed at the end, but it is more safe to use SfxObjectShellLock here + SfxObjectShellLock xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xTempDocShell->DoInitNew( 0 ); SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 ); SwView* pTempView = static_cast<SwView*>( pTempFrame->GetViewShell() ); @@ -1020,8 +1021,6 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) if(nRet != RET_OK && nRet != RET_YES) return 0; } - //create the send dialog - SwSendMailDialog* pDlg = new SwSendMailDialog( pButton, rConfigItem ); //add the documents sal_uInt32 nBegin = 0; sal_uInt32 nEnd = 0; @@ -1047,7 +1046,26 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) switch( nDocType ) { case MM_DOCTYPE_OOO : break; - case MM_DOCTYPE_PDF : bIsPDF = true; break; + case MM_DOCTYPE_PDF : bIsPDF = true; + { + //the method SwIOSystemGetFilterOfFormat( ) returns the template filter + //because it uses the same user data :-( + SfxFilterMatcher aMatcher( pFilterContainer->GetName() ); + SfxFilterMatcherIter aIter( &aMatcher ); + const SfxFilter* pFilter = aIter.First(); + String sFilterMime( String::CreateFromAscii( "application/pdf" )); + while ( pFilter ) + { + if( pFilter->GetMimeType() == sFilterMime && pFilter->CanExport() ) + { + pSfxFlt = pFilter; + break; + } + pFilter = aIter.Next(); + } + + } + break; case MM_DOCTYPE_WORD: { //the method SwIOSystemGetFilterOfFormat( ) returns the template filter @@ -1153,6 +1171,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) uno::Reference< frame::XStorable > xStore( pTargetView->GetDocShell()->GetModel(), uno::UNO_QUERY); xStore->storeToURL( sTargetTempURL, aValues ); + //create the send dialog + SwSendMailDialog* pDlg = new SwSendMailDialog( pButton, rConfigItem ); pDlg->SetDocumentCount( nEnd ); pDlg->ShowDialog(); //help to force painting the dialog @@ -1166,7 +1186,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) SwDocMergeInfo& rInfo = rConfigItem.GetDocumentMergeInfo(nDoc); //now extract a document from the target document - SfxObjectShellRef xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); + // the shell will be closed at the end, but it is more safe to use SfxObjectShellLock here + SfxObjectShellLock xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xTempDocShell->DoInitNew( 0 ); SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 ); SwView* pTempView = static_cast<SwView*>( pTempFrame->GetViewShell() ); diff --git a/sw/source/ui/dbui/mmoutputpage.src b/sw/source/ui/dbui/mmoutputpage.src index 29e54bbb40..4801706083 100644 --- a/sw/source/ui/dbui/mmoutputpage.src +++ b/sw/source/ui/dbui/mmoutputpage.src @@ -48,24 +48,28 @@ TabPage DLG_MM_OUTPUT_PAGE }; RadioButton RB_SAVESTARTDOC { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_SAVESTARTDOC"; Pos = MAP_APPFONT ( 45 , 40 ) ; Size = MAP_APPFONT ( 209 , 10 ) ; Text[ en-US ] = "~Save starting document"; }; RadioButton RB_SAVEMERGEDDOC { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_SAVEMERGEDDOC"; Pos = MAP_APPFONT ( 45 , 53 ) ; Size = MAP_APPFONT ( 209 , 10 ) ; Text[ en-US ] = "Save ~merged document" ; }; RadioButton RB_PRINT { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_PRINT"; Pos = MAP_APPFONT ( 45 , 66 ) ; Size = MAP_APPFONT ( 209 , 10 ) ; Text[ en-US ] = "~Print merged document"; }; RadioButton RB_SENDMAIL { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_SENDMAIL"; Pos = MAP_APPFONT ( 45 , 79 ) ; Size = MAP_APPFONT ( 209 , 10 ) ; Text[ en-US ] = "Send merged document as ~E-Mail"; @@ -77,30 +81,35 @@ TabPage DLG_MM_OUTPUT_PAGE }; PushButton PB_SAVESTARTDOC { + HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_SAVESTARTDOC"; Pos = MAP_APPFONT ( 55 , 108 ) ; Size = MAP_APPFONT ( 100 , 14 ) ; Text[ en-US ] = "Save starting ~document"; }; RadioButton RB_SAVEASONE { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_SAVEASONE"; Pos = MAP_APPFONT ( 45 , 109 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text[ en-US ] = "S~ave as single document"; }; RadioButton RB_SAVEINDIVIDUAL { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_SAVEINDIVIDUAL"; Pos = MAP_APPFONT ( 45, 123 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text[ en-US ] = "Sa~ve as individual documents"; }; RadioButton RB_FROM { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_FROM"; Pos = MAP_APPFONT ( 45 , 137 ) ; Size = MAP_APPFONT ( 30 , 10 ) ; Text[ en-US ] = "~From"; }; NumericField NF_FROM { + HelpID = "sw:NumericField:DLG_MM_OUTPUT_PAGE:NF_FROM"; Pos = MAP_APPFONT ( 78 , 136 ) ; Size = MAP_APPFONT ( 20 , 10 ) ; Border = TRUE; @@ -120,6 +129,7 @@ TabPage DLG_MM_OUTPUT_PAGE }; NumericField NF_TO { + HelpID = "sw:NumericField:DLG_MM_OUTPUT_PAGE:NF_TO"; Pos = MAP_APPFONT ( 124 , 136 ) ; Size = MAP_APPFONT ( 20 , 10 ) ; Border = TRUE; @@ -132,6 +142,7 @@ TabPage DLG_MM_OUTPUT_PAGE }; PushButton PB_SAVENOW { + HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_SAVENOW"; Pos = MAP_APPFONT ( 45 , 150 ) ; Size = MAP_APPFONT ( 80 , 14 ) ; Text[ en-US ] = "Save Do~cuments"; @@ -144,6 +155,7 @@ TabPage DLG_MM_OUTPUT_PAGE }; ListBox LB_PRINT { + HelpID = "sw:ListBox:DLG_MM_OUTPUT_PAGE:LB_PRINT"; Pos = MAP_APPFONT ( 45 , 109 ) ; Size = MAP_APPFONT ( 147 , 50 ) ; Border = TRUE; @@ -152,18 +164,21 @@ TabPage DLG_MM_OUTPUT_PAGE }; PushButton PB_PRINTERSETTINGS { + HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_PRINTERSETTINGS"; Pos = MAP_APPFONT ( 198 , 108 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "P~roperties..."; }; RadioButton RB_PRINTALL { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_PRINTALL"; Pos = MAP_APPFONT ( 45 , 126 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text[ en-US ] = "Print ~all documents"; }; PushButton PB_PRINTNOW { + HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_PRINTNOW"; Pos = MAP_APPFONT ( 45 , 155 ) ; Size = MAP_APPFONT ( 80 , 14 ) ; Text[ en-US ] = "Prin~t Documents"; @@ -177,6 +192,7 @@ TabPage DLG_MM_OUTPUT_PAGE }; ListBox LB_MAILTO { + HelpID = "sw:ListBox:DLG_MM_OUTPUT_PAGE:LB_MAILTO"; Pos = MAP_APPFONT ( 45 , 109 ) ; Size = MAP_APPFONT ( 147 , 50 ) ; DropDown = TRUE; @@ -184,6 +200,7 @@ TabPage DLG_MM_OUTPUT_PAGE }; PushButton PB_COPYTO { + HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_COPYTO"; Pos = MAP_APPFONT ( 198 , 108 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "~Copy to..."; @@ -196,6 +213,7 @@ TabPage DLG_MM_OUTPUT_PAGE }; Edit ED_SUBJECT { + HelpID = "sw:Edit:DLG_MM_OUTPUT_PAGE:ED_SUBJECT"; Pos = MAP_APPFONT ( 45 , 125 ) ; Size = MAP_APPFONT ( 147 , 12 ) ; Border = TRUE; @@ -208,6 +226,7 @@ TabPage DLG_MM_OUTPUT_PAGE }; ListBox LB_SENDAS { + HelpID = "sw:ListBox:DLG_MM_OUTPUT_PAGE:LB_SENDAS"; Pos = MAP_APPFONT ( 45 , 141 ) ; Size = MAP_APPFONT (147 , 70 ) ; DropDown = TRUE; @@ -231,6 +250,7 @@ TabPage DLG_MM_OUTPUT_PAGE }; PushButton PB_SENDAS { + HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_SENDAS"; Pos = MAP_APPFONT ( 198 , 140 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "Pr~operties..."; @@ -243,18 +263,21 @@ TabPage DLG_MM_OUTPUT_PAGE }; Edit ED_ATTACHMENT { + HelpID = "sw:Edit:DLG_MM_OUTPUT_PAGE:ED_ATTACHMENT"; Pos = MAP_APPFONT ( 45 , 168 ) ; Size = MAP_APPFONT ( 147 , 12 ) ; Border = TRUE; }; RadioButton RB_SENDALL { + HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_SENDALL"; Pos = MAP_APPFONT ( 45 , 184 ) ; Size = MAP_APPFONT ( 153 , 10 ) ; Text[ en-US ] = "S~end all documents"; }; PushButton PB_SENDDOCUMENTS { + HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_SENDDOCUMENTS"; Pos = MAP_APPFONT ( 45 , 212 ) ; Size = MAP_APPFONT ( 80 , 14 ) ; Text[ en-US ] = "Se~nd documents"; @@ -321,6 +344,7 @@ ModalDialog DLG_MM_COPYTO }; Edit ED_CC { + HelpID = "sw:Edit:DLG_MM_COPYTO:ED_CC"; Pos = MAP_APPFONT ( 40 , 15 ) ; Size = MAP_APPFONT ( 204 , 12 ) ; Border = TRUE; @@ -333,6 +357,7 @@ ModalDialog DLG_MM_COPYTO }; Edit ED_BCC { + HelpID = "sw:Edit:DLG_MM_COPYTO:ED_BCC"; Pos = MAP_APPFONT ( 40 , 31 ) ; Size = MAP_APPFONT ( 204 , 12 ) ; Border = TRUE; @@ -396,6 +421,7 @@ ModalDialog DLG_MM_SAVEWARNING }; Edit ED_FILENAME { + HelpID = "sw:Edit:DLG_MM_SAVEWARNING:ED_FILENAME"; Pos = MAP_APPFONT ( 40 , 50 ) ; Size = MAP_APPFONT ( 154 , 12 ) ; Border = TRUE; @@ -439,6 +465,7 @@ ModalDialog DLG_MM_QUERY }; Edit ED_TEXT { + HelpID = "sw:Edit:DLG_MM_QUERY:ED_TEXT"; Pos = MAP_APPFONT ( 40 , 39 ) ; Size = MAP_APPFONT ( 194 , 12 ) ; Border = TRUE; diff --git a/sw/source/ui/dbui/mmoutputtypepage.src b/sw/source/ui/dbui/mmoutputtypepage.src index a6dd74cc7a..72d7e39365 100644 --- a/sw/source/ui/dbui/mmoutputtypepage.src +++ b/sw/source/ui/dbui/mmoutputtypepage.src @@ -48,12 +48,14 @@ TabPage DLG_MM_OUTPUTTYPE_PAGE }; RadioButton RB_LETTER { + HelpID = "sw:RadioButton:DLG_MM_OUTPUTTYPE_PAGE:RB_LETTER"; Pos = MAP_APPFONT ( 12 , 43 ) ; Size = MAP_APPFONT ( 240 , 10 ) ; Text[ en-US ] = "~Letter"; }; RadioButton RB_MAIL { + HelpID = "sw:RadioButton:DLG_MM_OUTPUTTYPE_PAGE:RB_MAIL"; Pos = MAP_APPFONT ( 12 , 57 ) ; Size = MAP_APPFONT ( 240 , 10 ) ; Text[ en-US ] = "~E-mail message"; diff --git a/sw/source/ui/dbui/mmpreparemergepage.src b/sw/source/ui/dbui/mmpreparemergepage.src index b1ecd375d4..c763cfa465 100644 --- a/sw/source/ui/dbui/mmpreparemergepage.src +++ b/sw/source/ui/dbui/mmpreparemergepage.src @@ -57,6 +57,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE PushButton PB_FIRST { + HelpID = "sw:PushButton:DLG_MM_PREPAREMERGE_PAGE:PB_FIRST"; Pos = MAP_APPFONT ( 75 , 55 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Text = "|<" ; @@ -64,6 +65,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE }; PushButton PB_PREV { + HelpID = "sw:PushButton:DLG_MM_PREPAREMERGE_PAGE:PB_PREV"; Pos = MAP_APPFONT ( 98 , 55 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Text = "<" ; @@ -71,6 +73,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE }; NumericField ED_RECORD { + HelpID = "sw:NumericField:DLG_MM_PREPAREMERGE_PAGE:ED_RECORD"; Pos = MAP_APPFONT ( 121 , 56 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; Border = TRUE ; @@ -83,6 +86,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE }; PushButton PB_NEXT { + HelpID = "sw:PushButton:DLG_MM_PREPAREMERGE_PAGE:PB_NEXT"; Pos = MAP_APPFONT ( 144 , 55 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Text = ">" ; @@ -90,6 +94,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE }; PushButton PB_LAST { + HelpID = "sw:PushButton:DLG_MM_PREPAREMERGE_PAGE:PB_LAST"; Pos = MAP_APPFONT ( 167 , 55 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; Text = ">|" ; @@ -97,6 +102,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE }; CheckBox CB_EXCLUDE { + HelpID = "sw:CheckBox:DLG_MM_PREPAREMERGE_PAGE:CB_EXCLUDE"; Pos = MAP_APPFONT ( 75, 77 ) ; Size = MAP_APPFONT ( 179 , 10 ) ; Text[ en-US ] = "E~xclude this recipient"; @@ -116,6 +122,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE }; PushButton PB_EDIT { + HelpID = "sw:PushButton:DLG_MM_PREPAREMERGE_PAGE:PB_EDIT"; Pos = MAP_APPFONT ( 90 , 185 ) ; Size = MAP_APPFONT ( 80 , 14 ) ; Text[ en-US ] = "~Edit Document..."; diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx index 1e31befb3d..2416b171be 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.cxx +++ b/sw/source/ui/dbui/selectdbtabledialog.cxx @@ -107,7 +107,7 @@ SwSelectDBTableDialog::SwSelectDBTableDialog(Window* pParent, static long nTabs[] = {3, 0, aSz.Width()/2, aSz.Width() }; m_aTableLB.SetTabs(&nTabs[0], MAP_PIXEL); m_aTableLB.SetHelpId(HID_MM_SELECTDBTABLEDDIALOG_LISTBOX); - m_aTableLB.SetWindowBits( WB_CLIPCHILDREN ); + m_aTableLB.SetStyle( m_aTableLB.GetStyle() | WB_CLIPCHILDREN ); m_aTableLB.SetSpaceBetweenEntries(3); m_aTableLB.SetSelectionMode( SINGLE_SELECTION ); m_aTableLB.SetDragDropMode( 0 ); diff --git a/sw/source/ui/dbui/selectdbtabledialog.src b/sw/source/ui/dbui/selectdbtabledialog.src index 467cb8333e..61d68f6fde 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.src +++ b/sw/source/ui/dbui/selectdbtabledialog.src @@ -54,6 +54,7 @@ ModalDialog DLG_MM_SELECTDBTABLEDDIALOG }; PushButton PB_PREVIEW { + HelpID = "sw:PushButton:DLG_MM_SELECTDBTABLEDDIALOG:PB_PREVIEW"; Pos = MAP_APPFONT ( 6 , 84 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Preview"; diff --git a/sw/source/ui/dialog/abstract.src b/sw/source/ui/dialog/abstract.src index ab5a86394b..a29b7e6339 100644 --- a/sw/source/ui/dialog/abstract.src +++ b/sw/source/ui/dialog/abstract.src @@ -53,6 +53,7 @@ ModalDialog DLG_INSERT_ABSTRACT }; NumericField NF_LEVEL { + HelpID = "sw:NumericField:DLG_INSERT_ABSTRACT:NF_LEVEL"; Border = TRUE ; Pos = MAP_APPFONT ( 153 , 12 ) ; Size = MAP_APPFONT ( 24 , 12 ) ; @@ -75,6 +76,7 @@ ModalDialog DLG_INSERT_ABSTRACT }; NumericField NF_PARA { + HelpID = "sw:NumericField:DLG_INSERT_ABSTRACT:NF_PARA"; Border = TRUE ; Pos = MAP_APPFONT ( 153 , 27 ) ; Size = MAP_APPFONT ( 24 , 12 ) ; diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx index cd9c8ddf10..7bfc22b7a5 100644 --- a/sw/source/ui/dialog/ascfldlg.cxx +++ b/sw/source/ui/dialog/ascfldlg.cxx @@ -55,6 +55,8 @@ #include <dialog.hrc> #include <ascfldlg.hrc> +#include "vcl/metric.hxx" + using namespace ::com::sun::star; @@ -167,12 +169,22 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh, pPrt = new SfxPrinter( pSet ); bDelPrinter = TRUE; } - - const USHORT nCount = pPrt->GetFontCount(); - for (USHORT i = 0; i < nCount; ++i) + + + // get the set of disctinct available family names + std::set< String > aFontNames; + int nFontNames = pPrt->GetDevFontCount(); + for( int i = 0; i < nFontNames; i++ ) + { + FontInfo aInf( pPrt->GetDevFont( i ) ); + aFontNames.insert( aInf.GetName() ); + } + + // insert to listbox + for( std::set< String >::const_iterator it = aFontNames.begin(); + it != aFontNames.end(); ++it ) { - const String &rStr = pPrt->GetFont(i)->GetName(); - aFontLB.InsertEntry( rStr ); + aFontLB.InsertEntry( *it ); } if( !aOpt.GetFontName().Len() ) diff --git a/sw/source/ui/dialog/ascfldlg.src b/sw/source/ui/dialog/ascfldlg.src index f10fed8a87..66be6d35c9 100644 --- a/sw/source/ui/dialog/ascfldlg.src +++ b/sw/source/ui/dialog/ascfldlg.src @@ -50,6 +50,7 @@ ModalDialog DLG_ASCII_FILTER }; ListBox LB_CHARSET { + HelpID = "sw:ListBox:DLG_ASCII_FILTER:LB_CHARSET"; Pos = MAP_APPFONT ( 80 , 14 ) ; Size = MAP_APPFONT ( 90 , 61 ) ; TabStop = TRUE ; @@ -64,6 +65,7 @@ ModalDialog DLG_ASCII_FILTER }; ListBox LB_FONT { + HelpID = "sw:ListBox:DLG_ASCII_FILTER:LB_FONT"; Pos = MAP_APPFONT ( 80 , 30 ) ; Size = MAP_APPFONT ( 90 , 61 ) ; TabStop = TRUE ; @@ -78,6 +80,7 @@ ModalDialog DLG_ASCII_FILTER }; ListBox LB_LANGUAGE { + HelpID = "sw:ListBox:DLG_ASCII_FILTER:LB_LANGUAGE"; Pos = MAP_APPFONT ( 80 , 46 ) ; Size = MAP_APPFONT ( 90 , 61 ) ; TabStop = TRUE ; @@ -92,6 +95,7 @@ ModalDialog DLG_ASCII_FILTER }; RadioButton RB_CRLF { + HelpID = "sw:RadioButton:DLG_ASCII_FILTER:RB_CRLF"; Pos = MAP_APPFONT ( 80 , 64 ) ; Size = MAP_APPFONT ( 40 , 10 ) ; TabStop = TRUE ; @@ -100,6 +104,7 @@ ModalDialog DLG_ASCII_FILTER }; RadioButton RB_CR { + HelpID = "sw:RadioButton:DLG_ASCII_FILTER:RB_CR"; Pos = MAP_APPFONT ( 121 , 64 ) ; Size = MAP_APPFONT ( 20 , 10 ) ; // TabStop = TRUE ; @@ -107,6 +112,7 @@ ModalDialog DLG_ASCII_FILTER }; RadioButton RB_LF { + HelpID = "sw:RadioButton:DLG_ASCII_FILTER:RB_LF"; Pos = MAP_APPFONT ( 155 , 64 ) ; Size = MAP_APPFONT ( 20 , 10 ) ; // TabStop = TRUE ; diff --git a/sw/source/ui/dialog/docstdlg.src b/sw/source/ui/dialog/docstdlg.src index 5926321d88..3cce7454c5 100644 --- a/sw/source/ui/dialog/docstdlg.src +++ b/sw/source/ui/dialog/docstdlg.src @@ -140,6 +140,7 @@ TabPage TP_DOC_STAT }; PushButton PB_PDATE { + HelpID = "sw:PushButton:TP_DOC_STAT:PB_PDATE"; Pos = MAP_APPFONT ( 204 , 94 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Update" ; diff --git a/sw/source/ui/dialog/makefile.mk b/sw/source/ui/dialog/makefile.mk deleted file mode 100644 index 033703f686..0000000000 --- a/sw/source/ui/dialog/makefile.mk +++ /dev/null @@ -1,99 +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. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=dialog -LIBTARGET=no - -# future: DEMO\dialog.srs - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - abstract.src \ - ascfldlg.src \ - dialog.src \ - docstdlg.src \ - regionsw.src \ - wordcountdialog.src - -EXCEPTIONSFILES = \ - $(SLO)$/SwSpellDialogChildWindow.obj \ - $(SLO)$/abstract.obj \ - $(SLO)$/addrdlg.obj \ - $(SLO)$/ascfldlg.obj \ - $(SLO)$/docstdlg.obj \ - $(SLO)$/macassgn.obj \ - $(SLO)$/regionsw.obj \ - $(SLO)$/swabstdlg.obj \ - $(SLO)$/swdialmgr.obj \ - $(SLO)$/swdlgfact.obj \ - $(SLO)$/swuiexp.obj \ - $(SLO)$/uiregionsw.obj \ - $(SLO)$/wordcountdialog.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - $(SLO)$/swwrtshitem.obj - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/regionsw.obj \ - $(SLO)$/swabstdlg.obj \ - $(SLO)$/SwSpellDialogChildWindow.obj \ - $(SLO)$/swwrtshitem.obj - -# $(SLO)$/macassgn.obj \ - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk -$(INCCOM)$/swuilib.hxx: makefile.mk -.IF "$(GUI)"=="UNX" - $(RM) $@ - echo \#define DLL_NAME \"libswui$(DLLPOSTFIX)$(DLLPOST)\" >$@ -.ELSE - echo \#define DLL_NAME \"swui$(DLLPOSTFIX)$(DLLPOST)\" >$@ -.ENDIF - -$(SLO)$/swabstdlg.obj : $(INCCOM)$/swuilib.hxx - - - - - - - diff --git a/sw/source/ui/dialog/regionsw.src b/sw/source/ui/dialog/regionsw.src index 980f267930..790a76cfbd 100644 --- a/sw/source/ui/dialog/regionsw.src +++ b/sw/source/ui/dialog/regionsw.src @@ -87,7 +87,7 @@ *************************************************************************/ ModalDialog MD_EDIT_REGION { - HelpID = FN_EDIT_REGION ; + HelpID = CMD_FN_EDIT_REGION ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 316 , 185 ) ; @@ -102,6 +102,7 @@ ModalDialog MD_EDIT_REGION }; Edit ED_RANAME { + HelpID = "sw:Edit:MD_EDIT_REGION:ED_RANAME"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 71 , 12 ) ; @@ -124,6 +125,7 @@ ModalDialog MD_EDIT_REGION }; TriStateBox CB_FILE { + HelpID = "sw:TriStateBox:MD_EDIT_REGION:CB_FILE"; Pos = MAP_APPFONT ( 98 , 14 ) ; Size = MAP_APPFONT ( 59 , 10 ) ; TabStop = TRUE ; @@ -131,6 +133,7 @@ ModalDialog MD_EDIT_REGION }; CheckBox CB_DDE { + HelpID = "sw:CheckBox:MD_EDIT_REGION:CB_DDE"; Pos = MAP_APPFONT ( 98 , 28 ) ; Size = MAP_APPFONT ( 30 , 10 ) ; Disable = TRUE ; @@ -152,6 +155,7 @@ ModalDialog MD_EDIT_REGION }; Edit ED_FILE { + HelpID = "sw:Edit:MD_EDIT_REGION:ED_FILE"; Border = TRUE ; Pos = MAP_APPFONT ( 165 , 42 ) ; Size = MAP_APPFONT ( 68 , 12 ) ; @@ -160,6 +164,7 @@ ModalDialog MD_EDIT_REGION }; PushButton PB_FILE { + HelpID = "sw:PushButton:MD_EDIT_REGION:PB_FILE"; Pos = MAP_APPFONT ( 239 , 42 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; TabStop = TRUE ; @@ -175,6 +180,7 @@ ModalDialog MD_EDIT_REGION }; ComboBox LB_SUBREG { + HelpID = "sw:ComboBox:MD_EDIT_REGION:LB_SUBREG"; Pos = MAP_APPFONT ( 165 , 57 ) ; Size = MAP_APPFONT ( 68 , 50 ) ; Disable = TRUE ; @@ -191,6 +197,7 @@ ModalDialog MD_EDIT_REGION }; TriStateBox CB_PROTECT { + HelpID = "sw:TriStateBox:MD_EDIT_REGION:CB_PROTECT"; Pos = MAP_APPFONT ( 98 , 86 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; TabStop = TRUE ; @@ -200,6 +207,7 @@ ModalDialog MD_EDIT_REGION }; CheckBox CB_PASSWD { + HelpID = "sw:CheckBox:MD_EDIT_REGION:CB_PASSWD"; Pos = MAP_APPFONT ( 107 , 100 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -207,6 +215,7 @@ ModalDialog MD_EDIT_REGION }; PushButton PB_PASSWD { + HelpID = "sw:PushButton:MD_EDIT_REGION:PB_PASSWD"; Pos = MAP_APPFONT ( 239 , 98 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; TabStop = TRUE ; @@ -221,6 +230,7 @@ ModalDialog MD_EDIT_REGION }; TriStateBox CB_HIDE { + HelpID = "sw:TriStateBox:MD_EDIT_REGION:CB_HIDE"; Pos = MAP_APPFONT ( 98 , 127 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; TabStop = TRUE ; @@ -236,6 +246,7 @@ ModalDialog MD_EDIT_REGION }; Edit ED_CONDITION { + HelpID = "sw:Edit:MD_EDIT_REGION:ED_CONDITION"; Border = TRUE ; Pos = MAP_APPFONT ( 165 , 141) ; Size = MAP_APPFONT ( 86 , 12 ) ; @@ -252,6 +263,7 @@ ModalDialog MD_EDIT_REGION }; TriStateBox CB_EDIT_IN_READONLY { + HelpID = "sw:TriStateBox:MD_EDIT_REGION:CB_EDIT_IN_READONLY"; Pos = MAP_APPFONT ( 98 , 170 ) ; Size = MAP_APPFONT ( 156 , 10 ) ; TabStop = TRUE ; @@ -275,6 +287,7 @@ ModalDialog MD_EDIT_REGION }; PushButton PB_OPTIONS { + HelpID = "sw:PushButton:MD_EDIT_REGION:PB_OPTIONS"; Pos = MAP_APPFONT ( 263 , 40 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -283,6 +296,7 @@ ModalDialog MD_EDIT_REGION }; PushButton CB_DISMISS { + HelpID = "sw:PushButton:MD_EDIT_REGION:CB_DISMISS"; Pos = MAP_APPFONT ( 263 , 57 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Disable = TRUE ; @@ -406,6 +420,7 @@ TabPage TP_INSERT_SECTION }; ComboBox ED_RNAME { + HelpID = "sw:ComboBox:TP_INSERT_SECTION:ED_RNAME"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 69 , 140 ) ; TabStop = TRUE ; @@ -421,6 +436,7 @@ TabPage TP_INSERT_SECTION }; CheckBox CB_FILE { + HelpID = "sw:CheckBox:TP_INSERT_SECTION:CB_FILE"; Pos = MAP_APPFONT ( 96 , 14 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; TabStop = TRUE ; @@ -428,6 +444,7 @@ TabPage TP_INSERT_SECTION }; CheckBox CB_DDE { + HelpID = "sw:CheckBox:TP_INSERT_SECTION:CB_DDE"; Pos = MAP_APPFONT ( 96 , 28) ; Size = MAP_APPFONT ( 60 , 10 ) ; Disable = TRUE ; @@ -449,6 +466,7 @@ TabPage TP_INSERT_SECTION }; Edit ED_FILE { + HelpID = "sw:Edit:TP_INSERT_SECTION:ED_FILE"; Border = TRUE ; Pos = MAP_APPFONT ( 160 , 42 ) ; Size = MAP_APPFONT ( 76 , 12 ) ; @@ -457,6 +475,7 @@ TabPage TP_INSERT_SECTION }; PushButton PB_FILE { + HelpID = "sw:PushButton:TP_INSERT_SECTION:PB_FILE"; Pos = MAP_APPFONT ( 239 , 42 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; Disable = TRUE ; @@ -472,6 +491,7 @@ TabPage TP_INSERT_SECTION }; ComboBox LB_SUBREG { + HelpID = "sw:ComboBox:TP_INSERT_SECTION:LB_SUBREG"; Pos = MAP_APPFONT ( 160 , 58 ) ; Size = MAP_APPFONT ( 76 , 50 ) ; DropDown = TRUE ; @@ -488,6 +508,7 @@ TabPage TP_INSERT_SECTION }; CheckBox CB_PROTECT { + HelpID = "sw:CheckBox:TP_INSERT_SECTION:CB_PROTECT"; Pos = MAP_APPFONT ( 96 , 87 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -495,6 +516,7 @@ TabPage TP_INSERT_SECTION }; CheckBox CB_PASSWD { + HelpID = "sw:CheckBox:TP_INSERT_SECTION:CB_PASSWD"; Pos = MAP_APPFONT ( 105 , 101 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -502,6 +524,7 @@ TabPage TP_INSERT_SECTION }; PushButton PB_PASSWD { + HelpID = "sw:PushButton:TP_INSERT_SECTION:PB_PASSWD"; Pos = MAP_APPFONT ( 239 , 99 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; TabStop = TRUE ; @@ -516,6 +539,7 @@ TabPage TP_INSERT_SECTION }; CheckBox CB_HIDE { + HelpID = "sw:CheckBox:TP_INSERT_SECTION:CB_HIDE"; Pos = MAP_APPFONT ( 96 , 128 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; CB_HIDE_TEXT @@ -529,6 +553,7 @@ TabPage TP_INSERT_SECTION }; Edit ED_CONDITION { + HelpID = "sw:Edit:TP_INSERT_SECTION:ED_CONDITION"; Border = TRUE ; Pos = MAP_APPFONT ( 160 , 142 ) ; Size = MAP_APPFONT ( 91 , 12 ) ; @@ -545,6 +570,7 @@ TabPage TP_INSERT_SECTION }; CheckBox CB_EDIT_IN_READONLY { + HelpID = "sw:CheckBox:TP_INSERT_SECTION:CB_EDIT_IN_READONLY"; Pos = MAP_APPFONT ( 96 , 170 ) ; Size = MAP_APPFONT ( 158 , 10 ) ; CB_EDIT_IN_READONLY_TEXT @@ -609,6 +635,7 @@ TabPage TP_SECTION_FTNENDNOTES }; CheckBox CB_FTN_AT_TXTEND { + HelpID = "sw:CheckBox:TP_SECTION_FTNENDNOTES:CB_FTN_AT_TXTEND"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; TabStop = TRUE ; @@ -617,6 +644,7 @@ TabPage TP_SECTION_FTNENDNOTES }; CheckBox CB_FTN_NUM { + HelpID = "sw:CheckBox:TP_SECTION_FTNENDNOTES:CB_FTN_NUM"; Pos = MAP_APPFONT ( 18 , 29 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -631,6 +659,7 @@ TabPage TP_SECTION_FTNENDNOTES }; NumericField FLD_FTN_OFFSET { + HelpID = "sw:NumericField:TP_SECTION_FTNENDNOTES:FLD_FTN_OFFSET"; Pos = MAP_APPFONT ( 90 , 44 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; Spin = TRUE ; @@ -643,6 +672,7 @@ TabPage TP_SECTION_FTNENDNOTES }; CheckBox CB_FTN_NUM_FMT { + HelpID = "sw:CheckBox:TP_SECTION_FTNENDNOTES:CB_FTN_NUM_FMT"; Pos = MAP_APPFONT ( 24 , 61 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -657,6 +687,7 @@ TabPage TP_SECTION_FTNENDNOTES }; Edit ED_FTN_PREFIX { + HelpID = "sw:Edit:TP_SECTION_FTNENDNOTES:ED_FTN_PREFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 90 , 74 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; @@ -666,6 +697,7 @@ TabPage TP_SECTION_FTNENDNOTES }; ListBox LB_FTN_NUMVIEW { + HelpID = "sw:ListBox:TP_SECTION_FTNENDNOTES:LB_FTN_NUMVIEW"; Border = TRUE ; Pos = MAP_APPFONT ( 123 , 74 ) ; Size = MAP_APPFONT ( 62 , 50 ) ; @@ -682,6 +714,7 @@ TabPage TP_SECTION_FTNENDNOTES }; Edit ED_FTN_SUFFIX { + HelpID = "sw:Edit:TP_SECTION_FTNENDNOTES:ED_FTN_SUFFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 219 , 74 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; @@ -700,6 +733,7 @@ TabPage TP_SECTION_FTNENDNOTES }; CheckBox CB_END_AT_TXTEND { + HelpID = "sw:CheckBox:TP_SECTION_FTNENDNOTES:CB_END_AT_TXTEND"; Pos = MAP_APPFONT ( 12 , 103 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -707,6 +741,7 @@ TabPage TP_SECTION_FTNENDNOTES }; CheckBox CB_END_NUM { + HelpID = "sw:CheckBox:TP_SECTION_FTNENDNOTES:CB_END_NUM"; Pos = MAP_APPFONT ( 16 , 118 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -721,6 +756,7 @@ TabPage TP_SECTION_FTNENDNOTES }; NumericField FLD_END_OFFSET { + HelpID = "sw:NumericField:TP_SECTION_FTNENDNOTES:FLD_END_OFFSET"; Pos = MAP_APPFONT ( 90 , 133 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; Spin = TRUE ; @@ -733,6 +769,7 @@ TabPage TP_SECTION_FTNENDNOTES }; CheckBox CB_END_NUM_FMT { + HelpID = "sw:CheckBox:TP_SECTION_FTNENDNOTES:CB_END_NUM_FMT"; Pos = MAP_APPFONT ( 24 , 150 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -748,6 +785,7 @@ TabPage TP_SECTION_FTNENDNOTES }; Edit ED_END_PREFIX { + HelpID = "sw:Edit:TP_SECTION_FTNENDNOTES:ED_END_PREFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 90 , 163 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; @@ -757,6 +795,7 @@ TabPage TP_SECTION_FTNENDNOTES }; ListBox LB_END_NUMVIEW { + HelpID = "sw:ListBox:TP_SECTION_FTNENDNOTES:LB_END_NUMVIEW"; Border = TRUE ; Pos = MAP_APPFONT ( 123 , 163 ) ; Size = MAP_APPFONT ( 62 , 50 ) ; @@ -774,6 +813,7 @@ TabPage TP_SECTION_FTNENDNOTES }; Edit ED_END_SUFFIX { + HelpID = "sw:Edit:TP_SECTION_FTNENDNOTES:ED_END_SUFFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 219 , 163 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; @@ -805,6 +845,7 @@ TabPage TP_SECTION_INDENTS }; MetricField MF_BEFORE { + HelpID = "sw:MetricField:TP_SECTION_INDENTS:MF_BEFORE"; Border = TRUE ; Pos = MAP_APPFONT ( 135 , 14 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -828,6 +869,7 @@ TabPage TP_SECTION_INDENTS }; MetricField MF_AFTER { + HelpID = "sw:MetricField:TP_SECTION_INDENTS:MF_AFTER"; Border = TRUE ; Pos = MAP_APPFONT ( 135 , 30 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; diff --git a/sw/source/ui/dialog/swabstdlg.cxx b/sw/source/ui/dialog/swabstdlg.cxx index f6f9756a85..797118c339 100644 --- a/sw/source/ui/dialog/swabstdlg.cxx +++ b/sw/source/ui/dialog/swabstdlg.cxx @@ -30,10 +30,10 @@ #include "precompiled_sw.hxx" #include "swabstdlg.hxx" -#include "swuilib.hxx" #include <osl/module.hxx> #include <tools/string.hxx> +#include <vcl/unohelp.hxx> typedef SwAbstractDialogFactory* (__LOADONCALLAPI *SwFuncPtrCreateDialogFactory)(); @@ -43,7 +43,8 @@ SwAbstractDialogFactory* SwAbstractDialogFactory::Create() { SwFuncPtrCreateDialogFactory fp = 0; static ::osl::Module aDialogLibrary; - if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, String( RTL_CONSTASCII_USTRINGPARAM( DLL_NAME ) ) ) ) + static const ::rtl::OUString sLibName(::vcl::unohelper::CreateLibraryName("swui", TRUE)); + if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, String( sLibName ) ) ) fp = ( SwAbstractDialogFactory* (__LOADONCALLAPI*)() ) aDialogLibrary.getFunctionSymbol( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CreateDialogFactory"))); if ( fp ) diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index c0b05c8501..3cfaca4e52 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -427,9 +427,9 @@ String AbstractInsFootNoteDlg_Impl::GetStr() return pDlg->GetStr(); } -void AbstractInsFootNoteDlg_Impl::SetHelpId( ULONG nHelpId ) +void AbstractInsFootNoteDlg_Impl::SetHelpId( const rtl::OString& sHelpId ) { - pDlg->SetHelpId( nHelpId ); + pDlg->SetHelpId( sHelpId ); } void AbstractInsFootNoteDlg_Impl::SetText( const XubString& rStr ) diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index 9811b09f59..6bf5b241ad 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -283,7 +283,7 @@ class AbstractInsFootNoteDlg_Impl : public AbstractInsFootNoteDlg virtual BOOL IsEndNote(); virtual String GetStr(); //from class Window - virtual void SetHelpId( ULONG nHelpId ); + virtual void SetHelpId( const rtl::OString& sHelpId ); virtual void SetText( const XubString& rStr ); }; //for SwInsFootNoteDlg end @@ -584,5 +584,4 @@ struct SwDialogsResMgr #endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index f705b24e8b..4867695d3e 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -422,7 +422,7 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh ) aTree.SetHelpId(HID_REGION_TREE); aTree.SetSelectionMode( MULTIPLE_SELECTION ); - aTree.SetWindowBits(WB_HASBUTTONSATROOT|WB_CLIPCHILDREN|WB_HSCROLL); + aTree.SetStyle(aTree.GetStyle()|WB_HASBUTTONSATROOT|WB_CLIPCHILDREN|WB_HSCROLL); aTree.SetSpaceBetweenEntries(0); if(bWeb) diff --git a/sw/source/ui/dochdl/dochdl.src b/sw/source/ui/dochdl/dochdl.src index 2afd19c92b..2afd19c92b 100644..100755 --- a/sw/source/ui/dochdl/dochdl.src +++ b/sw/source/ui/dochdl/dochdl.src diff --git a/sw/source/ui/dochdl/gloshdl.cxx b/sw/source/ui/dochdl/gloshdl.cxx index 83b84720cd..83b84720cd 100644..100755 --- a/sw/source/ui/dochdl/gloshdl.cxx +++ b/sw/source/ui/dochdl/gloshdl.cxx diff --git a/sw/source/ui/dochdl/makefile.mk b/sw/source/ui/dochdl/makefile.mk deleted file mode 100644 index 5728eaa3c3..0000000000 --- a/sw/source/ui/dochdl/makefile.mk +++ /dev/null @@ -1,65 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=dochdl -LIBTARGET=no -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - dochdl.src \ - selglos.src - -SLOFILES = \ - $(EXCEPTIONSFILES) - -EXCEPTIONSFILES = \ - $(SLO)$/gloshdl.obj \ - $(SLO)$/selglos.obj \ - $(SLO)$/swdtflvr.obj - -# $(SLO)$/dataex.obj \ - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/gloshdl.obj \ - $(SLO)$/swdtflvr.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/dochdl/selglos.src b/sw/source/ui/dochdl/selglos.src index 81162518c1..5a79079fe7 100644 --- a/sw/source/ui/dochdl/selglos.src +++ b/sw/source/ui/dochdl/selglos.src @@ -33,7 +33,7 @@ // #define DLG_SEL_GLOS 256 ModalDialog DLG_SEL_GLOS { - HelpID = FN_EXPAND_GLOSSARY ; + HelpID = CMD_FN_EXPAND_GLOSSARY ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 220 , 100 ) ; @@ -68,6 +68,7 @@ ModalDialog DLG_SEL_GLOS }; ListBox LB_GLOS { + HelpID = "sw:ListBox:DLG_SEL_GLOS:LB_GLOS"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 140 , 74 ) ; diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx index 3bb769db81..a4c87913d4 100644 --- a/sw/source/ui/dochdl/swdtflvr.cxx +++ b/sw/source/ui/dochdl/swdtflvr.cxx @@ -325,6 +325,19 @@ static SwDoc * lcl_GetDoc(SwDocFac & rDocFac) return pDoc; } +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(); @@ -433,14 +446,14 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor ) pClpDocFac = new SwDocFac; SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac); - pTmpDoc->SetRefForDocShell( boost::addressof(aDocShellRef) ); pTmpDoc->LockExpFlds(); // nie die Felder updaten - Text so belassen pWrtShell->Copy( pTmpDoc ); // es wurde in der CORE eine neu angelegt (OLE-Objekte kopiert!) + aDocShellRef = pTmpDoc->GetTmpDocShell(); if( aDocShellRef.Is() ) SwTransferable::InitOle( aDocShellRef, *pTmpDoc ); - pTmpDoc->SetRefForDocShell( 0 ); + pTmpDoc->SetTmpDocShell( (SfxObjectShell*)NULL ); if( nSelectionType & nsSelectionType::SEL_TXT && !pWrtShell->HasMark() ) { @@ -839,7 +852,6 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut ) SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac); - pTmpDoc->SetRefForDocShell( boost::addressof(aDocShellRef) ); pTmpDoc->LockExpFlds(); // nie die Felder updaten - Text so belassen pWrtShell->Copy( pTmpDoc ); @@ -862,9 +874,10 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut ) } // es wurde in der CORE eine neu angelegt (OLE-Objekte kopiert!) + aDocShellRef = pTmpDoc->GetTmpDocShell(); if( aDocShellRef.Is() ) SwTransferable::InitOle( aDocShellRef, *pTmpDoc ); - pTmpDoc->SetRefForDocShell( 0 ); + pTmpDoc->SetTmpDocShell( (SfxObjectShell*)NULL ); if( pWrtShell->IsObjSelected() ) eBufferType = TRNSFR_DRAWING; @@ -1018,15 +1031,15 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary, SwCntntNode* pCNd = rNds.GoNext( &aNodeIdx ); // gehe zum 1. ContentNode SwPaM aPam( *pCNd ); - pCDoc->SetRefForDocShell( boost::addressof(aDocShellRef) ); pCDoc->LockExpFlds(); // nie die Felder updaten - Text so belassen pCDoc->InsertGlossary( rGlossary, rStr, aPam, 0 ); // es wurde in der CORE eine neu angelegt (OLE-Objekte kopiert!) + aDocShellRef = pCDoc->GetTmpDocShell(); if( aDocShellRef.Is() ) SwTransferable::InitOle( aDocShellRef, *pCDoc ); - pCDoc->SetRefForDocShell( 0 ); + pCDoc->SetTmpDocShell( (SfxObjectShell*)NULL ); eBufferType = TRNSFR_DOCUMENT; @@ -3487,6 +3500,19 @@ SwTransferable* SwTransferable::GetSwTransferable( const TransferableDataHelper& } + + uno::Reference<XUnoTunnel> xTunnel( rData.GetTransferable(), UNO_QUERY ); + if ( xTunnel.is() ) + { + sal_Int64 nHandle = xTunnel->getSomething( getUnoTunnelId() ); + if ( nHandle ) + pSwTransferable = (SwTransferable*) (sal_IntPtr) nHandle; + } + + return pSwTransferable; + +} + SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh ) : rTrnsfr( rTrans ), pDocShell( 0 ), bDelBookmrk( FALSE ), bInDisconnect( FALSE ) diff --git a/sw/source/ui/docvw/AnnotationMenuButton.cxx b/sw/source/ui/docvw/AnnotationMenuButton.cxx index 27f7ddb789..995961ffb0 100644 --- a/sw/source/ui/docvw/AnnotationMenuButton.cxx +++ b/sw/source/ui/docvw/AnnotationMenuButton.cxx @@ -83,20 +83,13 @@ void AnnotationMenuButton::MouseButtonDown( const MouseEvent& rMEvt ) if ( mrSidebarWin.IsReadOnly() ) { pButtonPopup->EnableItem( FN_REPLY, false ); - pButtonPopup->EnableItem( FN_DELETE_NOTE, false ); + pButtonPopup->EnableItem( FN_DELETE_COMMENT, 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_COMMENT, !mrSidebarWin.IsProtected() ); pButtonPopup->EnableItem( FN_DELETE_NOTE_AUTHOR, true ); pButtonPopup->EnableItem( FN_DELETE_ALL_NOTES, true ); } diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx index 7dcdad761e..3bb39ee653 100644 --- a/sw/source/ui/docvw/PostItMgr.cxx +++ b/sw/source/ui/docvw/PostItMgr.cxx @@ -98,6 +98,7 @@ using namespace sw::sidebarwindows; + bool comp_pos(const SwSidebarItem* a, const SwSidebarItem* b) { // sort by anchor position @@ -716,6 +717,15 @@ void SwPostItMgr::LayoutPostIts() OSL_ENSURE(mPages[n]->bScrollbar,"SwPostItMgr::LayoutByPage(): note overlaps, but bScrollbar is not true"); } } + + for(SwSidebarWin_iterator i = aVisiblePostItList.begin(); i!= aVisiblePostItList.end() ; i++) + { + if ((*i)->HasChildPathFocus()) + { + MakeVisible((*i),n+1); + break; + } + } } else { @@ -1193,6 +1203,7 @@ void SwPostItMgr::Delete() mpWrtShell->DelRight(); } + mpWrtShell->EndUndo( UNDO_DELETE ); PrepareView(); mpWrtShell->EndAllAction(); @@ -1245,7 +1256,6 @@ void SwPostItMgr::Sort(const short aType) } } } - SwSidebarWin* SwPostItMgr::GetSidebarWin( const SfxBroadcaster* pBroadcaster) const { for(const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; ++i) @@ -1530,6 +1540,7 @@ void SwPostItMgr::CorrectPositions() { // check, if anchor overlay object exists. if ( (*i)->bShow && (*i)->pPostIt && (*i)->pPostIt->Anchor() ) + // <-- { aAnchorPosX = mPages[n]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT ? mpEditWin->LogicToPixel( Point((long)((*i)->pPostIt->Anchor()->GetSeventhPosition().getX()),0)).X() @@ -1912,4 +1923,4 @@ void SwPostItMgr::GetAllSidebarWinForFrm( const SwFrm& rFrm, void SwNoteProps::Commit() {} void SwNoteProps::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {} -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/sw/source/ui/docvw/docvw.src b/sw/source/ui/docvw/docvw.src index dcd0f98103..459b673cb1 100644 --- a/sw/source/ui/docvw/docvw.src +++ b/sw/source/ui/docvw/docvw.src @@ -36,56 +36,56 @@ Menu MN_READONLY_POPUP MenuItem { Identifier = MN_READONLY_OPENURL ; - HelpID = SID_OPENDOC ; + HelpId = CMD_SID_OPENDOC ; Text [ en-US ] = "~Open" ; }; MenuItem { Identifier = MN_READONLY_OPENURLNEW ; - HelpID = SID_OPENDOC ; + HelpId = CMD_SID_OPENDOC ; Text [ en-US ] = "Open in New Window" ; }; MenuItem { Identifier = MN_READONLY_EDITDOC ; - HelpID = SID_EDITDOC ; + HelpId = CMD_SID_EDITDOC ; Text [ en-US ] = "~Edit" ; }; MenuItem { Identifier = MN_READONLY_SELECTION_MODE ; - HelpID = FN_READONLY_SELECTION_MODE ; + HelpId = CMD_FN_READONLY_SELECTION_MODE ; Text [ en-US ] = "Select Text"; }; MenuItem { Identifier = MN_READONLY_RELOAD; - HelpID = SID_RELOAD; + HelpId = CMD_SID_RELOAD; Text [ en-US ] = "Re~load"; }; MenuItem { Identifier = MN_READONLY_RELOAD_FRAME; - HelpID = SID_RELOAD; + HelpId = CMD_SID_RELOAD; Text [ en-US ] = "Reload Frame"; }; MenuItem { Identifier = MN_READONLY_SOURCEVIEW ; - HelpID = HID_SOURCEVIEW ; + HelpId = HID_SOURCEVIEW ; Text [ en-US ] = "HT~ML Source" ; }; SEPARATOR MenuItem { Identifier = MN_READONLY_BROWSE_BACKWARD ; - HelpID = SID_BROWSE_BACKWARD ; + HelpId = CMD_SID_BROWSE_BACKWARD ; Text [ en-US ] = "Backwards" ; }; MenuItem { Identifier = MN_READONLY_BROWSE_FORWARD ; - HelpID = SID_BROWSE_FORWARD ; + HelpId = CMD_SID_BROWSE_FORWARD ; Text [ en-US ] = "~Forward" ; }; SEPARATOR @@ -190,14 +190,14 @@ Menu MN_READONLY_POPUP MenuItem { Identifier = SID_WIN_FULLSCREEN; - HelpID = SID_WIN_FULLSCREEN; + HelpId = CMD_SID_WIN_FULLSCREEN; Text [ en-US ] = "Leave Full-Screen Mode" ; }; SEPARATOR MenuItem { Identifier = MN_READONLY_COPY ; - HelpID = SID_COPY; + HelpId = CMD_SID_COPY; Text [ en-US ] = "~Copy" ; }; }; diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 3ecabc729f..e129b90af4 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -187,8 +187,10 @@ class SwAnchorMarker Point aHdlPos; Point aLastPos; bool bTopRightHandle; + bool bTopRightHandle; + // <-- public: - SwAnchorMarker( SdrHdl* pH ) + SwAnchorMarker( SdrHdl* pH ) : pHdl( pH ) , aHdlPos( pH->GetPos() ) , aLastPos( pH->GetPos() ) @@ -199,8 +201,8 @@ public: void SetPos( const Point& rNew ) { pHdl->SetPos( rNew ); } const Point& GetPos() { return pHdl->GetPos(); } const Point& GetHdlPos() { return aHdlPos; } - void ChgHdl( SdrHdl* pNew ) - { + void ChgHdl( SdrHdl* pNew ) + { pHdl = pNew; if ( pHdl ) { @@ -658,7 +660,7 @@ void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, BOOL bObjSelect ) if (bObjSelect) rView.GetDrawFuncPtr()->Activate( SID_OBJECT_SELECT ); else - rView.GetDrawFuncPtr()->Activate( sal::static_int_cast< USHORT >(eSdrObjectKind) ); + rView.GetDrawFuncPtr()->Activate( sal::static_int_cast< USHORT >(eSdrObjectKind) ); // don't know if this is useful at all; but it keeps functionality as it was... bInsFrm = FALSE; nInsFrmColCount = 1; } @@ -1160,7 +1162,7 @@ void SwEditWin::ChangeDrawing( BYTE nDir ) BOOL bDummy; bool bVertAnchor = rSh.IsFrmVertical( TRUE, bDummy ); bool bHoriMove = !bVertAnchor == !( nDir % 2 ); - bool bMoveAllowed = + const bool bMoveAllowed = !bHoriMove || (rSh.GetAnchorId() != FLY_AS_CHAR); if ( bMoveAllowed ) { @@ -2290,6 +2292,12 @@ KEYINPUT_CHECKTABLE_INSDEL: ChgToEnEmDash | SetINetAttr | Autocorrect ) && !rSh.HasReadonlySel() ) + /* { + pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd | + ChgFractionSymbol | ChgOrdinalNumber | + ChgToEnEmDash | SetINetAttr | + Autocorrect ) && + !rSh.HasReadonlySel() ) */ { FlushInBuffer(); rSh.AutoCorrect( *pACorr, static_cast< sal_Unicode >('\0') ); diff --git a/sw/source/ui/docvw/edtwin2.cxx b/sw/source/ui/docvw/edtwin2.cxx index a6df9a3aa6..9472f7308c 100644 --- a/sw/source/ui/docvw/edtwin2.cxx +++ b/sw/source/ui/docvw/edtwin2.cxx @@ -303,8 +303,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) { USHORT nOldSubType = pFld->GetSubType(); ((SwField*)pFld)->SetSubType(nsSwExtendedSubType::SUB_CMD); - sTxt = - pFld->ExpandField(rSh.GetDoc()->IsClipBoard()); + sTxt = pFld->ExpandField(true); ((SwField*)pFld)->SetSubType(nOldSubType); } break; @@ -321,7 +320,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) break; case RES_DBFLD: - sTxt = ((SwDBField*)pFld)->GetCntnt(TRUE); + sTxt = pFld->GetFieldName(); break; case RES_USERFLD: diff --git a/sw/source/ui/docvw/frmsidebarwincontainer.hxx b/sw/source/ui/docvw/frmsidebarwincontainer.hxx index 4df59c86d1..45a04fd84f 100644 --- a/sw/source/ui/docvw/frmsidebarwincontainer.hxx +++ b/sw/source/ui/docvw/frmsidebarwincontainer.hxx @@ -1,9 +1,8 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * @@ -69,4 +68,3 @@ class SwFrmSidebarWinContainer #endif -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/docvw/makefile.mk b/sw/source/ui/docvw/makefile.mk deleted file mode 100644 index 5e9f739a77..0000000000 --- a/sw/source/ui/docvw/makefile.mk +++ /dev/null @@ -1,70 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=docvw -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - access.src \ - docvw.src \ - annotation.src - -SLOFILES = \ - $(SLO)$/edtdd.obj \ - $(SLO)$/edtwin.obj \ - $(SLO)$/edtwin2.obj \ - $(SLO)$/edtwin3.obj \ - $(SLO)$/romenu.obj \ - $(SLO)$/extedit.obj \ - $(SLO)$/srcedtw.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 ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx index e96163283b..5aac4db46b 100644 --- a/sw/source/ui/docvw/srcedtw.cxx +++ b/sw/source/ui/docvw/srcedtw.cxx @@ -51,6 +51,8 @@ #include <docsh.hxx> #include <srcview.hxx> #include <helpid.h> +#include <deque> + struct SwTextPortion @@ -64,9 +66,7 @@ struct SwTextPortion #define MAX_HIGHLIGHTTIME 200 #define SYNTAX_HIGHLIGHT_TIMEOUT 200 -SV_DECL_VARARR(SwTextPortions, SwTextPortion,16,16) - -SV_IMPL_VARARR(SwTextPortions, SwTextPortion) +typedef std::deque<SwTextPortion> SwTextPortions; static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList) { @@ -82,11 +82,11 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList) const USHORT nStrLen = rSource.Len(); - USHORT nInsert = 0; // Anzahl der eingefuegten Portions - USHORT nActPos = 0; //Position, an der '<' gefunden wurde - USHORT nOffset = 0; //Offset von nActPos zur '<' - USHORT nPortStart = USHRT_MAX; // fuer die TextPortion - USHORT nPortEnd = 0; // + USHORT nInsert = 0; // Number of inserted Portions + USHORT nActPos = 0; // Position, at the '<' was found + USHORT nOffset = 0; // Offset of nActPos for '<' + USHORT nPortStart = USHRT_MAX; // For the TextPortion + USHORT nPortEnd = 0; // SwTextPortion aText; while(nActPos < nStrLen) { @@ -103,7 +103,8 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList) aText.nStart += 1; aText.nEnd = nActPos - 1; aText.eType = svtools::HTMLUNKNOWN; - aPortionList.Insert(aText, nInsert++); + aPortionList.push_back( aText ); + nInsert++; } sal_Unicode cFollowFirst = rSource.GetChar((xub_StrLen)(nActPos + 1)); sal_Unicode cFollowNext = rSource.GetChar((xub_StrLen)(nActPos + 2)); @@ -193,7 +194,8 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList) aTextPortion.nStart = nPortStart + 1; aTextPortion.nEnd = nPortEnd; aTextPortion.eType = eFoundType; - aPortionList.Insert(aTextPortion, nInsert++); + aPortionList.push_back( aTextPortion ); + nInsert++; eFoundType = svtools::HTMLUNKNOWN; } @@ -207,7 +209,8 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList) aText.nStart = nPortEnd + 1; aText.nEnd = nActPos - 1; aText.eType = svtools::HTMLUNKNOWN; - aPortionList.Insert(aText, nInsert++); + aPortionList.push_back( aText ); + nInsert++; } } @@ -635,7 +638,7 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff ) SwTextPortions aPortionList; lcl_Highlight(rSource, aPortionList); - USHORT nCount = aPortionList.Count(); + size_t nCount = aPortionList.size(); if ( !nCount ) return; @@ -643,7 +646,7 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff ) if ( rLast.nStart > rLast.nEnd ) // Nur bis Bug von MD behoeben { nCount--; - aPortionList.Remove( nCount); + aPortionList.pop_back(); if ( !nCount ) return; } @@ -660,7 +663,7 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff ) // optimiert das die TextEngine. USHORT nLastEnd = 0; - for ( USHORT i = 0; i < nCount; i++ ) + for ( size_t i = 0; i < nCount; i++ ) { SwTextPortion& r = aPortionList[i]; #if OSL_DEBUG_LEVEL > 1 @@ -682,7 +685,7 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff ) } } - for ( USHORT i = 0; i < aPortionList.Count(); i++ ) + for ( size_t i = 0; i < aPortionList.size(); i++ ) { SwTextPortion& r = aPortionList[i]; if ( r.nStart > r.nEnd ) // Nur bis Bug von MD behoeben diff --git a/sw/source/ui/envelp/envfmt.src b/sw/source/ui/envelp/envfmt.src index 57132b7754..fbba44527b 100644 --- a/sw/source/ui/envelp/envfmt.src +++ b/sw/source/ui/envelp/envfmt.src @@ -56,6 +56,7 @@ TabPage TP_ENV_FMT }; MetricField FLD_ADDR_LEFT { + HelpID = "sw:MetricField:TP_ENV_FMT:FLD_ADDR_LEFT"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 25 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -80,6 +81,7 @@ TabPage TP_ENV_FMT }; MetricField FLD_ADDR_TOP { + HelpID = "sw:MetricField:TP_ENV_FMT:FLD_ADDR_TOP"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 41 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -104,6 +106,7 @@ TabPage TP_ENV_FMT }; MenuButton BTN_ADDR_EDIT { + HelpID = "sw:MenuButton:TP_ENV_FMT:BTN_ADDR_EDIT"; Pos = MAP_APPFONT ( 194 , 24 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -131,6 +134,7 @@ TabPage TP_ENV_FMT }; MetricField FLD_SEND_LEFT { + HelpID = "sw:MetricField:TP_ENV_FMT:FLD_SEND_LEFT"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 78 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -155,6 +159,7 @@ TabPage TP_ENV_FMT }; MetricField FLD_SEND_TOP { + HelpID = "sw:MetricField:TP_ENV_FMT:FLD_SEND_TOP"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 94 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -179,6 +184,7 @@ TabPage TP_ENV_FMT }; MenuButton BTN_SEND_EDIT { + HelpID = "sw:MenuButton:TP_ENV_FMT:BTN_SEND_EDIT"; Pos = MAP_APPFONT ( 194 , 77 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "Edit" ; @@ -199,6 +205,7 @@ TabPage TP_ENV_FMT }; ListBox BOX_SIZE_FORMAT { + HelpID = "sw:ListBox:TP_ENV_FMT:BOX_SIZE_FORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 120 ) ; Size = MAP_APPFONT ( 40 , 72 ) ; @@ -214,6 +221,7 @@ TabPage TP_ENV_FMT }; MetricField FLD_SIZE_WIDTH { + HelpID = "sw:MetricField:TP_ENV_FMT:FLD_SIZE_WIDTH"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 136 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -238,6 +246,7 @@ TabPage TP_ENV_FMT }; MetricField FLD_SIZE_HEIGHT { + HelpID = "sw:MetricField:TP_ENV_FMT:FLD_SIZE_HEIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 152 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; diff --git a/sw/source/ui/envelp/envimg.cxx b/sw/source/ui/envelp/envimg.cxx index a0a06419a1..e391023b35 100644 --- a/sw/source/ui/envelp/envimg.cxx +++ b/sw/source/ui/envelp/envimg.cxx @@ -48,7 +48,7 @@ #include <unomid.h> -#ifdef WIN +#ifdef WNT #define NEXTLINE UniString::CreateFromAscii("\r\n") #else #define NEXTLINE '\n' diff --git a/sw/source/ui/envelp/envlop.src b/sw/source/ui/envelp/envlop.src index 9c91079353..8ef8a8ad89 100644 --- a/sw/source/ui/envelp/envlop.src +++ b/sw/source/ui/envelp/envlop.src @@ -85,6 +85,7 @@ TabPage TP_ENV_ENV }; MultiLineEdit EDT_ADDR { + HelpID = "sw:MultiLineEdit:TP_ENV_ENV:EDT_ADDR"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 17 ) ; Size = MAP_APPFONT ( 124 , 66 ) ; @@ -102,6 +103,7 @@ TabPage TP_ENV_ENV }; ListBox LB_DATABASE { + HelpID = "sw:ListBox:TP_ENV_ENV:LB_DATABASE"; Border = TRUE ; Pos = MAP_APPFONT ( 162 , 17 ) ; Size = MAP_APPFONT ( 82 , 50 ) ; @@ -116,6 +118,7 @@ TabPage TP_ENV_ENV }; ListBox LB_TABLE { + HelpID = "sw:ListBox:TP_ENV_ENV:LB_TABLE"; Border = TRUE ; Pos = MAP_APPFONT ( 162 , 44 ) ; Size = MAP_APPFONT ( 82 , 50 ) ; @@ -124,6 +127,7 @@ TabPage TP_ENV_ENV }; ImageButton BTN_INSERT { + HelpID = "sw:ImageButton:TP_ENV_ENV:BTN_INSERT"; Pos = MAP_APPFONT ( 137 , 71 ) ; Size = MAP_APPFONT ( 18 , 12 ) ; SYMBOL = IMAGEBUTTON_ARROW_LEFT ; @@ -137,6 +141,7 @@ TabPage TP_ENV_ENV }; ListBox LB_DBFIELD { + HelpID = "sw:ListBox:TP_ENV_ENV:LB_DBFIELD"; Border = TRUE ; Pos = MAP_APPFONT ( 162 , 71 ) ; Size = MAP_APPFONT ( 82 , 50 ) ; @@ -145,6 +150,7 @@ TabPage TP_ENV_ENV }; CheckBox BOX_SEND { + HelpID = "sw:CheckBox:TP_ENV_ENV:BOX_SEND"; Pos = MAP_APPFONT ( 6 , 105 ) ; Size = MAP_APPFONT ( 124 , 8 ) ; Text [ en-US ] = "~Sender" ; @@ -152,6 +158,7 @@ TabPage TP_ENV_ENV }; MultiLineEdit EDT_SEND { + HelpID = "sw:MultiLineEdit:TP_ENV_ENV:EDT_SEND"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 116) ; Size = MAP_APPFONT ( 124 , 63 ) ; diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx index 6c5bac1af5..850ca754e5 100644 --- a/sw/source/ui/envelp/envlop1.cxx +++ b/sw/source/ui/envelp/envlop1.cxx @@ -93,9 +93,9 @@ void SwEnvPreview::Paint(const Rectangle &) USHORT nPageW = (USHORT) Max(rItem.lWidth, rItem.lHeight), nPageH = (USHORT) Min(rItem.lWidth, rItem.lHeight); - float fx = static_cast< float >(GetOutputSizePixel().Width () / nPageW), - fy = static_cast< float >(GetOutputSizePixel().Height() / nPageH), - f = static_cast< float >(0.8 * ( fx < fy ? fx : fy )); + float fx = (float)GetOutputSizePixel().Width () / (float)nPageW, + fy = (float)GetOutputSizePixel().Height() / (float)nPageH, + f = 0.8f * ( fx < fy ? fx : fy ); Color aBack = rSettings.GetWindowColor( ); Color aFront = SwViewOption::GetFontColor(); diff --git a/sw/source/ui/envelp/envprt.src b/sw/source/ui/envelp/envprt.src index a0c7dcc4ac..c8425ef5ae 100644 --- a/sw/source/ui/envelp/envprt.src +++ b/sw/source/ui/envelp/envprt.src @@ -48,37 +48,38 @@ TabPage TP_ENV_PRT ToolBoxItem { Identifier = ITM_HOR_LEFT ; - HelpID = ITM_HOR_LEFT ; + HelpID = HID_ITM_HOR_LEFT ; }; ToolBoxItem { Identifier = ITM_HOR_CNTR ; - HelpID = ITM_HOR_CNTR ; + HelpID = HID_ITM_HOR_CNTR ; }; ToolBoxItem { Identifier = ITM_HOR_RGHT ; - HelpID = ITM_HOR_RGHT ; + HelpID = HID_ITM_HOR_RGHT ; }; ToolBoxItem { Identifier = ITM_VER_LEFT ; - HelpID = ITM_VER_LEFT ; + HelpID = HID_ITM_VER_LEFT ; }; ToolBoxItem { Identifier = ITM_VER_CNTR ; - HelpID = ITM_VER_CNTR ; + HelpID = HID_ITM_VER_CNTR ; }; ToolBoxItem { Identifier = ITM_VER_RGHT ; - HelpID = ITM_VER_RGHT ; + HelpID = HID_ITM_VER_RGHT ; }; }; }; RadioButton BTN_TOP { + HelpID = "sw:RadioButton:TP_ENV_PRT:BTN_TOP"; Pos = MAP_APPFONT ( 18 , 42 ) ; Size = MAP_APPFONT ( 179 , 10 ) ; Text [ en-US ] = "~Print from top" ; @@ -88,6 +89,7 @@ TabPage TP_ENV_PRT }; RadioButton BTN_BOTTOM { + HelpID = "sw:RadioButton:TP_ENV_PRT:BTN_BOTTOM"; Pos = MAP_APPFONT ( 18 , 56 ) ; Size = MAP_APPFONT ( 179 , 10 ) ; Text [ en-US ] = "Print from ~bottom" ; @@ -102,6 +104,7 @@ TabPage TP_ENV_PRT }; MetricField FLD_RIGHT { + HelpID = "sw:MetricField:TP_ENV_PRT:FLD_RIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( 86 , 72 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -126,6 +129,7 @@ TabPage TP_ENV_PRT }; MetricField FLD_DOWN { + HelpID = "sw:MetricField:TP_ENV_PRT:FLD_DOWN"; Border = TRUE ; Pos = MAP_APPFONT ( 86 , 88 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -156,6 +160,7 @@ TabPage TP_ENV_PRT }; PushButton BTN_PRTSETUP { + HelpID = "sw:PushButton:TP_ENV_PRT:BTN_PRTSETUP"; Pos = MAP_APPFONT ( 198 , 114 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/envelp/label.src b/sw/source/ui/envelp/label.src index 2d3d9c319b..944362d40e 100644 --- a/sw/source/ui/envelp/label.src +++ b/sw/source/ui/envelp/label.src @@ -109,6 +109,7 @@ TabPage TP_LAB_LAB }; CheckBox BOX_ADDR { + HelpID = "sw:CheckBox:TP_LAB_LAB:BOX_ADDR"; Pos = MAP_APPFONT ( 67 , 14 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; TabStop = TRUE ; @@ -116,6 +117,7 @@ TabPage TP_LAB_LAB }; MultiLineEdit EDT_WRITING { + HelpID = "sw:MultiLineEdit:TP_LAB_LAB:EDT_WRITING"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 105 , 89 ) ; @@ -133,6 +135,7 @@ TabPage TP_LAB_LAB }; ListBox LB_DATABASE { + HelpID = "sw:ListBox:TP_LAB_LAB:LB_DATABASE"; Border = TRUE ; Pos = MAP_APPFONT ( 149 , 27 ) ; Size = MAP_APPFONT ( 99 , 70 ) ; @@ -147,6 +150,7 @@ TabPage TP_LAB_LAB }; ListBox LB_TABLE { + HelpID = "sw:ListBox:TP_LAB_LAB:LB_TABLE"; Border = TRUE ; Pos = MAP_APPFONT ( 149 , 56 ) ; Size = MAP_APPFONT ( 99 , 70 ) ; @@ -155,6 +159,7 @@ TabPage TP_LAB_LAB }; ImageButton BTN_INSERT { + HelpID = "sw:ImageButton:TP_LAB_LAB:BTN_INSERT"; Pos = MAP_APPFONT ( 124 , 92 ) ; Size = MAP_APPFONT ( 18 , 12 ) ; SYMBOL = IMAGEBUTTON_ARROW_LEFT ; @@ -168,6 +173,7 @@ TabPage TP_LAB_LAB }; ListBox LB_DBFIELD { + HelpID = "sw:ListBox:TP_LAB_LAB:LB_DBFIELD"; Border = TRUE ; Pos = MAP_APPFONT ( 149 , 92 ) ; Size = MAP_APPFONT ( 99 , 70 ) ; @@ -183,6 +189,7 @@ TabPage TP_LAB_LAB }; RadioButton BTN_CONT { + HelpID = "sw:RadioButton:TP_LAB_LAB:BTN_CONT"; Pos = MAP_APPFONT ( 12 , 137 ) ; Size = MAP_APPFONT ( 65 , 10 ) ; TabStop = TRUE ; @@ -191,6 +198,7 @@ TabPage TP_LAB_LAB }; RadioButton BTN_SHEET { + HelpID = "sw:RadioButton:TP_LAB_LAB:BTN_SHEET"; Pos = MAP_APPFONT ( 12 , 153 ) ; Size = MAP_APPFONT ( 65 , 10 ) ; Text [ en-US ] = "~Sheet" ; @@ -204,6 +212,7 @@ TabPage TP_LAB_LAB }; ListBox BOX_MAKE { + HelpID = "sw:ListBox:TP_LAB_LAB:BOX_MAKE"; Border = TRUE ; Pos = MAP_APPFONT ( 124 , 136 ) ; Size = MAP_APPFONT ( 124 , 90 ) ; @@ -219,6 +228,7 @@ TabPage TP_LAB_LAB }; ListBox BOX_TYPE { + HelpID = "sw:ListBox:TP_LAB_LAB:BOX_TYPE"; Border = TRUE ; Pos = MAP_APPFONT ( 124 , 152 ) ; Size = MAP_APPFONT ( 124 , 90 ) ; @@ -254,6 +264,7 @@ FloatingWindow DLG_SYNC_BTN Hide = TRUE ; PushButton BTN_SYNC { + HelpID = "sw:PushButton:DLG_SYNC_BTN:BTN_SYNC"; Pos = MAP_APPFONT ( 1 , 1 ) ; Size = MAP_APPFONT ( WIDTH - 1 , HEIGHT - 1 ) ; Text [ en-US ] = "Synchronize Labels" ; @@ -290,6 +301,7 @@ TabPage TP_VISITING_CARDS }; ListBox LB_AUTO_TEXT_GROUP { + HelpID = "sw:ListBox:TP_VISITING_CARDS:LB_AUTO_TEXT_GROUP"; Pos = MAP_APPFONT ( 12 , 164) ; Size = MAP_APPFONT ( 109 , 50 ) ; Border = TRUE ; @@ -331,18 +343,21 @@ TabPage TP_PRIVATE_DATA }; Edit ED_FIRSTNAME { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_FIRSTNAME"; Pos = MAP_APPFONT ( 105 , 14 ) ; Size = MAP_APPFONT ( 55 , 12 ) ; Border = TRUE ; }; Edit ED_NAME { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_NAME"; Pos = MAP_APPFONT ( 163 , 14 ) ; Size = MAP_APPFONT ( 55 , 12 ) ; Border = TRUE ; }; Edit ED_SHORTCUT { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_SHORTCUT"; Pos = MAP_APPFONT ( 221 , 14 ) ; Size = MAP_APPFONT ( 27 , 12 ) ; Border = TRUE ; @@ -355,18 +370,21 @@ TabPage TP_PRIVATE_DATA }; Edit ED_FIRSTNAME_2 { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_FIRSTNAME_2"; Pos = MAP_APPFONT ( 105 , 30 ) ; Size = MAP_APPFONT ( 55 , 12 ) ; Border = TRUE ; }; Edit ED_NAME_2 { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_NAME_2"; Pos = MAP_APPFONT ( 163 , 30 ) ; Size = MAP_APPFONT ( 55 , 12 ) ; Border = TRUE ; }; Edit ED_SHORTCUT_2 { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_SHORTCUT_2"; Pos = MAP_APPFONT ( 221 , 30 ) ; Size = MAP_APPFONT ( 27 , 12 ) ; Border = TRUE ; @@ -379,6 +397,7 @@ TabPage TP_PRIVATE_DATA }; Edit ED_STREET { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_STREET"; Pos = MAP_APPFONT ( 105 , 46 ) ; Size = MAP_APPFONT ( 143 , 12 ) ; Border = TRUE ; @@ -391,12 +410,14 @@ TabPage TP_PRIVATE_DATA }; Edit ED_ZIP { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_ZIP"; Pos = MAP_APPFONT ( 105 , 62 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; Border = TRUE ; }; Edit ED_CITY { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_CITY"; Pos = MAP_APPFONT ( 158 , 62 ) ; Size = MAP_APPFONT ( 90 , 12 ) ; Border = TRUE ; @@ -409,12 +430,14 @@ TabPage TP_PRIVATE_DATA }; Edit ED_COUNTRY { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_COUNTRY"; Pos = MAP_APPFONT ( 105 , 78 ) ; Size = MAP_APPFONT ( 71 , 12 ) ; Border = TRUE ; }; Edit ED_STATE { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_STATE"; Pos = MAP_APPFONT ( 179 , 78 ) ; Size = MAP_APPFONT ( 69 , 12 ) ; Border = TRUE ; @@ -427,12 +450,14 @@ TabPage TP_PRIVATE_DATA }; Edit ED_TITLE { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_TITLE"; Pos = MAP_APPFONT ( 105 , 94 ) ; Size = MAP_APPFONT ( 71 , 12 ) ; Border = TRUE ; }; Edit ED_PROFESSION { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_PROFESSION"; Pos = MAP_APPFONT ( 179 , 94 ) ; Size = MAP_APPFONT ( 69 , 12 ) ; Border = TRUE ; @@ -445,12 +470,14 @@ TabPage TP_PRIVATE_DATA }; Edit ED_PHONE { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_PHONE"; Pos = MAP_APPFONT ( 105 , 110 ) ; Size = MAP_APPFONT ( 71 , 12 ) ; Border = TRUE ; }; Edit ED_MOBILE { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_MOBILE"; Pos = MAP_APPFONT ( 179 , 110 ) ; Size = MAP_APPFONT ( 69 , 12 ) ; Border = TRUE ; @@ -463,6 +490,7 @@ TabPage TP_PRIVATE_DATA }; Edit ED_FAX { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_FAX"; Pos = MAP_APPFONT ( 105 , 126 ) ; Size = MAP_APPFONT ( 143 , 12 ) ; Border = TRUE ; @@ -475,12 +503,14 @@ TabPage TP_PRIVATE_DATA }; Edit ED_WWW { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_WWW"; Pos = MAP_APPFONT ( 105 , 142) ; Size = MAP_APPFONT ( 71 , 12 ) ; Border = TRUE ; }; Edit ED_MAIL { + HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_MAIL"; Pos = MAP_APPFONT ( 179 , 142) ; Size = MAP_APPFONT ( 69 , 12 ) ; Border = TRUE ; @@ -505,6 +535,7 @@ TabPage TP_BUSINESS_DATA }; Edit ED_COMP { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_COMP"; Pos = MAP_APPFONT ( 105 , 14) ; Size = MAP_APPFONT ( 143 , 12 ) ; Border = TRUE ; @@ -517,6 +548,7 @@ TabPage TP_BUSINESS_DATA }; Edit ED_COMP_EXT { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_COMP_EXT"; Pos = MAP_APPFONT ( 105 , 30) ; Size = MAP_APPFONT ( 143 , 12 ) ; Border = TRUE ; @@ -529,6 +561,7 @@ TabPage TP_BUSINESS_DATA }; Edit ED_SLOGAN { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_SLOGAN"; Pos = MAP_APPFONT ( 105 , 46) ; Size = MAP_APPFONT ( 143 , 12 ) ; Border = TRUE ; @@ -541,6 +574,7 @@ TabPage TP_BUSINESS_DATA }; Edit ED_STREET { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_STREET"; Pos = MAP_APPFONT ( 105 , 62) ; Size = MAP_APPFONT ( 143 , 12 ) ; Border = TRUE ; @@ -553,12 +587,14 @@ TabPage TP_BUSINESS_DATA }; Edit ED_ZIP { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_ZIP"; Pos = MAP_APPFONT ( 105 , 78) ; Size = MAP_APPFONT ( 50 , 12 ) ; Border = TRUE ; }; Edit ED_CITY { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_CITY"; Pos = MAP_APPFONT ( 158 , 78) ; Size = MAP_APPFONT ( 90 , 12 ) ; Border = TRUE ; @@ -571,12 +607,14 @@ TabPage TP_BUSINESS_DATA }; Edit ED_COUNTRY { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_COUNTRY"; Pos = MAP_APPFONT ( 105 , 94) ; Size = MAP_APPFONT ( 71 , 12 ) ; Border = TRUE ; }; Edit ED_STATE { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_STATE"; Pos = MAP_APPFONT ( 179 , 94) ; Size = MAP_APPFONT ( 69 , 12 ) ; Border = TRUE ; @@ -589,6 +627,7 @@ TabPage TP_BUSINESS_DATA }; Edit ED_POSITION { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_POSITION"; Pos = MAP_APPFONT ( 105 , 110) ; Size = MAP_APPFONT ( 143 , 12 ) ; Border = TRUE ; @@ -601,12 +640,14 @@ TabPage TP_BUSINESS_DATA }; Edit ED_PHONE { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_PHONE"; Pos = MAP_APPFONT ( 105 , 126) ; Size = MAP_APPFONT ( 71 , 12 ) ; Border = TRUE ; }; Edit ED_MOBILE { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_MOBILE"; Pos = MAP_APPFONT ( 179 , 126) ; Size = MAP_APPFONT ( 69 , 12 ) ; Border = TRUE ; @@ -619,6 +660,7 @@ TabPage TP_BUSINESS_DATA }; Edit ED_FAX { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_FAX"; Pos = MAP_APPFONT ( 105 , 142) ; Size = MAP_APPFONT ( 143 , 12 ) ; Border = TRUE ; @@ -631,12 +673,14 @@ TabPage TP_BUSINESS_DATA }; Edit ED_WWW { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_WWW"; Pos = MAP_APPFONT ( 105 , 158) ; Size = MAP_APPFONT ( 71 , 12 ) ; Border = TRUE ; }; Edit ED_MAIL { + HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_MAIL"; Pos = MAP_APPFONT ( 179 , 158) ; Size = MAP_APPFONT ( 69 , 12 ) ; Border = TRUE ; diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx index bdc0ca159b..039474330e 100644 --- a/sw/source/ui/envelp/label1.cxx +++ b/sw/source/ui/envelp/label1.cxx @@ -645,7 +645,7 @@ SwVisitingCardPage::SwVisitingCardPage(Window* pParent, const SfxItemSet& rSet) pExampleFrame(0) { FreeResource(); - aAutoTextLB.SetWindowBits( WB_HSCROLL ); + aAutoTextLB.SetStyle( aAutoTextLB.GetStyle() | WB_HSCROLL ); aAutoTextLB.SetSpaceBetweenEntries(0); aAutoTextLB.SetSelectionMode( SINGLE_SELECTION ); aAutoTextLB.SetHelpId(HID_BUSINESS_CARD_CONTENT); diff --git a/sw/source/ui/envelp/labfmt.src b/sw/source/ui/envelp/labfmt.src index 49b5e55154..903a88823c 100644 --- a/sw/source/ui/envelp/labfmt.src +++ b/sw/source/ui/envelp/labfmt.src @@ -60,6 +60,7 @@ TabPage TP_LAB_FMT }; MetricField FLD_HDIST { + HelpID = "sw:MetricField:TP_LAB_FMT:FLD_HDIST"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 17 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -80,6 +81,7 @@ TabPage TP_LAB_FMT }; MetricField FLD_VDIST { + HelpID = "sw:MetricField:TP_LAB_FMT:FLD_VDIST"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 33 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -100,6 +102,7 @@ TabPage TP_LAB_FMT }; MetricField FLD_WIDTH { + HelpID = "sw:MetricField:TP_LAB_FMT:FLD_WIDTH"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 49 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -120,6 +123,7 @@ TabPage TP_LAB_FMT }; MetricField FLD_HEIGHT { + HelpID = "sw:MetricField:TP_LAB_FMT:FLD_HEIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 65 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -140,6 +144,7 @@ TabPage TP_LAB_FMT }; MetricField FLD_LEFT { + HelpID = "sw:MetricField:TP_LAB_FMT:FLD_LEFT"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 81 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -162,6 +167,7 @@ TabPage TP_LAB_FMT }; MetricField FLD_UPPER { + HelpID = "sw:MetricField:TP_LAB_FMT:FLD_UPPER"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 97 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -184,6 +190,7 @@ TabPage TP_LAB_FMT }; NumericField FLD_COLUMNS { + HelpID = "sw:NumericField:TP_LAB_FMT:FLD_COLUMNS"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 113 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -203,6 +210,7 @@ TabPage TP_LAB_FMT }; NumericField FLD_ROWS { + HelpID = "sw:NumericField:TP_LAB_FMT:FLD_ROWS"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 129 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -215,6 +223,7 @@ TabPage TP_LAB_FMT }; PushButton PB_SAVE { + HelpID = "sw:PushButton:TP_LAB_FMT:PB_SAVE"; Pos = MAP_APPFONT ( 50 , 148 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Save..."; @@ -269,6 +278,7 @@ ModalDialog DLG_SAVE_LABEL }; ComboBox CB_MAKE { + HelpID = "sw:ComboBox:DLG_SAVE_LABEL:CB_MAKE"; Pos = MAP_APPFONT ( 65 , 15 ) ; Size = MAP_APPFONT ( 100 , 50 ) ; Border = TRUE; @@ -283,6 +293,7 @@ ModalDialog DLG_SAVE_LABEL }; Edit ED_TYPE { + HelpID = "sw:Edit:DLG_SAVE_LABEL:ED_TYPE"; Pos = MAP_APPFONT ( 65 , 30 ) ; Size = MAP_APPFONT ( 100 , 12 ) ; Border = TRUE; diff --git a/sw/source/ui/envelp/labprt.src b/sw/source/ui/envelp/labprt.src index 7d663f9ccb..c160feae1d 100644 --- a/sw/source/ui/envelp/labprt.src +++ b/sw/source/ui/envelp/labprt.src @@ -36,6 +36,7 @@ TabPage TP_LAB_PRT Hide = TRUE ; RadioButton BTN_PAGE { + HelpID = "sw:RadioButton:TP_LAB_PRT:BTN_PAGE"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; TabStop = TRUE ; @@ -44,6 +45,7 @@ TabPage TP_LAB_PRT }; RadioButton BTN_SINGLE { + HelpID = "sw:RadioButton:TP_LAB_PRT:BTN_SINGLE"; Pos = MAP_APPFONT ( 12 , 28 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Single label" ; @@ -57,6 +59,7 @@ TabPage TP_LAB_PRT }; NumericField FLD_COL { + HelpID = "sw:NumericField:TP_LAB_PRT:FLD_COL"; Border = TRUE ; Pos = MAP_APPFONT ( 160 , 27 ) ; Size = MAP_APPFONT ( 24 , 12 ) ; @@ -76,6 +79,7 @@ TabPage TP_LAB_PRT }; NumericField FLD_ROW { + HelpID = "sw:NumericField:TP_LAB_PRT:FLD_ROW"; Border = TRUE ; Pos = MAP_APPFONT ( 224 , 27 ) ; Size = MAP_APPFONT ( 24 , 12 ) ; @@ -88,6 +92,7 @@ TabPage TP_LAB_PRT }; CheckBox CB_SYNCHRON { + HelpID = "sw:CheckBox:TP_LAB_PRT:CB_SYNCHRON"; Pos = MAP_APPFONT ( 12 , 43 ) ; Size = MAP_APPFONT ( 120 , 10 ) ; TabStop = TRUE ; @@ -108,6 +113,7 @@ TabPage TP_LAB_PRT }; PushButton BTN_PRTSETUP { + HelpID = "sw:PushButton:TP_LAB_PRT:BTN_PRTSETUP"; Pos = MAP_APPFONT ( 198 , 70 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index 517b0a326d..630606ca1b 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -737,7 +737,7 @@ bool SwMailMergeDlg::ExecQryShell() m_aSelection.realloc(nEnd - nStart + 1); Any* pSelection = m_aSelection.getArray(); - for (sal_Int32 i = nStart; i != nEnd; ++i, ++pSelection) + for (sal_Int32 i = nStart; i <= nEnd; ++i, ++pSelection) *pSelection <<= i; } else if (aAllRB.IsChecked() ) diff --git a/sw/source/ui/envelp/mailmrge.src b/sw/source/ui/envelp/mailmrge.src index 146fd02d09..5d231fab58 100644 --- a/sw/source/ui/envelp/mailmrge.src +++ b/sw/source/ui/envelp/mailmrge.src @@ -40,7 +40,7 @@ ModalDialog DLG_MAILMERGE _MAIL_MERGE_STRING_ Moveable = TRUE ; Sizeable = TRUE; - HelpID = FN_QRY_MERGE ; + HelpID = CMD_FN_QRY_MERGE ; Window WIN_BEAMER { Pos = MAP_APPFONT ( 6 , 3 ) ; @@ -48,6 +48,7 @@ ModalDialog DLG_MAILMERGE }; RadioButton RB_ALL { + HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_ALL"; Pos = MAP_APPFONT ( 12 , 97 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "~All" ; @@ -55,6 +56,7 @@ ModalDialog DLG_MAILMERGE }; RadioButton RB_MARKED { + HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_MARKED"; Pos = MAP_APPFONT ( 12 , 110 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "~Selected records" ; @@ -62,6 +64,7 @@ ModalDialog DLG_MAILMERGE }; RadioButton RB_FROM { + HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_FROM"; Pos = MAP_APPFONT ( 12 , 123 ) ; Size = MAP_APPFONT ( 33 , 10 ) ; Text [ en-US ] = "~From:" ; @@ -69,6 +72,7 @@ ModalDialog DLG_MAILMERGE }; NumericField NF_FROM { + HelpID = "sw:NumericField:DLG_MAILMERGE:NF_FROM"; Border = TRUE ; Pos = MAP_APPFONT ( 48 , 122 ) ; Size = MAP_APPFONT ( 24 , 12 ) ; @@ -86,6 +90,7 @@ ModalDialog DLG_MAILMERGE }; NumericField NF_TO { + HelpID = "sw:NumericField:DLG_MAILMERGE:NF_TO"; Border = TRUE ; Pos = MAP_APPFONT ( 105 , 122 ) ; Size = MAP_APPFONT ( 24 , 12 ) ; @@ -102,6 +107,7 @@ ModalDialog DLG_MAILMERGE }; RadioButton RB_PRINTER { + HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_PRINTER"; Pos = MAP_APPFONT ( 144 , 97 ) ; Size = MAP_APPFONT ( 53 , 10 ) ; Check = TRUE ; @@ -110,6 +116,7 @@ ModalDialog DLG_MAILMERGE }; RadioButton RB_MAILING { + HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_MAILING"; Pos = MAP_APPFONT ( 200 , 97 ) ; Size = MAP_APPFONT ( 53 , 10 ) ; TabStop = TRUE ; @@ -117,6 +124,7 @@ ModalDialog DLG_MAILMERGE }; RadioButton RB_FILE { + HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_FILE"; Pos = MAP_APPFONT ( 256 , 97 ) ; Size = MAP_APPFONT ( 56 , 10 ) ; TabStop = TRUE ; @@ -124,6 +132,7 @@ ModalDialog DLG_MAILMERGE }; CheckBox CB_SINGLE_JOBS { + HelpID = "sw:CheckBox:DLG_MAILMERGE:CB_SINGLE_JOBS"; Pos = MAP_APPFONT ( 150 , 112 ) ; Size = MAP_APPFONT ( 142 , 10 ) ; TabStop = TRUE ; @@ -137,6 +146,7 @@ ModalDialog DLG_MAILMERGE }; RadioButton RB_SAVE_SINGLE_DOC { + HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_SAVE_SINGLE_DOC"; Pos = MAP_APPFONT ( 150, 139 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; TabStop = TRUE ; @@ -144,6 +154,7 @@ ModalDialog DLG_MAILMERGE }; RadioButton RB_SAVE_INDIVIDUAL { + HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_SAVE_INDIVIDUAL"; Pos = MAP_APPFONT ( 150, 152 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; TabStop = TRUE ; @@ -151,6 +162,7 @@ ModalDialog DLG_MAILMERGE }; CheckBox RB_GENERATE_FROM_DATABASE { + HelpID = "sw:CheckBox:DLG_MAILMERGE:RB_GENERATE_FROM_DATABASE"; Pos = MAP_APPFONT ( 156, 168 ) ; Size = MAP_APPFONT ( 144 , 10 ) ; TabStop = TRUE ; @@ -164,6 +176,7 @@ ModalDialog DLG_MAILMERGE }; ListBox LB_COLUMN { + HelpID = "sw:ListBox:DLG_MAILMERGE:LB_COLUMN"; Border = TRUE ; Pos = MAP_APPFONT ( 205 , 182 ) ; Size = MAP_APPFONT ( 103 , 84 ) ; @@ -178,6 +191,7 @@ ModalDialog DLG_MAILMERGE }; Edit ED_PATH { + HelpID = "sw:Edit:DLG_MAILMERGE:ED_PATH"; Pos = MAP_APPFONT ( 205 , 198 ) ; Size = MAP_APPFONT ( 86 , 12 ) ; Border = TRUE ; @@ -185,6 +199,7 @@ ModalDialog DLG_MAILMERGE }; PushButton PB_PATH { + HelpID = "sw:PushButton:DLG_MAILMERGE:PB_PATH"; Pos = MAP_APPFONT ( 294 , 198 ) ; Size = MAP_APPFONT ( 14 , 12 ) ; // Soll Groesse des Edits haben (12)! @@ -199,6 +214,7 @@ ModalDialog DLG_MAILMERGE }; ListBox LB_FILTER { + HelpID = "sw:ListBox:DLG_MAILMERGE:LB_FILTER"; Border = TRUE ; Pos = MAP_APPFONT ( 205 , 214 ) ; Size = MAP_APPFONT ( 103 , 84 ) ; @@ -208,6 +224,7 @@ ModalDialog DLG_MAILMERGE }; ListBox LB_ADDRESSFLD { + HelpID = "sw:ListBox:DLG_MAILMERGE:LB_ADDRESSFLD"; Border = TRUE ; Pos = MAP_APPFONT ( 220 , 110 ) ; Size = MAP_APPFONT ( 74 , 84 ) ; @@ -225,6 +242,7 @@ ModalDialog DLG_MAILMERGE }; Edit ED_SUBJECT { + HelpID = "sw:Edit:DLG_MAILMERGE:ED_SUBJECT"; Border = TRUE ; Pos = MAP_APPFONT ( 220 , 127 ) ; Size = MAP_APPFONT ( 88 , 12 ) ; @@ -240,6 +258,7 @@ ModalDialog DLG_MAILMERGE }; Edit ED_ATTACH { + HelpID = "sw:Edit:DLG_MAILMERGE:ED_ATTACH"; Border = TRUE ; Pos = MAP_APPFONT ( 220 , 140 ) ; Size = MAP_APPFONT ( 72 , 12 ) ; @@ -249,6 +268,7 @@ ModalDialog DLG_MAILMERGE }; PushButton PB_ATTACH { + HelpID = "sw:PushButton:DLG_MAILMERGE:PB_ATTACH"; Pos = MAP_APPFONT ( 294 , 140 ) ; Size = MAP_APPFONT ( 14 , 12 ) ; // Soll Groesse des Edits haben (12)! @@ -265,6 +285,7 @@ ModalDialog DLG_MAILMERGE }; CheckBox CB_FORMAT_HTML { + HelpID = "sw:CheckBox:DLG_MAILMERGE:CB_FORMAT_HTML"; Pos = MAP_APPFONT ( 220 , 156 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Disable = TRUE ; @@ -274,6 +295,7 @@ ModalDialog DLG_MAILMERGE }; CheckBox CB_FORMAT_RTF { + HelpID = "sw:CheckBox:DLG_MAILMERGE:CB_FORMAT_RTF"; Pos = MAP_APPFONT ( 220 , 169 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Disable = TRUE ; @@ -282,6 +304,7 @@ ModalDialog DLG_MAILMERGE }; CheckBox CB_FORMAT_SW { + HelpID = "sw:CheckBox:DLG_MAILMERGE:CB_FORMAT_SW"; Pos = MAP_APPFONT ( 220, 182 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Disable = TRUE ; @@ -339,6 +362,7 @@ ModalDialog DLG_MERGE_CREATE }; RadioButton RB_THISDOC { + HelpID = "sw:RadioButton:DLG_MERGE_CREATE:RB_THISDOC"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Check = TRUE; @@ -347,6 +371,7 @@ ModalDialog DLG_MERGE_CREATE }; RadioButton RB_TEMPLATE { + HelpID = "sw:RadioButton:DLG_MERGE_CREATE:RB_TEMPLATE"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; TabStop = TRUE ; @@ -386,6 +411,7 @@ ModalDialog DLG_MERGE_FIELD_CONNECTIONS }; RadioButton RB_USEEXISTING { + HelpID = "sw:RadioButton:DLG_MERGE_FIELD_CONNECTIONS:RB_USEEXISTING"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; Check = TRUE; @@ -394,6 +420,7 @@ ModalDialog DLG_MERGE_FIELD_CONNECTIONS }; RadioButton RB_CREATENEW { + HelpID = "sw:RadioButton:DLG_MERGE_FIELD_CONNECTIONS:RB_CREATENEW"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/envelp/makefile.mk b/sw/source/ui/envelp/makefile.mk deleted file mode 100644 index cb38ffd847..0000000000 --- a/sw/source/ui/envelp/makefile.mk +++ /dev/null @@ -1,79 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=envelp -LIBTARGET=no -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES =\ - envelp.src \ - envfmt.src \ - envlop.src \ - envprt.src \ - label.src \ - labfmt.src \ - labprt.src \ - mailmrge.src - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - $(SLO)$/labimg.obj - -EXCEPTIONSFILES= \ - $(SLO)$/envfmt.obj \ - $(SLO)$/envimg.obj \ - $(SLO)$/envlop1.obj \ - $(SLO)$/envprt.obj \ - $(SLO)$/label1.obj \ - $(SLO)$/labelcfg.obj \ - $(SLO)$/labelexp.obj \ - $(SLO)$/labfmt.obj \ - $(SLO)$/labprt.obj \ - $(SLO)$/mailmrge.obj \ - $(SLO)$/syncbtn.obj - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/envimg.obj \ - $(SLO)$/labelcfg.obj \ - $(SLO)$/labimg.obj \ - $(SLO)$/syncbtn.obj -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/fldui/DropDownFieldDialog.cxx b/sw/source/ui/fldui/DropDownFieldDialog.cxx index 3a98567317..b56aa513d9 100644 --- a/sw/source/ui/fldui/DropDownFieldDialog.cxx +++ b/sw/source/ui/fldui/DropDownFieldDialog.cxx @@ -33,7 +33,6 @@ #undef SW_DLLIMPLEMENTATION #endif - #include <wrtsh.hxx> #include <fldbas.hxx> #include <fldmgr.hxx> @@ -114,13 +113,12 @@ void sw::DropDownFieldDialog::Apply() { rSh.StartAllAction(); - SwDropDownField * pCopy = (SwDropDownField *) pDropField->Copy(); + ::std::auto_ptr<SwDropDownField> const pCopy( + static_cast<SwDropDownField *>( pDropField->CopyField() ) ); pCopy->SetPar1(sSelect); rSh.SwEditShell::UpdateFlds(*pCopy); - delete pCopy; - rSh.SetUndoNoResetModified(); rSh.EndAllAction(); } diff --git a/sw/source/ui/fldui/DropDownFieldDialog.src b/sw/source/ui/fldui/DropDownFieldDialog.src index 25f6c4ac15..2d5c98cfe5 100644 --- a/sw/source/ui/fldui/DropDownFieldDialog.src +++ b/sw/source/ui/fldui/DropDownFieldDialog.src @@ -45,6 +45,7 @@ ModalDialog DLG_FLD_DROPDOWN }; ListBox LB_LISTITEMS { + HelpID = "sw:ListBox:DLG_FLD_DROPDOWN:LB_LISTITEMS"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 115 , 99 ) ; @@ -67,6 +68,7 @@ ModalDialog DLG_FLD_DROPDOWN }; PushButton PB_NEXT { + HelpID = "sw:PushButton:DLG_FLD_DROPDOWN:PB_NEXT"; Pos = MAP_APPFONT ( 139 , 40 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -81,6 +83,7 @@ ModalDialog DLG_FLD_DROPDOWN }; PushButton PB_EDIT { + HelpID = "sw:PushButton:DLG_FLD_DROPDOWN:PB_EDIT"; Pos = MAP_APPFONT ( 139 , 99 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx index f988b39d6b..b134afa932 100644 --- a/sw/source/ui/fldui/changedb.cxx +++ b/sw/source/ui/fldui/changedb.cxx @@ -2,7 +2,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 @@ -99,7 +99,7 @@ SwChangeDBDlg::SwChangeDBDlg(SwView& rVw) : aAddDBPB.SetClickHdl(LINK(this, SwChangeDBDlg, AddDBHdl)); aUsedDBTLB.SetSelectionMode(MULTIPLE_SELECTION); - aUsedDBTLB.SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); + aUsedDBTLB.SetStyle(aUsedDBTLB.GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); aUsedDBTLB.SetSpaceBetweenEntries(0); aUsedDBTLB.SetNodeBitmaps( aImageList.GetImage(IMG_COLLAPSE), aImageList.GetImage(IMG_EXPAND)); diff --git a/sw/source/ui/fldui/changedb.src b/sw/source/ui/fldui/changedb.src index a461a1d7ac..8c4e21d5b3 100644 --- a/sw/source/ui/fldui/changedb.src +++ b/sw/source/ui/fldui/changedb.src @@ -31,6 +31,7 @@ ModalDialog DLG_CHANGE_DB { + HelpID = "sw:ModalDialog:DLG_CHANGE_DB"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 286 , 175 ) ; @@ -74,6 +75,7 @@ ModalDialog DLG_CHANGE_DB }; PushButton PB_ADDDB { + HelpID = "sw:PushButton:DLG_CHANGE_DB:PB_ADDDB"; Pos = MAP_APPFONT ( 118 , 90 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "Browse..." ; diff --git a/sw/source/ui/fldui/flddb.src b/sw/source/ui/fldui/flddb.src index e7bc8b99f9..d88d8790ba 100644 --- a/sw/source/ui/fldui/flddb.src +++ b/sw/source/ui/fldui/flddb.src @@ -43,6 +43,7 @@ TabPage TP_FLD_DB }; ListBox LB_DBTYPE { + HelpID = "sw:ListBox:TP_FLD_DB:LB_DBTYPE"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 76 , 104 ) ; @@ -67,6 +68,7 @@ TabPage TP_FLD_DB }; Edit ED_DBCONDITION { + HelpID = "sw:Edit:TP_FLD_DB:ED_DBCONDITION"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 137 ) ; Size = MAP_APPFONT ( 76 , 12 ) ; @@ -82,6 +84,7 @@ TabPage TP_FLD_DB }; Edit ED_DBSETNUMBER { + HelpID = "sw:Edit:TP_FLD_DB:ED_DBSETNUMBER"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 167 ) ; Size = MAP_APPFONT ( 76 , 12 ) ; @@ -110,6 +113,7 @@ TabPage TP_FLD_DB }; PushButton PB_ADDDB { + HelpID = "sw:PushButton:TP_FLD_DB:PB_ADDDB"; Pos = MAP_APPFONT ( 198 , 121) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "Browse..." ; @@ -117,6 +121,7 @@ TabPage TP_FLD_DB RadioButton RB_DBOWNFORMAT { + HelpID = "sw:RadioButton:TP_FLD_DB:RB_DBOWNFORMAT"; Pos = MAP_APPFONT ( 94 , 153 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Check = TRUE ; @@ -124,12 +129,14 @@ TabPage TP_FLD_DB }; RadioButton RB_DBFORMAT { + HelpID = "sw:RadioButton:TP_FLD_DB:RB_DBFORMAT"; Pos = MAP_APPFONT ( 94 , 166 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "User-defined" ; }; ListBox LB_DBNUMFORMAT { + HelpID = "sw:ListBox:TP_FLD_DB:LB_DBNUMFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 195 , 164 ) ; Size = MAP_APPFONT ( 53 , 60 ) ; @@ -139,6 +146,7 @@ TabPage TP_FLD_DB }; ListBox LB_DBFORMAT { + HelpID = "sw:ListBox:TP_FLD_DB:LB_DBFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 195 , 163 ) ; Size = MAP_APPFONT ( 53 , 60 ) ; diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index eb5bc6edf9..77dfdb4798 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -48,9 +48,14 @@ #include <fldui.hrc> +#ifndef _FLDTDLG_HRC #include <fldtdlg.hrc> +#endif +#ifndef _FLDDINF_HXX #include <flddinf.hxx> +#endif #include <swmodule.hxx> +#ifndef _VIEW_HXX #include <view.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/util/Time.hpp> @@ -81,7 +86,7 @@ SwFldDokInfPage::SwFldDokInfPage(Window* pWindow, const SfxItemSet& rCoreSet ) : aTypeTLB.SetHelpId(HID_FIELD_DINF_TYPE); aTypeTLB.SetSelectionMode(SINGLE_SELECTION); - aTypeTLB.SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); + aTypeTLB.SetStyle(aTypeTLB.GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); // Font nicht setzen, damit der Font des Controls uebernommen wird! // Sonst bei falschem Font Bug an OV. aTypeTLB.SetSpaceBetweenEntries(0); diff --git a/sw/source/ui/fldui/flddinf.src b/sw/source/ui/fldui/flddinf.src index 9f65b88fa3..8f68883456 100644 --- a/sw/source/ui/fldui/flddinf.src +++ b/sw/source/ui/fldui/flddinf.src @@ -57,6 +57,7 @@ TabPage TP_FLD_DOKINF }; ListBox LB_DOKINFSELECTION { + HelpID = "sw:ListBox:TP_FLD_DOKINF:LB_DOKINFSELECTION"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 16 ) ; Size = MAP_APPFONT ( 76 , 163 ) ; @@ -78,6 +79,7 @@ TabPage TP_FLD_DOKINF }; ListBox LB_DOKINFFORMAT { + HelpID = "sw:ListBox:TP_FLD_DOKINF:LB_DOKINFFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 16 ) ; Size = MAP_APPFONT ( 84 , 148 ) ; @@ -86,6 +88,7 @@ TabPage TP_FLD_DOKINF }; CheckBox CB_DOKINFFIXEDCONTENT { + HelpID = "sw:CheckBox:TP_FLD_DOKINF:CB_DOKINFFIXEDCONTENT"; Pos = MAP_APPFONT ( 170 , 170 ) ; Size = MAP_APPFONT ( 72 , 10 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/fldui/flddok.src b/sw/source/ui/fldui/flddok.src index 6a60f8b53f..4723a55425 100644 --- a/sw/source/ui/fldui/flddok.src +++ b/sw/source/ui/fldui/flddok.src @@ -43,6 +43,7 @@ TabPage TP_FLD_DOK }; ListBox LB_DOKTYPE { + HelpID = "sw:ListBox:TP_FLD_DOK:LB_DOKTYPE"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 76 , 165 ) ; @@ -59,6 +60,7 @@ TabPage TP_FLD_DOK }; ListBox LB_DOKSELECTION { + HelpID = "sw:ListBox:TP_FLD_DOK:LB_DOKSELECTION"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 15 ) ; Size = MAP_APPFONT ( 76 , 165 ) ; @@ -73,6 +75,7 @@ TabPage TP_FLD_DOK }; ListBox LB_DOKFORMAT { + HelpID = "sw:ListBox:TP_FLD_DOK:LB_DOKFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 14 ) ; Size = MAP_APPFONT ( 84 , 151 ) ; @@ -83,6 +86,7 @@ TabPage TP_FLD_DOK }; ListBox LB_DOKNUMFORMAT { + HelpID = "sw:ListBox:TP_FLD_DOK:LB_DOKNUMFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 14 ) ; Size = MAP_APPFONT ( 84 , 151 ) ; @@ -100,6 +104,7 @@ TabPage TP_FLD_DOK }; Edit ED_DOKVALUE { + HelpID = "sw:Edit:TP_FLD_DOK:ED_DOKVALUE"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 167 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -109,6 +114,7 @@ TabPage TP_FLD_DOK }; NumericField ED_DOKLEVEL { + HelpID = "sw:NumericField:TP_FLD_DOK:ED_DOKLEVEL"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 167 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -125,6 +131,7 @@ TabPage TP_FLD_DOK }; NumericField ED_DOKDATEOFF { + HelpID = "sw:NumericField:TP_FLD_DOK:ED_DOKDATEOFF"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 167 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -138,6 +145,7 @@ TabPage TP_FLD_DOK }; CheckBox CB_DOKFIXEDCONTENT { + HelpID = "sw:CheckBox:TP_FLD_DOK:CB_DOKFIXEDCONTENT"; Pos = MAP_APPFONT ( 170 , 170 ) ; Size = MAP_APPFONT ( 72 , 10 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx index 2b96b72c86..7bdc70b64d 100644 --- a/sw/source/ui/fldui/fldedt.cxx +++ b/sw/source/ui/fldui/fldedt.cxx @@ -164,21 +164,21 @@ SfxTabPage* SwFldEditDlg::CreatePage(USHORT nGroup) { // TabPage erzeugen SfxTabPage* pTabPage = 0; - USHORT nHelpId = 0; + const char* pHelpId = 0; switch (nGroup) { case GRP_DOC: pTabPage = SwFldDokPage::Create(this, *(SfxItemSet*)0); - nHelpId = HID_EDIT_FLD_DOK; + pHelpId = HID_EDIT_FLD_DOK; break; case GRP_FKT: pTabPage = SwFldFuncPage::Create(this, *(SfxItemSet*)0); - nHelpId = HID_EDIT_FLD_FUNC; + pHelpId = HID_EDIT_FLD_FUNC; break; case GRP_REF: pTabPage = SwFldRefPage::Create(this, *(SfxItemSet*)0); - nHelpId = HID_EDIT_FLD_REF; + pHelpId = HID_EDIT_FLD_REF; break; case GRP_REG: { @@ -194,21 +194,22 @@ SfxTabPage* SwFldEditDlg::CreatePage(USHORT nGroup) uno::UNO_QUERY_THROW); pSet->Put( SfxUnoAnyItem( SID_DOCINFO, uno::makeAny(xUDProps) ) ); pTabPage = SwFldDokInfPage::Create(this, *pSet); - nHelpId = HID_EDIT_FLD_DOKINF; + pHelpId = HID_EDIT_FLD_DOKINF; break; } case GRP_DB: pTabPage = SwFldDBPage::Create(this, *(SfxItemSet*)0); static_cast<SwFldDBPage*>(pTabPage)->SetWrtShell(*pSh); - nHelpId = HID_EDIT_FLD_DB; + pHelpId = HID_EDIT_FLD_DB; break; case GRP_VAR: pTabPage = SwFldVarPage::Create(this, *(SfxItemSet*)0); - nHelpId = HID_EDIT_FLD_VAR; + pHelpId = HID_EDIT_FLD_VAR; break; } - pTabPage->SetHelpId(nHelpId); + + pTabPage->SetHelpId(pHelpId); static_cast<SwFldPage*>(pTabPage)->SetWrtShell(pSh); SetTabPage(pTabPage); diff --git a/sw/source/ui/fldui/fldfunc.src b/sw/source/ui/fldui/fldfunc.src index ca67c448fb..aa5e42b078 100644 --- a/sw/source/ui/fldui/fldfunc.src +++ b/sw/source/ui/fldui/fldfunc.src @@ -43,6 +43,7 @@ TabPage TP_FLD_FUNC }; ListBox LB_FUNCTYPE { + HelpID = "sw:ListBox:TP_FLD_FUNC:LB_FUNCTYPE"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 76 , 165 ) ; @@ -60,6 +61,7 @@ TabPage TP_FLD_FUNC }; ListBox LB_FUNCSELECTION { + HelpID = "sw:ListBox:TP_FLD_FUNC:LB_FUNCSELECTION"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 14 ) ; Size = MAP_APPFONT ( 76 , 165 ) ; @@ -77,6 +79,7 @@ TabPage TP_FLD_FUNC }; ListBox LB_FUNCFORMAT { + HelpID = "sw:ListBox:TP_FLD_FUNC:LB_FUNCFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 14 ) ; Size = MAP_APPFONT ( 76 , 165 ) ; @@ -91,6 +94,7 @@ TabPage TP_FLD_FUNC }; Edit ED_FUNCNAME { + HelpID = "sw:Edit:TP_FLD_FUNC:ED_FUNCNAME"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 14 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -106,6 +110,7 @@ TabPage TP_FLD_FUNC }; Edit ED_FUNCVALUE { + HelpID = "sw:Edit:TP_FLD_FUNC:ED_FUNCVALUE"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 41 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -122,6 +127,7 @@ TabPage TP_FLD_FUNC }; Edit ED_FUNCCOND1 { + HelpID = "sw:Edit:TP_FLD_FUNC:ED_FUNCCOND1"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 41 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -139,6 +145,7 @@ TabPage TP_FLD_FUNC }; Edit ED_FUNCCOND2 { + HelpID = "sw:Edit:TP_FLD_FUNC:ED_FUNCCOND2"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 68 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -148,6 +155,7 @@ TabPage TP_FLD_FUNC }; PushButton BT_FUNCMACRO { + HelpID = "sw:PushButton:TP_FLD_FUNC:BT_FUNCMACRO"; Pos = MAP_APPFONT ( 204 , 165 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Macro..." ; @@ -163,6 +171,7 @@ TabPage TP_FLD_FUNC }; Edit ED_LISTITEM { + HelpID = "sw:Edit:TP_FLD_FUNC:ED_LISTITEM"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 14 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -172,6 +181,7 @@ TabPage TP_FLD_FUNC }; PushButton PB_LISTADD { + HelpID = "sw:PushButton:TP_FLD_FUNC:PB_LISTADD"; Pos = MAP_APPFONT ( 170 , 29 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Hide = TRUE; @@ -186,6 +196,7 @@ TabPage TP_FLD_FUNC }; ListBox LB_LISTITEMS { + HelpID = "sw:ListBox:TP_FLD_FUNC:LB_LISTITEMS"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 57 ) ; Size = MAP_APPFONT ( 83 , 44 ) ; @@ -195,6 +206,7 @@ TabPage TP_FLD_FUNC }; PushButton PB_LISTREMOVE { + HelpID = "sw:PushButton:TP_FLD_FUNC:PB_LISTREMOVE"; Pos = MAP_APPFONT ( 203 , 104 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Hide = TRUE; @@ -202,6 +214,7 @@ TabPage TP_FLD_FUNC }; PushButton PB_LISTUP { + HelpID = "sw:PushButton:TP_FLD_FUNC:PB_LISTUP"; Pos = MAP_APPFONT ( 203 , 121 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Hide = TRUE; @@ -209,6 +222,7 @@ TabPage TP_FLD_FUNC }; PushButton PB_LISTDOWN { + HelpID = "sw:PushButton:TP_FLD_FUNC:PB_LISTDOWN"; Pos = MAP_APPFONT ( 203 , 138 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Hide = TRUE; @@ -223,6 +237,7 @@ TabPage TP_FLD_FUNC }; Edit ED_LISTNAME { + HelpID = "sw:Edit:TP_FLD_FUNC:ED_LISTNAME"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 167 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx index e7ecd4939d..a32b50f98e 100644 --- a/sw/source/ui/fldui/fldmgr.cxx +++ b/sw/source/ui/fldui/fldmgr.cxx @@ -563,7 +563,7 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill) ((nTypeId == TYP_INPUTFLD || nTypeId == TYP_FORMELFLD) && (nWhich == RES_USERFLD || (nWhich == RES_SETEXPFLD && - !(((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) )) ) + !(((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ))) ) ) { String* pNew = new String(pFldType->GetName()); rToFill.Insert(pNew, rToFill.Count()); diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index 125081e12b..1b804c203a 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -112,7 +112,7 @@ SwFldRefPage::SwFldRefPage(Window* pParent, const SfxItemSet& rCoreSet ) : // --> OD 2007-11-21 #i83479# aSelectionToolTipLB.SetSelectHdl( LINK(this, SwFldRefPage, SubTypeHdl) ); aSelectionToolTipLB.SetDoubleClickHdl( LINK(this, SwFldRefPage, InsertHdl) ); - aSelectionToolTipLB.SetWindowBits( aSelectionToolTipLB.GetWindowBits() | WB_HSCROLL ); + aSelectionToolTipLB.SetStyle( aSelectionToolTipLB.GetStyle() | WB_HSCROLL ); aSelectionToolTipLB.SetSpaceBetweenEntries(1); aSelectionToolTipLB.SetHighlightRange(); // <-- diff --git a/sw/source/ui/fldui/fldref.src b/sw/source/ui/fldui/fldref.src index 8abf02e980..c3aa0f737e 100644 --- a/sw/source/ui/fldui/fldref.src +++ b/sw/source/ui/fldui/fldref.src @@ -43,6 +43,7 @@ TabPage TP_FLD_REF }; ListBox LB_REFTYPE { + HelpID = "sw:ListBox:TP_FLD_REF:LB_REFTYPE"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 76 , 165 ) ; @@ -58,6 +59,7 @@ TabPage TP_FLD_REF }; ListBox LB_REFSELECTION { + HelpID = "sw:ListBox:TP_FLD_REF:LB_REFSELECTION"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 14 ) ; Size = MAP_APPFONT ( 166 , 73 ) ; @@ -82,6 +84,7 @@ TabPage TP_FLD_REF }; ListBox LB_REFFORMAT { + HelpID = "sw:ListBox:TP_FLD_REF:LB_REFFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 104 ) ; Size = MAP_APPFONT ( 76 , 75 ) ; @@ -98,6 +101,7 @@ TabPage TP_FLD_REF }; Edit ED_REFNAME { + HelpID = "sw:Edit:TP_FLD_REF:ED_REFNAME"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 104 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -114,6 +118,7 @@ TabPage TP_FLD_REF }; Edit ED_REFVALUE { + HelpID = "sw:Edit:TP_FLD_REF:ED_REFVALUE"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 136 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; diff --git a/sw/source/ui/fldui/fldvar.src b/sw/source/ui/fldui/fldvar.src index eda28b7fb4..4c42c971d2 100644 --- a/sw/source/ui/fldui/fldvar.src +++ b/sw/source/ui/fldui/fldvar.src @@ -44,6 +44,7 @@ TabPage TP_FLD_VAR }; ListBox LB_VARTYPE { + HelpID = "sw:ListBox:TP_FLD_VAR:LB_VARTYPE"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 76 , 135 ) ; @@ -60,6 +61,7 @@ TabPage TP_FLD_VAR }; ListBox LB_VARSELECTION { + HelpID = "sw:ListBox:TP_FLD_VAR:LB_VARSELECTION"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 14 ) ; Size = MAP_APPFONT ( 76 , 135 ) ; @@ -75,6 +77,7 @@ TabPage TP_FLD_VAR }; ListBox LB_VARFORMAT { + HelpID = "sw:ListBox:TP_FLD_VAR:LB_VARFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 14 ) ; Size = MAP_APPFONT ( 84 , 123 ) ; @@ -83,6 +86,7 @@ TabPage TP_FLD_VAR }; ListBox LB_VARNUMFORMAT { + HelpID = "sw:ListBox:TP_FLD_VAR:LB_VARNUMFORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 14 ) ; Size = MAP_APPFONT ( 84 , 123 ) ; @@ -91,6 +95,7 @@ TabPage TP_FLD_VAR }; CheckBox CB_VARINVISIBLE { + HelpID = "sw:CheckBox:TP_FLD_VAR:CB_VARINVISIBLE"; Pos = MAP_APPFONT ( 170 , 141 ) ; Size = MAP_APPFONT ( 84 , 10 ) ; Text [ en-US ] = "Invisi~ble" ; @@ -112,6 +117,7 @@ TabPage TP_FLD_VAR }; ListBox LB_VARCHAPTERLEVEL { + HelpID = "sw:ListBox:TP_FLD_VAR:LB_VARCHAPTERLEVEL"; Border = TRUE ; Hide = TRUE ; Pos = MAP_APPFONT ( 208 , 123 ) ; @@ -132,6 +138,7 @@ TabPage TP_FLD_VAR }; Edit ED_VARSEPARATOR { + HelpID = "sw:Edit:TP_FLD_VAR:ED_VARSEPARATOR"; Pos = MAP_APPFONT ( 208 , 138 ) ; Size = MAP_APPFONT ( 46 , 12 ) ; Border = TRUE ; @@ -148,6 +155,7 @@ TabPage TP_FLD_VAR }; Edit ED_VARNAME { + HelpID = "sw:Edit:TP_FLD_VAR:ED_VARNAME"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 166 ) ; Size = MAP_APPFONT ( 76 , 12 ) ; @@ -163,6 +171,7 @@ TabPage TP_FLD_VAR }; Edit ED_VARVALUE { + HelpID = "sw:Edit:TP_FLD_VAR:ED_VARVALUE"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 166 ) ; Size = MAP_APPFONT ( 76 , 12 ) ; diff --git a/sw/source/ui/fldui/inpdlg.cxx b/sw/source/ui/fldui/inpdlg.cxx index d6fecac8a7..2fe5a3f89c 100644 --- a/sw/source/ui/fldui/inpdlg.cxx +++ b/sw/source/ui/fldui/inpdlg.cxx @@ -33,10 +33,6 @@ #undef SW_DLLIMPLEMENTATION #endif - - -#define _INPDLG_CXX - #include <vcl/msgbox.hxx> #include <unotools/charclass.hxx> #include <editeng/unolingu.hxx> @@ -123,7 +119,9 @@ SwFldInputDlg::SwFldInputDlg( Window *pParent, SwWrtShell &rS, //values are formatted - formulas are not CharClass aCC( SvxCreateLocale( pSetFld->GetLanguage() )); if( aCC.isNumeric( sFormula )) - aStr = pSetFld->Expand(); + { + aStr = pSetFld->ExpandField(true); + } else aStr = sFormula; aLabelED.SetText( pSetFld->GetPromptText() ); diff --git a/sw/source/ui/fldui/inpdlg.src b/sw/source/ui/fldui/inpdlg.src index f615b68f48..8cd70d8247 100644 --- a/sw/source/ui/fldui/inpdlg.src +++ b/sw/source/ui/fldui/inpdlg.src @@ -46,6 +46,7 @@ ModalDialog DLG_FLD_INPUT };*/ Edit ED_LABEL { + HelpID = "sw:Edit:DLG_FLD_INPUT:ED_LABEL"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 115 , 12 ) ; @@ -56,6 +57,7 @@ ModalDialog DLG_FLD_INPUT }; MultiLineEdit ED_EDIT { + HelpID = "sw:MultiLineEdit:DLG_FLD_INPUT:ED_EDIT"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 32 ) ; Size = MAP_APPFONT ( 115 , 72 ) ; @@ -83,6 +85,7 @@ ModalDialog DLG_FLD_INPUT }; PushButton PB_NEXT { + HelpID = "sw:PushButton:DLG_FLD_INPUT:PB_NEXT"; Pos = MAP_APPFONT ( 139 , 40 ) ; Size = MAP_APPFONT ( 50 , 15 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/fldui/javaedit.src b/sw/source/ui/fldui/javaedit.src index ffeb2b84e8..cbcc83f055 100644 --- a/sw/source/ui/fldui/javaedit.src +++ b/sw/source/ui/fldui/javaedit.src @@ -33,6 +33,7 @@ // RID_SVXDLG_POSTIT ----------------------------------------------------- ModalDialog DLG_JAVAEDIT { + HelpID = "sw:ModalDialog:DLG_JAVAEDIT"; OutputSize = TRUE ; SvLook = TRUE ; Size = MAP_APPFONT ( 248 , 157 ) ; @@ -45,6 +46,7 @@ ModalDialog DLG_JAVAEDIT }; Edit ED_TYPE { + HelpID = "sw:Edit:DLG_JAVAEDIT:ED_TYPE"; Border = TRUE ; Text = "JavaScript" ; // Nicht uebersetzen!!! @@ -54,6 +56,7 @@ ModalDialog DLG_JAVAEDIT }; RadioButton RB_URL { + HelpID = "sw:RadioButton:DLG_JAVAEDIT:RB_URL"; Pos = MAP_APPFONT ( 12 , 28 ) ; Size = MAP_APPFONT ( 55 , 10 ) ; TabStop = TRUE ; @@ -61,6 +64,7 @@ ModalDialog DLG_JAVAEDIT }; Edit ED_URL { + HelpID = "sw:Edit:DLG_JAVAEDIT:ED_URL"; Border = TRUE ; Pos = MAP_APPFONT ( 70 , 27 ) ; Size = MAP_APPFONT ( 87 , 12 ) ; @@ -68,6 +72,7 @@ ModalDialog DLG_JAVAEDIT }; PushButton PB_URL { + HelpID = "sw:PushButton:DLG_JAVAEDIT:PB_URL"; Pos = MAP_APPFONT ( 163 , 26 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; Text = "~..." ; @@ -75,6 +80,7 @@ ModalDialog DLG_JAVAEDIT }; RadioButton RB_EDIT { + HelpID = "sw:RadioButton:DLG_JAVAEDIT:RB_EDIT"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 140 , 10 ) ; Text [ en-US ] = "~Text" ; @@ -83,6 +89,7 @@ ModalDialog DLG_JAVAEDIT }; MultiLineEdit ED_EDIT { + HelpID = "sw:MultiLineEdit:DLG_JAVAEDIT:ED_EDIT"; Border = TRUE ; Pos = MAP_APPFONT ( 23 , 54 ) ; Size = MAP_APPFONT ( 155 , 91 ) ; @@ -116,12 +123,14 @@ ModalDialog DLG_JAVAEDIT }; ImageButton BTN_PREV { + HelpID = "sw:ImageButton:DLG_JAVAEDIT:BTN_PREV"; Pos = MAP_APPFONT ( 191 , 60 ) ; Size = MAP_APPFONT ( 24 , 14 ) ; Symbol = IMAGEBUTTON_ARROW_LEFT ; }; ImageButton BTN_NEXT { + HelpID = "sw:ImageButton:DLG_JAVAEDIT:BTN_NEXT"; Pos = MAP_APPFONT ( 217 , 60 ) ; Size = MAP_APPFONT ( 24 , 14 ) ; Symbol = IMAGEBUTTON_ARROW_RIGHT ; diff --git a/sw/source/ui/fldui/makefile.mk b/sw/source/ui/fldui/makefile.mk deleted file mode 100644 index 212c3da6ba..0000000000 --- a/sw/source/ui/fldui/makefile.mk +++ /dev/null @@ -1,90 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. -LIBTARGET=no -PRJNAME=sw -TARGET=fldui - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - changedb.src \ - DropDownFieldDialog.src\ - flddb.src \ - flddinf.src \ - flddok.src \ - fldfunc.src \ - fldref.src \ - fldtdlg.src \ - fldui.src \ - fldvar.src \ - javaedit.src \ - inpdlg.src - -SLOFILES = \ - $(EXCEPTIONSFILES) - -EXCEPTIONSFILES = \ - $(SLO)$/DropDownFieldDialog.obj \ - $(SLO)$/FldRefTreeListBox.obj \ - $(SLO)$/changedb.obj \ - $(SLO)$/flddb.obj \ - $(SLO)$/flddinf.obj \ - $(SLO)$/flddok.obj \ - $(SLO)$/fldedt.obj \ - $(SLO)$/fldfunc.obj \ - $(SLO)$/fldmgr.obj \ - $(SLO)$/fldpage.obj \ - $(SLO)$/fldref.obj \ - $(SLO)$/fldtdlg.obj \ - $(SLO)$/fldvar.obj \ - $(SLO)$/fldwrap.obj \ - $(SLO)$/inpdlg.obj \ - $(SLO)$/javaedit.obj \ - $(SLO)$/xfldui.obj - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/fldmgr.obj \ - $(SLO)$/fldwrap.obj \ - $(SLO)$/xfldui.obj - -# $(SLO)$/DropDownFieldDialog.obj \ - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/fmtui/fmtui.src b/sw/source/ui/fmtui/fmtui.src deleted file mode 100644 index 2f68cbdc56..0000000000 --- a/sw/source/ui/fmtui/fmtui.src +++ /dev/null @@ -1,88 +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 "fmtui.hrc" -#include "globals.hrc" - -String STR_FMT_STD -{ - Text [ en-US ] = "(none)" ; -}; -String STR_TEMPLATE_WILDCARD -{ - TEXT = "*.vor" ; -}; - //String STR_NONAME //!! VB - //{ - // TEXT = "Unbenannt "; - // TEXT [English] = "Noname "; - // TEXT [norwegian] = "Noname "; - // TEXT [italian] = "Senza nome"; - // TEXT [portuguese_brazilian] = "Semnome "; - // TEXT [portuguese] = "Semnome "; - // TEXT [finnish] = "Nimetön "; - // TEXT [danish] = "Intet navn"; - // TEXT [french] = "Sansnom "; - // TEXT [swedish] = "Namnlös"; - // TEXT [dutch] = "Naamloos"; - // TEXT [spanish] = "Sin nombre "; - // TEXT [english_us] = "Noname "; - //}; -String STR_OVERWRITE -{ - /* ### ACHTUNG: Neuer Text in Resource? Wollen Sie die Vorlage wirklich überschreiben? : Wollen Sie die Vorlage wirklich ³berschreiben? */ - Text [ en-US ] = "\nAre you sure you want to delete this template?" ; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sw/source/ui/fmtui/makefile.mk b/sw/source/ui/fmtui/makefile.mk deleted file mode 100644 index 9474cfa135..0000000000 --- a/sw/source/ui/fmtui/makefile.mk +++ /dev/null @@ -1,54 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=fmtui -LIBTARGET=NO -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - tmpdlg.src - -SLOFILES = \ - $(EXCEPTIONSFILES) - -EXCEPTIONSFILES = \ - $(SLO)$/tmpdlg.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index 3deeda034c..520165f39f 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -42,7 +42,7 @@ #endif #include <vcl/msgbox.hxx> #include <sfx2/viewfrm.hxx> -#include <svx/hdft2.hxx> +#include <svx/hdft.hxx> #include <editeng/flstitem.hxx> #include <svx/htmlmode.hxx> #include <svtools/htmlcfg.hxx> diff --git a/sw/source/ui/frmdlg/column.src b/sw/source/ui/frmdlg/column.src index 449fbbf121..537cf1ce9c 100644 --- a/sw/source/ui/frmdlg/column.src +++ b/sw/source/ui/frmdlg/column.src @@ -46,6 +46,7 @@ TabPage TP_COLUMN }; NumericField ED_NUMBER { + HelpID = "sw:NumericField:TP_COLUMN:ED_NUMBER"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 30 ) ; Size = MAP_APPFONT ( 24 , 12 ) ; @@ -68,6 +69,7 @@ TabPage TP_COLUMN }; CheckBox CB_BALANCECOLS { + HelpID = "sw:CheckBox:TP_COLUMN:CB_BALANCECOLS"; Pos = MAP_APPFONT ( 7 , 46 ) ; Size = MAP_APPFONT ( 163 , 10 ) ; Hide = TRUE; @@ -93,6 +95,7 @@ TabPage TP_COLUMN }; ImageButton BTN_DOWN { + HelpID = "sw:ImageButton:TP_COLUMN:BTN_DOWN"; Disable = TRUE ; Pos = MAP_APPFONT ( 62 , 69 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; @@ -122,6 +125,7 @@ TabPage TP_COLUMN }; ImageButton BTN_UP { + HelpID = "sw:ImageButton:TP_COLUMN:BTN_UP"; Disable = TRUE ; Pos = MAP_APPFONT ( 238 , 69 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; @@ -137,6 +141,7 @@ TabPage TP_COLUMN }; MetricField ED_1 { + HelpID = "sw:MetricField:TP_COLUMN:ED_1"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 87 , 83 ) ; @@ -155,6 +160,7 @@ TabPage TP_COLUMN }; MetricField ED_2 { + HelpID = "sw:MetricField:TP_COLUMN:ED_2"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 137 , 83 ) ; @@ -173,6 +179,7 @@ TabPage TP_COLUMN }; MetricField ED_3 { + HelpID = "sw:MetricField:TP_COLUMN:ED_3"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 187 , 83 ) ; @@ -198,6 +205,7 @@ TabPage TP_COLUMN }; MetricField ED_DIST1 { + HelpID = "sw:MetricField:TP_COLUMN:ED_DIST1"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 112 , 99 ) ; @@ -216,6 +224,7 @@ TabPage TP_COLUMN }; MetricField ED_DIST2 { + HelpID = "sw:MetricField:TP_COLUMN:ED_DIST2"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 162 , 99 ) ; @@ -234,6 +243,7 @@ TabPage TP_COLUMN }; CheckBox CB_AUTO_WIDTH { + HelpID = "sw:CheckBox:TP_COLUMN:CB_AUTO_WIDTH"; Pos = MAP_APPFONT ( 87 , 115 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "Auto~Width" ; @@ -255,6 +265,7 @@ TabPage TP_COLUMN }; ListBox LB_STYLE { + HelpID = "sw:ListBox:TP_COLUMN:LB_STYLE"; Pos = MAP_APPFONT ( 50 , 138 ) ; Size = MAP_APPFONT ( 60 , 66 ) ; TabStop = TRUE ; @@ -273,6 +284,7 @@ TabPage TP_COLUMN }; MetricField ED_HEIGHT { + HelpID = "sw:MetricField:TP_COLUMN:ED_HEIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( 50 , 154 ) ; Size = MAP_APPFONT ( 60 , 12 ) ; @@ -297,6 +309,7 @@ TabPage TP_COLUMN }; ListBox LB_POSITION { + HelpID = "sw:ListBox:TP_COLUMN:LB_POSITION"; Pos = MAP_APPFONT ( 50 , 170 ) ; Size = MAP_APPFONT ( 60 , 40 ) ; TabStop = TRUE ; @@ -337,6 +350,7 @@ TabPage TP_COLUMN }; ListBox LB_TEXTDIRECTION { + HelpID = "sw:ListBox:TP_COLUMN:LB_TEXTDIRECTION"; Border = TRUE ; Pos = MAP_APPFONT ( 127 , 149 ) ; Size = MAP_APPFONT ( 127 , 50 ) ; @@ -385,6 +399,7 @@ ModalDialog DLG_COLUMN }; ListBox LB_APPLY_TO { + HelpID = "sw:ListBox:DLG_COLUMN:LB_APPLY_TO"; Pos = MAP_APPFONT ( 260 , 74 ) ; Size = MAP_APPFONT ( 50 , 66 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/frmdlg/cption.src b/sw/source/ui/frmdlg/cption.src index 9440c7859f..0a3876c421 100644 --- a/sw/source/ui/frmdlg/cption.src +++ b/sw/source/ui/frmdlg/cption.src @@ -61,6 +61,7 @@ ModalDialog DLG_CAPTION }; PushButton BTN_AUTOCAPTION { + HelpID = "sw:PushButton:DLG_CAPTION:BTN_AUTOCAPTION"; Pos = MAP_APPFONT ( 194 , 63 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -68,6 +69,7 @@ ModalDialog DLG_CAPTION }; PushButton BTN_OPTION { + HelpID = "sw:PushButton:DLG_CAPTION:BTN_OPTION"; Pos = MAP_APPFONT ( 194 , 80 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -83,6 +85,7 @@ ModalDialog DLG_CAPTION }; Edit EDT_TEXT { + HelpID = "sw:Edit:DLG_CAPTION:EDT_TEXT"; Pos = MAP_APPFONT ( 6 , 17 ) ; Size = MAP_APPFONT ( 182 , 12 ) ; Border = TRUE ; @@ -104,6 +107,7 @@ ModalDialog DLG_CAPTION }; ComboBox BOX_CATEGORY { + HelpID = "sw:ComboBox:DLG_CAPTION:BOX_CATEGORY"; Pos = MAP_APPFONT ( 82 , 46 ) ; Size = MAP_APPFONT ( 106 , 61 ) ; DropDown = TRUE ; @@ -119,6 +123,7 @@ ModalDialog DLG_CAPTION }; ListBox BOX_FORMAT { + HelpID = "sw:ListBox:DLG_CAPTION:BOX_FORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 82 , 63 ) ; Size = MAP_APPFONT ( 106 , 83 ) ; @@ -135,6 +140,7 @@ ModalDialog DLG_CAPTION }; Edit ED_NUM_SEP { + HelpID = "sw:Edit:DLG_CAPTION:ED_NUM_SEP"; Pos = MAP_APPFONT ( 82 , 63 ) ; Size = MAP_APPFONT ( 106 , 12 ) ; Border = TRUE ; @@ -152,6 +158,7 @@ ModalDialog DLG_CAPTION }; Edit EDT_SEP { + HelpID = "sw:Edit:DLG_CAPTION:EDT_SEP"; Pos = MAP_APPFONT ( 82 , 80 ) ; Size = MAP_APPFONT ( 106 , 12 ) ; Border = TRUE ; @@ -168,6 +175,7 @@ ModalDialog DLG_CAPTION }; ListBox BOX_POS { + HelpID = "sw:ListBox:DLG_CAPTION:BOX_POS"; Pos = MAP_APPFONT ( 82 , 97 ) ; Size = MAP_APPFONT ( 106 , 61 ) ; DropDown = TRUE ; @@ -244,6 +252,7 @@ ModalDialog DLG_SEQUENCE_OPTION }; ListBox LB_LEVEL { + HelpID = "sw:ListBox:DLG_SEQUENCE_OPTION:LB_LEVEL"; Border = TRUE ; Pos = MAP_APPFONT ( 65 , 18 ) ; Size = MAP_APPFONT ( 72 , 60 ) ; @@ -262,6 +271,7 @@ ModalDialog DLG_SEQUENCE_OPTION }; Edit ED_SEPARATOR { + HelpID = "sw:Edit:DLG_SEQUENCE_OPTION:ED_SEPARATOR"; Pos = MAP_APPFONT ( 65 , 34 ) ; Size = MAP_APPFONT ( 72 , 12 ) ; Border = TRUE ; @@ -282,6 +292,7 @@ ModalDialog DLG_SEQUENCE_OPTION }; ListBox LB_CHARSTYLE { + HelpID = "sw:ListBox:DLG_SEQUENCE_OPTION:LB_CHARSTYLE"; Border = TRUE ; Pos = MAP_APPFONT ( 65 , 68 ) ; Size = MAP_APPFONT ( 72 , 60 ) ; @@ -294,6 +305,7 @@ ModalDialog DLG_SEQUENCE_OPTION }; CheckBox CB_APPLYBAS { + HelpID = "sw:CheckBox:DLG_SEQUENCE_OPTION:CB_APPLYBAS"; Pos = MAP_APPFONT ( 12 , 84 ) ; Size = MAP_APPFONT ( 136 , 10 ) ; TabStop = TRUE ; @@ -313,6 +325,7 @@ ModalDialog DLG_SEQUENCE_OPTION }; ListBox LB_ORDER { + HelpID = "sw:ListBox:DLG_SEQUENCE_OPTION:LB_ORDER"; Border = TRUE ; Pos = MAP_APPFONT ( 65 , 114 ) ; Size = MAP_APPFONT ( 72 , 60 ) ; diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx index 2fdf235a39..73a52debf2 100644 --- a/sw/source/ui/frmdlg/frmdlg.cxx +++ b/sw/source/ui/frmdlg/frmdlg.cxx @@ -87,7 +87,8 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame, aTmp += *pStr; aTmp += ')'; } - AddTabPage(TP_FRM_STD, SwFrmPage::Create, 0); + + AddTabPage(TP_FRM_STD, SwFrmPage::Create, 0); AddTabPage(TP_FRM_ADD, SwFrmAddPage::Create, 0); AddTabPage(TP_FRM_WRAP, SwWrapTabPage::Create, 0); AddTabPage(TP_FRM_URL, SwFrmURLPage::Create, 0); diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 7b6eafd3fe..59d3c5f612 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -2,7 +2,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 @@ -649,7 +649,10 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) : nOldV(text::VertOrientation::TOP), nOldVRel(text::RelOrientation::PRINT_AREA), pVMap( 0 ), - pHMap( 0 ) + pHMap( 0 ), + m_bAllowVertPositioning( true ), + m_bIsMathOLE( false ), + m_bIsMathBaselineAlignment( true ) { FreeResource(); SetExchangeSupport(); @@ -752,8 +755,16 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) SetMetric( aAtHorzPosED, aMetric ); SetMetric( aAtVertPosED, aMetric ); + const SfxPoolItem* pItem = NULL; const SwFmtAnchor& rAnchor = (const SwFmtAnchor&)rSet.Get(RES_ANCHOR); + if (SFX_ITEM_SET == rSet.GetItemState(FN_OLE_IS_MATH, FALSE, &pItem)) + m_bIsMathOLE = ((const SfxBoolItem*)pItem)->GetValue(); + if (SFX_ITEM_SET == rSet.GetItemState(FN_MATH_BASELINE_ALIGNMENT, FALSE, &pItem)) + m_bIsMathBaselineAlignment = ((const SfxBoolItem*)pItem)->GetValue(); + EnableVerticalPositioning( !(m_bIsMathOLE && m_bIsMathBaselineAlignment + && FLY_AS_CHAR == rAnchor.GetAnchorId()) ); + if (bFormat) { // Bei Formaten keine Ankerbearbeitung @@ -781,7 +792,6 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) if ( nDlgType == DLG_FRM_GRF || nDlgType == DLG_FRM_OLE ) { OSL_ENSURE(pSh , "shell not found"); - const SfxPoolItem* pItem; //OS: nur fuer die Variante Einfuegen/Grafik/Eigenschaften if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_GRF_REALSIZE, FALSE, &pItem)) aGrfSize = ((const SvxSizeItem*)pItem)->GetSize(); @@ -1232,8 +1242,8 @@ void SwFrmPage::InitPos(RndStdIds eId, if ( nY != LONG_MAX ) aAtVertPosED.SetValue( aAtVertPosED.Normalize(nY), FUNIT_TWIP ); } - aAtVertPosFT.Enable( bEnable ); - aAtVertPosED.Enable( bEnable ); + aAtVertPosFT.Enable( bEnable && m_bAllowVertPositioning ); + aAtVertPosED.Enable( bEnable && m_bAllowVertPositioning ); UpdateExample(); } @@ -1432,8 +1442,10 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap, } } - _rLB.Enable(_rLB.GetEntryCount() != 0); - _rFT.Enable(_rLB.GetEntryCount() != 0); + const bool bEnable = _rLB.GetEntryCount() != 0 + && (&_rLB != &aVertRelationLB || m_bAllowVertPositioning); + _rLB.Enable( bEnable ); + _rFT.Enable( bEnable ); RelHdl(&_rLB); @@ -1770,6 +1782,10 @@ IMPL_LINK( SwFrmPage, AnchorTypeHdl, RadioButton *, EMPTYARG ) PosHdl(&aHorizontalDLB); PosHdl(&aVerticalDLB); } + + EnableVerticalPositioning( !(m_bIsMathOLE && m_bIsMathBaselineAlignment + && FLY_AS_CHAR == eId) ); + return 0; } @@ -1791,7 +1807,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB ) } else { - BOOL bEnable = text::VertOrientation::NONE == nAlign; + BOOL bEnable = text::VertOrientation::NONE == nAlign && m_bAllowVertPositioning; aAtVertPosED.Enable( bEnable ); aAtVertPosFT.Enable( bEnable ); } @@ -2205,6 +2221,19 @@ void SwFrmPage::SetFormatUsed(BOOL bFmt) } } + +void SwFrmPage::EnableVerticalPositioning( bool bEnable ) +{ + m_bAllowVertPositioning = bEnable; + aVerticalFT.Enable( bEnable ); + aVerticalDLB.Enable( bEnable ); + aAtVertPosFT.Enable( bEnable ); + aAtVertPosED.Enable( bEnable ); + aVertRelationFT.Enable( bEnable ); + aVertRelationLB.Enable( bEnable ); +} + + SwGrfExtPage::SwGrfExtPage(Window *pParent, const SfxItemSet &rSet) : SfxTabPage( pParent, SW_RES(TP_GRF_EXT), rSet ), aMirrorFL (this, SW_RES( FL_MIRROR )), @@ -3052,4 +3081,4 @@ IMPL_LINK(SwFrmAddPage, ChainModifyHdl, ListBox*, pBox) return 0; } -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/sw/source/ui/frmdlg/frmpage.src b/sw/source/ui/frmdlg/frmpage.src index 505938c114..faadabe67c 100644 --- a/sw/source/ui/frmdlg/frmpage.src +++ b/sw/source/ui/frmdlg/frmpage.src @@ -243,6 +243,7 @@ TabPage TP_FRM_STD }; MetricField ED_WIDTH { + HelpID = "sw:MetricField:TP_FRM_STD:ED_WIDTH"; Border = TRUE ; Pos = MAP_APPFONT ( SWFRMPG_COL_3 , SWFRMPG_ROW_1 ) ; Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_3) , RSC_CD_TEXTBOX_HEIGHT ) ; @@ -261,6 +262,7 @@ TabPage TP_FRM_STD }; CheckBox CB_REL_WIDTH { + HelpID = "sw:CheckBox:TP_FRM_STD:CB_REL_WIDTH"; Pos = MAP_APPFONT ( SWFRMPG_COL_2 , SWFRMPG_ROW_3 ) ; Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_2) , RSC_CD_CHECKBOX_HEIGHT ) ; TabStop = TRUE ; @@ -268,6 +270,7 @@ TabPage TP_FRM_STD }; CheckBox CB_AUTOWIDTH { + HelpID = "sw:CheckBox:TP_FRM_STD:CB_AUTOWIDTH"; Pos = MAP_APPFONT ( SWFRMPG_COL_2 , SWFRMPG_ROW_4 ) ; Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_2) , RSC_CD_CHECKBOX_HEIGHT ) ; TabStop = TRUE ; @@ -289,6 +292,7 @@ TabPage TP_FRM_STD }; MetricField ED_HEIGHT { + HelpID = "sw:MetricField:TP_FRM_STD:ED_HEIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( SWFRMPG_COL_3 , SWFRMPG_ROW_5 ) ; Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_3) , RSC_CD_TEXTBOX_HEIGHT ) ; @@ -306,6 +310,7 @@ TabPage TP_FRM_STD }; CheckBox CB_REL_HEIGHT { + HelpID = "sw:CheckBox:TP_FRM_STD:CB_REL_HEIGHT"; Pos = MAP_APPFONT ( SWFRMPG_COL_2 , SWFRMPG_ROW_7 ) ; Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_2) , RSC_CD_CHECKBOX_HEIGHT ) ; TabStop = TRUE ; @@ -313,6 +318,7 @@ TabPage TP_FRM_STD }; CheckBox CB_AUTOHEIGHT { + HelpID = "sw:CheckBox:TP_FRM_STD:CB_AUTOHEIGHT"; Pos = MAP_APPFONT ( SWFRMPG_COL_2 , SWFRMPG_ROW_8 ) ; Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_2) , RSC_CD_CHECKBOX_HEIGHT ) ; TabStop = TRUE ; @@ -320,6 +326,7 @@ TabPage TP_FRM_STD }; CheckBox CB_FIXEDRATIO { + HelpID = "sw:CheckBox:TP_FRM_STD:CB_FIXEDRATIO"; Pos = MAP_APPFONT ( SWFRMPG_COL_1 , SWFRMPG_ROW_9 ) ; Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_1) , RSC_CD_CHECKBOX_HEIGHT ) ; TabStop = TRUE ; @@ -327,6 +334,7 @@ TabPage TP_FRM_STD }; PushButton BT_REALSIZE { + HelpID = "sw:PushButton:TP_FRM_STD:BT_REALSIZE"; Pos = MAP_APPFONT ( 35 , 86 ) ; Size = MAP_APPFONT ( 70 , 14 ) ; TabStop = TRUE ; @@ -347,30 +355,35 @@ TabPage TP_FRM_STD }; RadioButton RB_ANCHOR_PAGE { + HelpID = "sw:RadioButton:TP_FRM_STD:RB_ANCHOR_PAGE"; Pos = MAP_APPFONT ( 122 , 14 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "To ~page"; }; RadioButton RB_ANCHOR_PARA { + HelpID = "sw:RadioButton:TP_FRM_STD:RB_ANCHOR_PARA"; Pos = MAP_APPFONT ( 122 , 28 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "To paragrap~h"; }; RadioButton RB_ANCHOR_AT_CHAR { + HelpID = "sw:RadioButton:TP_FRM_STD:RB_ANCHOR_AT_CHAR"; Pos = MAP_APPFONT ( 122 , 42 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "To cha~racter"; }; RadioButton RB_ANCHOR_AS_CHAR { + HelpID = "sw:RadioButton:TP_FRM_STD:RB_ANCHOR_AS_CHAR"; Pos = MAP_APPFONT ( 122 , 56 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~As character" ; }; RadioButton RB_ANCHOR_FRAME { + HelpID = "sw:RadioButton:TP_FRM_STD:RB_ANCHOR_FRAME"; Pos = MAP_APPFONT ( 122 , 70 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "To ~frame"; @@ -395,6 +408,7 @@ TabPage TP_FRM_STD }; ListBox DLB_HORIZONTAL { + HelpID = "sw:ListBox:TP_FRM_STD:DLB_HORIZONTAL"; Pos = MAP_APPFONT ( 49 , SWFRMPG_ROW_11 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; TabStop = TRUE ; @@ -409,6 +423,7 @@ TabPage TP_FRM_STD }; MetricField ED_AT_HORZ_POS { + HelpID = "sw:MetricField:TP_FRM_STD:ED_AT_HORZ_POS"; Border = TRUE ; Pos = MAP_APPFONT ( 123 , SWFRMPG_ROW_11 ) ; Size = MAP_APPFONT ( 35 , RSC_CD_TEXTBOX_HEIGHT ) ; @@ -433,6 +448,7 @@ TabPage TP_FRM_STD }; ListBox LB_HORI_RELATION { + HelpID = "sw:ListBox:TP_FRM_STD:LB_HORI_RELATION"; Pos = MAP_APPFONT ( 183 , SWFRMPG_ROW_11 ) ; Size = MAP_APPFONT ( 65 , 60 ) ; TabStop = TRUE ; @@ -440,6 +456,7 @@ TabPage TP_FRM_STD }; CheckBox CB_MIRROR { + HelpID = "sw:CheckBox:TP_FRM_STD:CB_MIRROR"; Pos = MAP_APPFONT ( SWFRMPG_COL_2 , SWFRMPG_ROW_13 ) ; Size = MAP_APPFONT ( (260-SWFRMPG_COL_2-1) , RSC_CD_CHECKBOX_HEIGHT ) ; TabStop = TRUE ; @@ -454,6 +471,7 @@ TabPage TP_FRM_STD }; ListBox DLB_VERTICAL { + HelpID = "sw:ListBox:TP_FRM_STD:DLB_VERTICAL"; Pos = MAP_APPFONT ( 49 , SWFRMPG_ROW_14 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; TabStop = TRUE ; @@ -468,6 +486,7 @@ TabPage TP_FRM_STD }; MetricField ED_AT_VERT_POS { + HelpID = "sw:MetricField:TP_FRM_STD:ED_AT_VERT_POS"; Border = TRUE ; Pos = MAP_APPFONT ( 123 , SWFRMPG_ROW_14 ) ; Size = MAP_APPFONT ( 35 , RSC_CD_TEXTBOX_HEIGHT ) ; @@ -492,6 +511,7 @@ TabPage TP_FRM_STD }; ListBox LB_VERT_RELATION { + HelpID = "sw:ListBox:TP_FRM_STD:LB_VERT_RELATION"; Pos = MAP_APPFONT ( 183 , SWFRMPG_ROW_14 ) ; Size = MAP_APPFONT ( 65 , 60 ) ; TabStop = TRUE ; @@ -499,6 +519,7 @@ TabPage TP_FRM_STD }; CheckBox CB_FOLLOWTEXTFLOW { + HelpID = "sw:CheckBox:TP_FRM_STD:CB_FOLLOWTEXTFLOW"; Pos = MAP_APPFONT ( SWFRMPG_COL_2 , SWFRMPG_ROW_16 ) ; Size = MAP_APPFONT ( (260-SWFRMPG_COL_2-1) , RSC_CD_CHECKBOX_HEIGHT ) ; TabStop = TRUE ; @@ -536,6 +557,7 @@ TabPage TP_GRF_EXT }; Edit ED_CONNECT { + HelpID = "sw:Edit:TP_GRF_EXT:ED_CONNECT"; Pos = MAP_APPFONT ( 13 , 109 ) ; Size = MAP_APPFONT ( 200 , 12 ) ; Text [ en-US ] = "[None]" ; @@ -545,6 +567,7 @@ TabPage TP_GRF_EXT }; PushButton PB_BROWSE { + HelpID = "sw:PushButton:TP_GRF_EXT:PB_BROWSE"; Disable = TRUE ; Pos = MAP_APPFONT ( 230 , 109 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; @@ -554,6 +577,7 @@ TabPage TP_GRF_EXT }; CheckBox CB_VERT { + HelpID = "sw:CheckBox:TP_GRF_EXT:CB_VERT"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 48 , 10 ) ; TabStop = TRUE ; @@ -562,6 +586,7 @@ TabPage TP_GRF_EXT }; CheckBox CB_HOR { + HelpID = "sw:CheckBox:TP_GRF_EXT:CB_HOR"; Pos = MAP_APPFONT ( 12 , 28 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; TabStop = TRUE ; @@ -569,6 +594,7 @@ TabPage TP_GRF_EXT }; RadioButton RB_MIRROR_ALL_PAGES { + HelpID = "sw:RadioButton:TP_GRF_EXT:RB_MIRROR_ALL_PAGES"; Pos = MAP_APPFONT ( 18 , 42 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -576,6 +602,7 @@ TabPage TP_GRF_EXT }; RadioButton RB_MIRROR_LEFT_PAGES { + HelpID = "sw:RadioButton:TP_GRF_EXT:RB_MIRROR_LEFT_PAGES"; Pos = MAP_APPFONT ( 18 , 56 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -583,6 +610,7 @@ TabPage TP_GRF_EXT }; RadioButton RB_MIRROR_RIGHT_PAGES { + HelpID = "sw:RadioButton:TP_GRF_EXT:RB_MIRROR_RIGHT_PAGES"; Pos = MAP_APPFONT ( 18 , 70 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -620,6 +648,7 @@ TabPage TP_FRM_URL }; Edit ED_URL { + HelpID = "sw:Edit:TP_FRM_URL:ED_URL"; Pos = MAP_APPFONT ( 45 , 14 ) ; Size = MAP_APPFONT ( 149 , 12 ) ; Left = TRUE ; @@ -634,6 +663,7 @@ TabPage TP_FRM_URL }; Edit ED_NAME { + HelpID = "sw:Edit:TP_FRM_URL:ED_NAME"; Pos = MAP_APPFONT ( 45 , 30 ) ; Size = MAP_APPFONT ( 149 , 12 ) ; Left = TRUE ; @@ -648,6 +678,7 @@ TabPage TP_FRM_URL }; ComboBox CB_FRAME { + HelpID = "sw:ComboBox:TP_FRM_URL:CB_FRAME"; Pos = MAP_APPFONT ( 45 , 46 ) ; Size = MAP_APPFONT ( 89 , 50 ) ; Left = TRUE ; @@ -656,6 +687,7 @@ TabPage TP_FRM_URL }; PushButton PB_SEARCH { + HelpID = "sw:PushButton:TP_FRM_URL:PB_SEARCH"; Pos = MAP_APPFONT ( 198 , 13 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -669,12 +701,14 @@ TabPage TP_FRM_URL }; CheckBox CB_SERVER { + HelpID = "sw:CheckBox:TP_FRM_URL:CB_SERVER"; Pos = MAP_APPFONT ( 12 , 75 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; Text [ en-US ] = "~Server-side image map"; }; CheckBox CB_CLIENT { + HelpID = "sw:CheckBox:TP_FRM_URL:CB_CLIENT"; Pos = MAP_APPFONT ( 12 , 89 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; Text [ en-US ] = "~Client-side image map"; @@ -701,6 +735,7 @@ TabPage TP_FRM_ADD }; Edit ED_NAME { + HelpID = "sw:Edit:TP_FRM_ADD:ED_NAME"; Border = TRUE ; Pos = MAP_APPFONT ( 91 , 14 ) ; Size = MAP_APPFONT ( 157 , 12 ) ; @@ -714,6 +749,7 @@ TabPage TP_FRM_ADD }; Edit ED_ALT_NAME { + HelpID = "sw:Edit:TP_FRM_ADD:ED_ALT_NAME"; Border = TRUE ; Pos = MAP_APPFONT ( 91 , 30 ) ; Size = MAP_APPFONT ( 157 , 12 ) ; @@ -727,6 +763,7 @@ TabPage TP_FRM_ADD }; ListBox LB_PREV { + HelpID = "sw:ListBox:TP_FRM_ADD:LB_PREV"; Border = TRUE ; Pos = MAP_APPFONT ( 91 , 46 ) ; Size = MAP_APPFONT ( 157 , 50 ) ; @@ -745,6 +782,7 @@ TabPage TP_FRM_ADD }; ListBox LB_NEXT { + HelpID = "sw:ListBox:TP_FRM_ADD:LB_NEXT"; Border = TRUE ; Pos = MAP_APPFONT ( 91 , 62 ) ; Size = MAP_APPFONT ( 157 , 50 ) ; @@ -763,6 +801,7 @@ TabPage TP_FRM_ADD }; CheckBox CB_PROTECT_CONTENT { + HelpID = "sw:CheckBox:TP_FRM_ADD:CB_PROTECT_CONTENT"; Pos = MAP_APPFONT ( 12 , 91 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -770,6 +809,7 @@ TabPage TP_FRM_ADD }; CheckBox CB_PROTECT_FRAME { + HelpID = "sw:CheckBox:TP_FRM_ADD:CB_PROTECT_FRAME"; Pos = MAP_APPFONT ( 12 , 105 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -777,6 +817,7 @@ TabPage TP_FRM_ADD }; CheckBox CB_PROTECT_SIZE { + HelpID = "sw:CheckBox:TP_FRM_ADD:CB_PROTECT_SIZE"; Pos = MAP_APPFONT ( 12 , 119 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -790,6 +831,7 @@ TabPage TP_FRM_ADD }; CheckBox CB_EDIT_IN_READONLY { + HelpID = "sw:CheckBox:TP_FRM_ADD:CB_EDIT_IN_READONLY"; Pos = MAP_APPFONT ( 12 , 146 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; TabStop = TRUE ; @@ -797,6 +839,7 @@ TabPage TP_FRM_ADD }; CheckBox CB_PRINT_FRAME { + HelpID = "sw:CheckBox:TP_FRM_ADD:CB_PRINT_FRAME"; Pos = MAP_APPFONT ( 12 , 160 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; TabStop = TRUE ; @@ -819,6 +862,7 @@ TabPage TP_FRM_ADD }; ListBox LB_TEXTFLOW { + HelpID = "sw:ListBox:TP_FRM_ADD:LB_TEXTFLOW"; Border = TRUE ; Pos = MAP_APPFONT ( 81 , 172 ) ; Size = MAP_APPFONT ( 167 , 50 ) ; diff --git a/sw/source/ui/frmdlg/makefile.mk b/sw/source/ui/frmdlg/makefile.mk deleted file mode 100644 index 3caff5544e..0000000000 --- a/sw/source/ui/frmdlg/makefile.mk +++ /dev/null @@ -1,78 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=frmdlg -LIBTARGET=no - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - column.src \ - cption.src \ - frmpage.src \ - frmui.src \ - wrap.src - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - $(SLO)$/colmgr.obj - -EXCEPTIONSFILES = \ - $(SLO)$/colex.obj \ - $(SLO)$/column.obj \ - $(SLO)$/cption.obj \ - $(SLO)$/frmdlg.obj \ - $(SLO)$/frmmgr.obj \ - $(SLO)$/frmpage.obj \ - $(SLO)$/pattern.obj \ - $(SLO)$/uiborder.obj \ - $(SLO)$/wrap.obj - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/colmgr.obj \ - $(SLO)$/colex.obj \ - $(SLO)$/frmmgr.obj - - - - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/frmdlg/wrap.src b/sw/source/ui/frmdlg/wrap.src index 1b2db4f640..3c8bc04d88 100644 --- a/sw/source/ui/frmdlg/wrap.src +++ b/sw/source/ui/frmdlg/wrap.src @@ -44,6 +44,7 @@ TabPage TP_FRM_WRAP }; ImageRadioButton RB_NO_WRAP { + HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_NO_WRAP"; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 40 , 37 ) ; WordBreak = TRUE; @@ -52,6 +53,7 @@ TabPage TP_FRM_WRAP }; ImageRadioButton RB_WRAP_LEFT { + HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_WRAP_LEFT"; Pos = MAP_APPFONT ( 65 , 14 ) ; Size = MAP_APPFONT ( 40 , 37 ) ; WordBreak = TRUE; @@ -60,6 +62,7 @@ TabPage TP_FRM_WRAP }; ImageRadioButton RB_WRAP_RIGHT { + HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_WRAP_RIGHT"; Pos = MAP_APPFONT ( 121 , 14 ) ; Size = MAP_APPFONT ( 40 , 37 ) ; WordBreak = TRUE; @@ -68,6 +71,7 @@ TabPage TP_FRM_WRAP }; ImageRadioButton RB_WRAP_PARALLEL { + HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_WRAP_PARALLEL"; Pos = MAP_APPFONT ( 177 , 14 ) ; Size = MAP_APPFONT ( 40 , 37 ) ; WordBreak = TRUE; @@ -76,6 +80,7 @@ TabPage TP_FRM_WRAP }; ImageRadioButton RB_WRAP_THROUGH { + HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_WRAP_THROUGH"; Pos = MAP_APPFONT ( 6 , 57 ) ; Size = MAP_APPFONT ( 40 , 37 ) ; WordBreak = TRUE; @@ -84,6 +89,7 @@ TabPage TP_FRM_WRAP }; ImageRadioButton RB_WRAP_IDEAL { + HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_WRAP_IDEAL"; Pos = MAP_APPFONT ( 65 , 57 ) ; Size = MAP_APPFONT ( 40 , 37 ) ; WordBreak = TRUE; @@ -93,18 +99,21 @@ TabPage TP_FRM_WRAP CheckBox CB_ANCHOR_ONLY { + HelpID = "sw:CheckBox:TP_FRM_WRAP:CB_ANCHOR_ONLY"; Pos = MAP_APPFONT ( 139 , 111 ) ; Size = MAP_APPFONT ( 109 , 10 ) ; Text [ en-US ] = "~First paragraph" ; }; CheckBox CB_TRANSPARENT { + HelpID = "sw:CheckBox:TP_FRM_WRAP:CB_TRANSPARENT"; Pos = MAP_APPFONT ( 139 , 125 ) ; Size = MAP_APPFONT ( 109 , 10 ) ; Text [ en-US ] = "In bac~kground" ; }; CheckBox CB_OUTLINE { + HelpID = "sw:CheckBox:TP_FRM_WRAP:CB_OUTLINE"; Pos = MAP_APPFONT ( 139 , 139 ) ; Size = MAP_APPFONT ( 109 , 10 ) ; Hide = TRUE ; @@ -112,6 +121,7 @@ TabPage TP_FRM_WRAP }; CheckBox CB_ONLYOUTSIDE { + HelpID = "sw:CheckBox:TP_FRM_WRAP:CB_ONLYOUTSIDE"; Pos = MAP_APPFONT ( 139 , 153 ) ; Size = MAP_APPFONT ( 109 , 10 ) ; Hide = TRUE ; @@ -138,6 +148,7 @@ TabPage TP_FRM_WRAP }; MetricField ED_LEFT_MARGIN { + HelpID = "sw:MetricField:TP_FRM_WRAP:ED_LEFT_MARGIN"; Border = TRUE ; Pos = MAP_APPFONT ( 81 , 111 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -160,6 +171,7 @@ TabPage TP_FRM_WRAP }; MetricField ED_RIGHT_MARGIN { + HelpID = "sw:MetricField:TP_FRM_WRAP:ED_RIGHT_MARGIN"; Border = TRUE ; Pos = MAP_APPFONT ( 81 , 127 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -182,6 +194,7 @@ TabPage TP_FRM_WRAP }; MetricField ED_TOP_MARGIN { + HelpID = "sw:MetricField:TP_FRM_WRAP:ED_TOP_MARGIN"; Border = TRUE ; Pos = MAP_APPFONT ( 81 , 143 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -204,6 +217,7 @@ TabPage TP_FRM_WRAP }; MetricField ED_BOTTOM_MARGIN { + HelpID = "sw:MetricField:TP_FRM_WRAP:ED_BOTTOM_MARGIN"; Border = TRUE ; Pos = MAP_APPFONT ( 81 , 159 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; diff --git a/sw/source/ui/globdoc/makefile.mk b/sw/source/ui/globdoc/makefile.mk deleted file mode 100644 index f3563b819d..0000000000 --- a/sw/source/ui/globdoc/makefile.mk +++ /dev/null @@ -1,54 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=globdoc - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - globdoc.src - -SLOFILES = \ - $(EXCEPTIONSFILES) - -EXCEPTIONSFILES = \ - $(SLO)$/globdoc.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/inc/SidebarWindowsConsts.hxx b/sw/source/ui/inc/SidebarWindowsConsts.hxx index 5df62bdee1..f4dba22edf 100644 --- a/sw/source/ui/inc/SidebarWindowsConsts.hxx +++ b/sw/source/ui/inc/SidebarWindowsConsts.hxx @@ -3,7 +3,7 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * diff --git a/sw/source/ui/inc/column.hxx b/sw/source/ui/inc/column.hxx index 7f5cb000b1..e223cb65a9 100644 --- a/sw/source/ui/inc/column.hxx +++ b/sw/source/ui/inc/column.hxx @@ -37,7 +37,7 @@ #include <vcl/lstbox.hxx> #include <vcl/button.hxx> #include <vcl/timer.hxx> -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #include <svtools/ctrlbox.hxx> #include <svtools/valueset.hxx> #include <sfx2/basedlgs.hxx> diff --git a/sw/source/ui/inc/envlop.hxx b/sw/source/ui/inc/envlop.hxx index 62b3df48e9..be8908771c 100644 --- a/sw/source/ui/inc/envlop.hxx +++ b/sw/source/ui/inc/envlop.hxx @@ -37,7 +37,7 @@ #include <vcl/lstbox.hxx> -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #include "envimg.hxx" diff --git a/sw/source/ui/inc/fldedt.hxx b/sw/source/ui/inc/fldedt.hxx index 7a32185a70..7b21b0b76c 100644 --- a/sw/source/ui/inc/fldedt.hxx +++ b/sw/source/ui/inc/fldedt.hxx @@ -28,7 +28,7 @@ #ifndef _FLDEDT_HXX #define _FLDEDT_HXX #include <sfx2/basedlgs.hxx> -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> class SwView; class SwWrtShell; diff --git a/sw/source/ui/inc/frmdlg.hxx b/sw/source/ui/inc/frmdlg.hxx index a94d961719..fcfc3a9649 100644 --- a/sw/source/ui/inc/frmdlg.hxx +++ b/sw/source/ui/inc/frmdlg.hxx @@ -41,6 +41,7 @@ class SwFrmDlg : public SfxTabDialog BOOL m_bFormat; BOOL m_bNew; BOOL m_bHTMLMode; + bool m_bEnableVertPos; const SfxItemSet& m_rSet; USHORT m_nDlgType; SwWrtShell* m_pWrtShell; diff --git a/sw/source/ui/inc/frmpage.hxx b/sw/source/ui/inc/frmpage.hxx index dea90b5cbb..cf10eea77a 100644 --- a/sw/source/ui/inc/frmpage.hxx +++ b/sw/source/ui/inc/frmpage.hxx @@ -131,6 +131,10 @@ class SwFrmPage: public SfxTabPage FrmMap* pVMap; FrmMap* pHMap; + bool m_bAllowVertPositioning; + bool m_bIsMathOLE; + bool m_bIsMathBaselineAlignment; + virtual void ActivatePage(const SfxItemSet& rSet); virtual int DeactivatePage(SfxItemSet *pSet); @@ -194,6 +198,7 @@ public: void SetFormatUsed(BOOL bFmt); void SetFrmType(USHORT nType) { nDlgType = nType; } inline BOOL IsInGraficMode( void ) { return nDlgType == DLG_FRM_GRF || nDlgType == DLG_FRM_OLE; } + void EnableVerticalPositioning( bool bEnable ); }; class SwGrfExtPage: public SfxTabPage diff --git a/sw/source/ui/inc/javaedit.hxx b/sw/source/ui/inc/javaedit.hxx index b931de0460..a20c4dcc0a 100644 --- a/sw/source/ui/inc/javaedit.hxx +++ b/sw/source/ui/inc/javaedit.hxx @@ -38,7 +38,7 @@ #include <vcl/button.hxx> -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> class SwWrtShell; class SwFldMgr; diff --git a/sw/source/ui/inc/makefile.mk b/sw/source/ui/inc/makefile.mk deleted file mode 100644 index cb9b968dcc..0000000000 --- a/sw/source/ui/inc/makefile.mk +++ /dev/null @@ -1,42 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=uiinc - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -LOCALIZE_ME=swmn_tmpl.hrc toolbox_tmpl.hrc - -.INCLUDE : target.mk - diff --git a/sw/source/ui/inc/optpage.hxx b/sw/source/ui/inc/optpage.hxx index 2fcf9b3a75..786b253f7c 100644 --- a/sw/source/ui/inc/optpage.hxx +++ b/sw/source/ui/inc/optpage.hxx @@ -331,6 +331,12 @@ class SwShdwCrsrOptionsTabPage : public SfxTabPage FixedLine aCrsrOptFL; CheckBox aCrsrInProtCB; + FixedLine m_aLayoutOptionsFL; + CheckBox m_aMathBaselineAlignmentCB; + + SwWrtShell * m_pWrtShell; + + SwShdwCrsrOptionsTabPage( Window* pParent, const SfxItemSet& rSet ); ~SwShdwCrsrOptionsTabPage(); @@ -340,6 +346,9 @@ public: virtual BOOL FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); + + void SetWrtShell( SwWrtShell * pSh ) { m_pWrtShell = pSh; } + virtual void PageCreated( SfxAllItemSet aSet ); }; /*----------------------------------------------------------------------- @@ -475,5 +484,4 @@ private: #endif //PRODUCT #endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/sw/source/ui/inc/pview.hxx b/sw/source/ui/inc/pview.hxx index 3350689bbb..24da2d8a4e 100644 --- a/sw/source/ui/inc/pview.hxx +++ b/sw/source/ui/inc/pview.hxx @@ -222,7 +222,6 @@ class SW_DLLPUBLIC SwPagePreView: public SfxViewShell SW_DLLPRIVATE virtual USHORT SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ); SW_DLLPRIVATE virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions ); - SW_DLLPRIVATE virtual PrintDialog* CreatePrintDialog( Window *pParent ); SW_DLLPRIVATE void CalcAndSetBorderPixel( SvBorder &rToFill, BOOL bInner ); diff --git a/sw/source/ui/inc/regionsw.hxx b/sw/source/ui/inc/regionsw.hxx index 68ec42f0aa..a64942d3c3 100644 --- a/sw/source/ui/inc/regionsw.hxx +++ b/sw/source/ui/inc/regionsw.hxx @@ -65,6 +65,7 @@ namespace sfx2 Dialog "Bereiche bearbeiten" *************************************************************************/ class SectRepr; +class SectRepr; typedef SectRepr* SectReprPtr; SV_DECL_PTRARR_SORT( SectReprArr, SectReprPtr, 0, 4 ) diff --git a/sw/source/ui/inc/ribbar.hrc b/sw/source/ui/inc/ribbar.hrc index 892261512a..301acb1ddc 100644 --- a/sw/source/ui/inc/ribbar.hrc +++ b/sw/source/ui/inc/ribbar.hrc @@ -69,10 +69,7 @@ #define MN_CALC_POPUP (RC_RIBBAR_BEGIN + 22) #define MN_NUMNAMES_POPUP (RC_RIBBAR_BEGIN + 23) -#define RID_INSERT_CTRL (RC_RIBBAR_BEGIN + 24) -#define RID_INSERT_OBJ_CTRL (RC_RIBBAR_BEGIN + 25) #define RID_INSERT_FIELD_CTRL (RC_RIBBAR_BEGIN + 26) -#define RID_TBL_OPT_CTRL (RC_RIBBAR_BEGIN + 27) #define RID_BEZIER_WIN (RC_RIBBAR_BEGIN + 28) #define RID_SCROLL_NAVI_TBX (RC_RIBBAR_BEGIN + 29) #define RID_SCROLL_NAVIGATION_WIN (RC_RIBBAR_BEGIN + 30) diff --git a/sw/source/ui/inc/split.hxx b/sw/source/ui/inc/split.hxx index 661c063abd..0bc24931c2 100644 --- a/sw/source/ui/inc/split.hxx +++ b/sw/source/ui/inc/split.hxx @@ -34,7 +34,7 @@ #include <vcl/field.hxx> -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #include <vcl/button.hxx> diff --git a/sw/source/ui/inc/swdtflvr.hxx b/sw/source/ui/inc/swdtflvr.hxx index 9776574d34..bc8a89a82f 100644 --- a/sw/source/ui/inc/swdtflvr.hxx +++ b/sw/source/ui/inc/swdtflvr.hxx @@ -66,7 +66,7 @@ namespace nsTransferBufferType class SwTransferable : public TransferableHelper { friend class SwView_Impl; - SfxObjectShellRef aDocShellRef; + SfxObjectShellLock aDocShellRef; TransferableDataHelper aOleData; TransferableObjectDescriptor aObjDesc; ::sfx2::SvBaseLinkRef refDdeLink; diff --git a/sw/source/ui/inc/swlbox.hxx b/sw/source/ui/inc/swlbox.hxx index 678eaf09e8..0643481433 100644 --- a/sw/source/ui/inc/swlbox.hxx +++ b/sw/source/ui/inc/swlbox.hxx @@ -72,11 +72,7 @@ namespace nsSwComboBoxStyle const SwComboBoxStyle CBS_LOWER = 0x02; const SwComboBoxStyle CBS_ALL = 0x04; const SwComboBoxStyle CBS_FILENAME = 0x08; -#ifdef WIN - const SwComboBoxStyle CBS_SW_FILENAME = CBS_FILENAME | CBS_LOWER; -#else const SwComboBoxStyle CBS_SW_FILENAME = CBS_FILENAME; -#endif } class SW_DLLPUBLIC SwComboBox : public ComboBox diff --git a/sw/source/ui/inc/swmn_tmpl.hrc b/sw/source/ui/inc/swmn_tmpl.hrc deleted file mode 100644 index 697617aeb4..0000000000 --- a/sw/source/ui/inc/swmn_tmpl.hrc +++ /dev/null @@ -1,386 +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 _SWMN_HRC -#define _SWMN_HRC - -#include <svx/dialogs.hrc> -#include <svx/globlmn.hrc> -#include "cmdid.h" -#include "app.hrc" -#include "globals.hrc" -#include "helpid.h" -#include "popup.hrc" - -/* --------------------- F O R M A T --------------------------------- */ - -#define SEPARATOR MenuItem { Separator = TRUE; } - -//define for ITEM_FORMAT_NUMBERING -#define DEFINE_SLOTID_FOR_NUMBER_BULLETS FN_NUMBER_BULLETS -#define MN_NUMBERING ITEM_FORMAT_NUMBERING - -#define MN_TXT\ - MenuItem\ - {\ - ITEM_FORMAT_CHAR_DLG\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_PARA_DLG\ - };\ - MenuItem\ - {\ - Identifier = FN_FORMAT_PAGE_DLG ; \ - HelpID = FN_FORMAT_PAGE_DLG ; \ - Text [ en-US ] = "Pa~ge..." ; \ - };\ - MenuItem\ - {\ - Identifier = FN_FORMAT_TITLEPAGE_DLG ; \ - HelpID = FN_FORMAT_TITLEPAGE_DLG ; \ - Text [ en-US ] = "~Title Page..." ; \ - }; - -#define MN_TEXT_ATTR\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_FONT\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_FONTHEIGHT\ - };\ - MenuItem\ - {\ - Identifier = MN_FORMAT_STYLE ; \ - HelpID = MN_FORMAT_STYLE ; \ - Command = ".uno:StyleMenu" ; \ - Text [ en-US ] = "St~yle" ; \ - SubMenu = Menu\ - {\ - ItemList = \ - {\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_WEIGHT\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_POSTURE\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_OVERLINE\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_UNDERLINE\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_STRIKEOUT\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_SHADOWED\ - };\ - MenuItem\ - {\ - ITEM_FORMAT_ATTR_CHAR_CONTOUR\ - };\ - SEPARATOR ; \ - MenuItem\ - {\ - Identifier = FN_SET_SUPER_SCRIPT ; \ - HelpID = FN_SET_SUPER_SCRIPT ; \ - Text [ en-US ] = "Superscript" ; \ - };\ - MenuItem\ - {\ - Identifier = FN_SET_SUB_SCRIPT ; \ - HelpID = FN_SET_SUB_SCRIPT ; \ - Text [ en-US ] = "Subscript" ; \ - };\ - };\ - };\ - };\ - MenuItem\ - {\ - Identifier = MN_FORMAT_ALGN ; \ - HelpID = MN_FORMAT_ALGN ; \ - Command = ".uno:AlignTextMenu" ; \ - Text [ en-US ] = "A~lignment" ; \ - SubMenu = Menu\ - {\ - ItemList = \ - {\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_ATTR_PARA_ADJUST_LEFT\ - };\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_ATTR_PARA_ADJUST_RIGHT\ - };\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_ATTR_PARA_ADJUST_CENTER\ - };\ - MenuItem\ - {\ - Identifier = SID_ATTR_PARA_ADJUST_BLOCK ; \ - HelpID = SID_ATTR_PARA_ADJUST_BLOCK ; \ - RadioCheck = TRUE ; \ - Text [ en-US ] = "Justified" ; \ - };\ - };\ - };\ - };\ - MenuItem\ - {\ - Identifier = MN_FORMAT_LINESPACE ; \ - HelpID = MN_FORMAT_LINESPACE ; \ - Command = ".uno:LineSpacingMenu" ; \ - Text [ en-US ] = "Line Spacing" ; \ - _MenuItemFlags = MIB_RADIOCHECK ; \ - SubMenu = Menu\ - {\ - ItemList = \ - {\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_PARA_LINESPACE_10\ - };\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_PARA_LINESPACE_15\ - };\ - MenuItem\ - {\ - RadioCheck = TRUE ; \ - ITEM_FORMAT_PARA_LINESPACE_20\ - };\ - };\ - };\ - }; - -/* --------------------- M E N U --------------------------------- */ - -/* - - -The application menu bar resource has become obsolete. You can now find the menu bar at the following -location: <project>/uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml - - -*/ - -/* --------------------- D O C U M E N T -------------------------- */ - - -#define _MN_EDIT_FIELD \ - MenuItem \ - { \ - Identifier = FN_EDIT_FIELD ; \ - HelpID = FN_EDIT_FIELD ; \ - Text [ en-US ] = "Fields..." ; \ - }; -#define _MN_EDIT_FOOTNOTE \ - MenuItem \ - { \ - Identifier = FN_EDIT_FOOTNOTE ; \ - HelpID = FN_EDIT_FOOTNOTE ; \ - Text [ en-US ] = "Footnote/Endnote~..." ; \ - }; - #define _MN_EDIT_IDX_ENTRY_DLG \ - MenuItem \ - { \ - Identifier = FN_EDIT_IDX_ENTRY_DLG ; \ - HelpID = FN_EDIT_IDX_ENTRY_DLG ; \ - Text [ en-US ] = "Inde~x Entry..." ; \ - }; - -#define _MN_EDIT_REDLINE \ - MenuItem \ - { \ - Identifier = FN_REDLINE_ACCEPT_DIRECT; \ - HelpID = FN_REDLINE_ACCEPT_DIRECT ; \ - Text [ en-US ] = "Accept Change" ; \ - };\ - MenuItem \ - { \ - Identifier = FN_REDLINE_REJECT_DIRECT ; \ - HelpID = FN_REDLINE_REJECT_DIRECT ; \ - Text [ en-US ] = "Reject Change" ; \ - }; \ - SEPARATOR ; -#define _MN_EDIT_BIB_ENTRY_DLG \ - MenuItem \ - { \ - Identifier = FN_EDIT_AUTH_ENTRY_DLG ; \ - HelpID = FN_EDIT_AUTH_ENTRY_DLG ; \ - Text [ en-US ] = "~Bibliography Entry..."; \ - }; \ - SEPARATOR ; - -#define _MN_EDIT_OPEN_HYPERLINK \ - MenuItem \ - { \ - ITEM_OPEN_HYPERLINK \ - };\ - MenuItem \ - { \ - Identifier = FN_EDIT_HYPERLINK ; \ - HelpID = FN_EDIT_HYPERLINK ; \ - Text [ en-US ] = "Edit Hyperlink..."; \ - }; \ - MenuItem \ - { \ - Identifier = FN_COPY_HYPERLINK_LOCATION; \ - HelpID = FN_COPY_HYPERLINK_LOCATION; \ - Text [ en-US ] = "Copy Hyperlink ~Location"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_REMOVE_HYPERLINK ; \ - HelpID = FN_REMOVE_HYPERLINK ; \ - Text [ en-US ] = "Remo~ve Hyperlink"; \ - }; - -#define _MN_EDIT_OPEN_SMARTTAGMENU \ - MenuItem \ - { \ - ITEM_OPEN_SMARTTAGMENU \ - }; - -#define _MN_EDIT__HYPERLINK \ - MenuItem\ - {\ - Identifier = FN_EDIT_HYPERLINK ; \ - HelpID = FN_EDIT_HYPERLINK ; \ - Text [ en-US ] = "~Edit Hyperlink" ; \ - }; - -#define _DEFAULT_TEXT_EDIT_ELEMENTS \ - _MN_EDIT_FIELD \ - _MN_EDIT_FOOTNOTE \ - _MN_EDIT_IDX_ENTRY_DLG \ - _MN_EDIT_BIB_ENTRY_DLG \ - _MN_EDIT_REDLINE \ - MenuItem \ - { \ - ITEM_POPUP_TEMPLATE_EDIT \ - }; \ - SEPARATOR ; \ - _MN_EDIT_OPEN_HYPERLINK \ - _MN_EDIT_OPEN_SMARTTAGMENU - - -#define MN_RESET\ - MenuItem\ - {\ - Identifier = FN_FORMAT_RESET ; \ - HelpID = FN_FORMAT_RESET ; \ - Text [ en-US ] = "~Default Formatting" ; \ - }; - -#define _NUMBERING_RELATED_MENU \ - SEPARATOR ; \ - MenuItem \ - { \ - Identifier = FN_NUMBER_NEWSTART; \ - HelpId = FN_NUMBER_NEWSTART; \ - Text[ en-US ] = "Restart Numbering"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_NUM_CONTINUE; \ - HelpId = FN_NUM_CONTINUE; \ - Text[ en-US ] = "Continue previous numbering"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_NUM_BULLET_UP; \ - HelpId = FN_NUM_BULLET_UP; \ - Text[ en-US ] = "Up One Level"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_NUM_BULLET_DOWN; \ - HelpId = FN_NUM_BULLET_DOWN; \ - Text[ en-US ] = "Down One Level"; \ - }; - -#define BASE_TEXT_POPUPMENU_BEGIN \ -{ \ - ItemList = \ - { \ - MN_RESET \ - _NUMBERING_RELATED_MENU \ - SEPARATOR ; \ - MN_TEXT_ATTR \ - SEPARATOR ; \ - MN_TXT \ - MN_NUMBERING \ - ITEM_TRANSLITERATE_MENU \ - SEPARATOR ; - -// not in Writer/Web -#define BASE_TEXT_POPUPMENU_NOWEB \ - MenuItem \ - { \ - Identifier = FN_UPDATE_CUR_TOX ; \ - HelpID = FN_UPDATE_CUR_TOX ; \ - Text [ en-US ] = "~Update Index/Table"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_EDIT_CURRENT_TOX; \ - HelpID = FN_EDIT_CURRENT_TOX; \ - Text [ en-US ] = "~Edit Index/Table"; \ - }; \ - MenuItem \ - { \ - Identifier = FN_REMOVE_CUR_TOX; \ - HelpID = FN_REMOVE_CUR_TOX; \ - Text [ en-US ] = "Delete Index/Table"; \ - }; \ - SEPARATOR ; - -#define BASE_TEXT_POPUPMENU_END \ - _DEFAULT_TEXT_EDIT_ELEMENTS \ - }; \ -}; - -#endif - diff --git a/sw/source/ui/inc/swuicnttab.hxx b/sw/source/ui/inc/swuicnttab.hxx index dd9756234e..087f8b5e87 100644 --- a/sw/source/ui/inc/swuicnttab.hxx +++ b/sw/source/ui/inc/swuicnttab.hxx @@ -154,6 +154,8 @@ class SwTOXSelectTabPage : public SfxTabPage CheckBox aFromHeadingsCB; CheckBox aAddStylesCB; PushButton aAddStylesPB; + Point aAddStylesPosDef; + Point aAddStylesPosUser; //user CheckBox aFromTablesCB; CheckBox aFromFramesCB; diff --git a/sw/source/ui/inc/swuiidxmrk.hxx b/sw/source/ui/inc/swuiidxmrk.hxx index e4a179612f..599a6b8315 100644 --- a/sw/source/ui/inc/swuiidxmrk.hxx +++ b/sw/source/ui/inc/swuiidxmrk.hxx @@ -42,7 +42,7 @@ #include <vcl/button.hxx> -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #include <sfx2/childwin.hxx> #include "toxe.hxx" #include <svtools/stdctrl.hxx> diff --git a/sw/source/ui/inc/toolbox_tmpl.hrc b/sw/source/ui/inc/toolbox.hrc index 8c73a70c60..8c73a70c60 100644 --- a/sw/source/ui/inc/toolbox_tmpl.hrc +++ b/sw/source/ui/inc/toolbox.hrc diff --git a/sw/source/ui/inc/uitool.hxx b/sw/source/ui/inc/uitool.hxx index ef4d99c412..a9415f5b08 100644 --- a/sw/source/ui/inc/uitool.hxx +++ b/sw/source/ui/inc/uitool.hxx @@ -28,7 +28,7 @@ #ifndef _UITOOL_HXX #define _UITOOL_HXX -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> #include <vcl/field.hxx> #include <swtypes.hxx> #include "swdllapi.h" diff --git a/sw/source/ui/inc/uivwimp.hxx b/sw/source/ui/inc/uivwimp.hxx index e8941ab6c0..44031bcdd9 100644 --- a/sw/source/ui/inc/uivwimp.hxx +++ b/sw/source/ui/inc/uivwimp.hxx @@ -105,8 +105,7 @@ class SwView_Impl // temporary document for printing text of selection / multi selection // in PDF export. - SfxObjectShellRef xTmpSelDocSh; - SfxObjectShellRef aEmbeddedObjRef; + SfxObjectShellLock xTmpSelDocSh; SwView* pView; SwScannerEventListener* pScanEvtLstnr; @@ -142,9 +141,7 @@ public: void AddClipboardListener(); - SfxObjectShellRef & GetTmpSelectionDoc() { return xTmpSelDocSh; } - - SfxObjectShellRef& GetEmbeddedObjRef() { return *boost::addressof(aEmbeddedObjRef); } + SfxObjectShellLock& GetTmpSelectionDoc() { return xTmpSelDocSh; } void AddTransferable(SwTransferable& rTransferable); diff --git a/sw/source/ui/inc/unotxvw.hxx b/sw/source/ui/inc/unotxvw.hxx index 9a205d08cd..f60332ba5c 100644 --- a/sw/source/ui/inc/unotxvw.hxx +++ b/sw/source/ui/inc/unotxvw.hxx @@ -154,7 +154,7 @@ public: void Invalidate(); // temporary document used for PDF export of selections/multi-selections - SfxObjectShellRef BuildTmpSelectionDoc( SfxObjectShellRef& ); + SfxObjectShellLock BuildTmpSelectionDoc(); }; typedef cppu::WeakImplHelper8< diff --git a/sw/source/ui/inc/usrpref.hxx b/sw/source/ui/inc/usrpref.hxx index db607c05b4..1d9e587bc0 100644 --- a/sw/source/ui/inc/usrpref.hxx +++ b/sw/source/ui/inc/usrpref.hxx @@ -33,7 +33,7 @@ #include <unotools/configitem.hxx> #include <fldupde.hxx> #include "viewopt.hxx" -#include <vcl/fldunit.hxx> +#include <tools/fldunit.hxx> class SwMasterUsrPref; @@ -136,6 +136,8 @@ class SwMasterUsrPref : public SwViewOption sal_Int32 nDefTab; //default tab stop distance sal_Bool bIsSquaredPageMode; //default page mode for text grid + sal_Bool bIsAlignMathObjectsToBaseline; + SwContentViewConfig aContentConfig; SwLayoutViewConfig aLayoutConfig; SwGridConfig aGridConfig; @@ -272,6 +274,13 @@ public: aLayoutConfig.SetModified(); } + sal_Bool IsAlignMathObjectsToBaseline() const { return bIsAlignMathObjectsToBaseline; } + void SetAlignMathObjectsToBaseline( sal_Bool bVal, sal_Bool bNoModify = sal_False ) + { + bIsAlignMathObjectsToBaseline = bVal; + if(!bNoModify) + aLayoutConfig.SetModified(); + } }; #endif diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index a1ff8917a2..05ab239a82 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -33,7 +33,7 @@ #include <svtools/htmlcfg.hxx> #include <sfx2/viewfac.hxx> #include <sfx2/viewsh.hxx> -#include <sfx2/objsh.hxx> // SfxObjectShellRef <-> SV_DECL_REF(SfxObjectShell) +#include <sfx2/objsh.hxx> #include <editeng/svxenum.hxx> #include <svx/zoomitem.hxx> #include <editeng/editstat.hxx> @@ -58,7 +58,6 @@ class SvxRuler; class SvxLRSpaceItem; class SwDocShell; class SwScrollbar; -class PrintDialog; class SvxVCBrowser; class SvBorder; class Ruler; @@ -84,7 +83,6 @@ class CommandEvent; class InsCaptionOpt; class SvGlobalName; class SvtAccessibilityOptions; -class SwPrtOptions; class SwTransferable; class SwMailMergeConfigItem; class SwTxtNode; // #i23726# @@ -356,7 +354,6 @@ class SW_DLLPUBLIC SwView: public SfxViewShell // Methoden fuers Printing SW_DLLPRIVATE virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE ); - SW_DLLPRIVATE virtual PrintDialog* CreatePrintDialog( Window* pParent ); SfxTabPage* CreatePrintOptionsPage( Window* pParent, const SfxItemSet& rSet); // fuer Readonly-Umschaltung @@ -452,7 +449,7 @@ public: inline SwEditWin &GetEditWin() { return *pEditWin; } inline const SwEditWin &GetEditWin () const { return *pEditWin; } -#if defined WIN || defined WNT || defined UNX +#if defined WNT || defined UNX void ScannerEventHdl( const ::com::sun::star::lang::EventObject& rEventObject ); #endif @@ -644,8 +641,8 @@ public: void NotifyDBChanged(); - SfxObjectShellRef & GetTmpSelectionDoc(); - SfxObjectShellRef & GetOrCreateTmpSelectionDoc(); + SfxObjectShellLock & GetTmpSelectionDoc(); + SfxObjectShellLock & GetOrCreateTmpSelectionDoc(); void AddTransferable(SwTransferable& rTransferable); diff --git a/sw/source/ui/inc/workctrl.hxx b/sw/source/ui/inc/workctrl.hxx index 86cab39940..64205f844a 100644 --- a/sw/source/ui/inc/workctrl.hxx +++ b/sw/source/ui/inc/workctrl.hxx @@ -31,7 +31,7 @@ #include <sfx2/tbxctrl.hxx> #include <vcl/toolbox.hxx> #include <svtools/stdctrl.hxx> -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> class PopupMenu; class SwView; diff --git a/sw/source/ui/inc/wrap.hxx b/sw/source/ui/inc/wrap.hxx index ce0172e553..e7cb375c57 100644 --- a/sw/source/ui/inc/wrap.hxx +++ b/sw/source/ui/inc/wrap.hxx @@ -31,7 +31,7 @@ #include <sfx2/tabdlg.hxx> #include <sfx2/basedlgs.hxx> -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #include <vcl/button.hxx> diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 3e3e5d1b40..70d4aef6c6 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -2,7 +2,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 @@ -750,7 +750,7 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(Window* pParent, rHB.Show(); SwIndexTreeLB& rTLB = aHeaderTree.GetTreeListBox(); - rTLB.SetWindowBits(WB_CLIPCHILDREN|WB_SORT); + rTLB.SetStyle(rTLB.GetStyle()|WB_CLIPCHILDREN|WB_SORT); rTLB.GetModel()->SetSortMode(SortAscending); for(i = 0; i < MAXLEVEL; ++i) { @@ -1395,7 +1395,19 @@ IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, ListBox*, pBox) aSortAlgorithmFT.Show(bEnableSortLanguage); aSortAlgorithmLB.Show(bEnableSortLanguage); - if( nType & TO_ILLUSTRATION ) //add by zhaojianwei + // initialize button positions + + //#i111993# add styles button has two different positions + if( !aAddStylesPosDef.X() ) + { + aAddStylesPosDef = ( aAddStylesPB.GetPosPixel() ); + // move left! + Point aPos(aAddStylesPosDef); + aPos.X() -= 2 * aAddStylesPB.GetSizePixel().Width(); + aAddStylesPosUser = aPos; + } + + if( nType & TO_ILLUSTRATION ) //add by zhaojianwei aCaptionSequenceLB.SelectEntry( SwStyleNameMapper::GetUIName( RES_POOLCOLL_LABEL_ABB, aEmptyStr )); else if( nType & TO_TABLE ) @@ -1404,10 +1416,11 @@ IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, ListBox*, pBox) else if( nType & TO_USER ) { aAddStylesCB.SetText(sAddStyleUser); - // move left! - Point aPos(aAddStylesPB.GetPosPixel()); - aPos.X() -= 2 * aAddStylesPB.GetSizePixel().Width(); - aAddStylesPB.SetPosPixel(aPos); + aAddStylesPB.SetPosPixel(aAddStylesPosUser); + } + else if( nType & TO_CONTENT ) + { + aAddStylesPB.SetPosPixel(aAddStylesPosDef); } aCollectSameCB.Show( 0 != (nType & TO_INDEX) ); @@ -1636,8 +1649,8 @@ void SwTOXEdit::KeyInput( const KeyEvent& rKEvt ) { const Selection& rSel = GetSelection(); sal_uInt16 nTextLen = GetText().Len(); - if((rSel.A() == rSel.B() && - !rSel.A()) || rSel.A() == nTextLen ) + if( (rSel.A() == rSel.B() && + !rSel.A() ) || rSel.A() == nTextLen ) { sal_Bool bCall = sal_False; KeyCode aCode = rKEvt.GetKeyCode(); @@ -1916,7 +1929,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet FreeResource(); sLevelStr = aLevelFT.GetText(); - aLevelLB.SetWindowBits( WB_HSCROLL ); + aLevelLB.SetStyle( aLevelLB.GetStyle() | WB_HSCROLL ); aLevelLB.SetSpaceBetweenEntries(0); aLevelLB.SetSelectionMode( SINGLE_SELECTION ); aLevelLB.SetHighlightRange(); // select full width @@ -3483,8 +3496,8 @@ IMPL_LINK(SwTokenWindow, EditResize, Edit*, pEdit) IMPL_LINK(SwTokenWindow, NextItemHdl, SwTOXEdit*, pEdit) { sal_uInt16 nPos = (sal_uInt16)aControlList.GetPos(pEdit); - if((nPos && !pEdit->IsNextControl()) || - (nPos < aControlList.Count() - 1 && pEdit->IsNextControl())) + if( (nPos && !pEdit->IsNextControl()) || + (nPos < aControlList.Count() - 1 && pEdit->IsNextControl())) { aControlList.Seek(nPos); Control* pNextPrev = pEdit->IsNextControl() ? aControlList.Next() : aControlList.Prev(); @@ -3515,8 +3528,8 @@ IMPL_LINK(SwTokenWindow, TbxFocusHdl, SwTOXEdit*, pEdit) IMPL_LINK(SwTokenWindow, NextItemBtnHdl, SwTOXButton*, pBtn ) { sal_uInt16 nPos = (sal_uInt16)aControlList.GetPos(pBtn); - if((nPos && !pBtn->IsNextControl()) || - (nPos < aControlList.Count() - 1 && pBtn->IsNextControl())) + if( (nPos && !pBtn->IsNextControl()) || + (nPos < aControlList.Count() - 1 && pBtn->IsNextControl())) { aControlList.Seek(nPos); sal_Bool bNext = pBtn->IsNextControl(); diff --git a/sw/source/ui/index/cnttab.src b/sw/source/ui/index/cnttab.src index 3972c33763..31735fce98 100644 --- a/sw/source/ui/index/cnttab.src +++ b/sw/source/ui/index/cnttab.src @@ -132,6 +132,7 @@ TabPage TP_TOX_SELECT }; Edit ED_TITLE { + HelpID = "sw:Edit:TP_TOX_SELECT:ED_TITLE"; Pos = MAP_APPFONT ( 45 , 14 ) ; Size = MAP_APPFONT ( 203 , 12 ) ; Border = TRUE; @@ -144,6 +145,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_TYPE { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_TYPE"; Pos = MAP_APPFONT ( 45 , 30 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -161,6 +163,7 @@ TabPage TP_TOX_SELECT }; CheckBox CB_READONLY { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_READONLY"; Pos = MAP_APPFONT ( 51 , 46 ) ; Size = MAP_APPFONT ( 200 , 10 ) ; Check = TRUE; @@ -180,6 +183,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_AREA { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_AREA"; Pos = MAP_APPFONT ( 45 , 70 ) ; Size = MAP_APPFONT ( 80 , 12 ) ; TabStop = TRUE ; @@ -198,6 +202,7 @@ TabPage TP_TOX_SELECT }; NumericField NF_LEVEL { + HelpID = "sw:NumericField:TP_TOX_SELECT:NF_LEVEL"; Pos = MAP_APPFONT ( 231 , 72 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; Border = TRUE ; @@ -218,6 +223,7 @@ TabPage TP_TOX_SELECT }; CheckBox CB_FROMHEADINGS { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMHEADINGS"; Pos = MAP_APPFONT ( 12 , 99 ) ; Size = MAP_APPFONT ( 95 , 10 ) ; Check = TRUE; @@ -234,6 +240,7 @@ TabPage TP_TOX_SELECT */ CheckBox CB_ADDSTYLES { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_ADDSTYLES"; Pos = MAP_APPFONT ( 12 , 115 ) ; Size = MAP_APPFONT ( 75 , 10 ) ; Text [ en-US ] = "~Additional Styles"; @@ -244,6 +251,7 @@ TabPage TP_TOX_SELECT }; PushButton PB_ADDSTYLES { + HelpID = "sw:PushButton:TP_TOX_SELECT:PB_ADDSTYLES"; Pos = MAP_APPFONT ( 115 , 114 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; Text = "..." ; @@ -251,6 +259,7 @@ TabPage TP_TOX_SELECT }; CheckBox CB_TOXMARKS { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_TOXMARKS"; Pos = MAP_APPFONT ( 12 , 131 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Text [ en-US ] = "Inde~x marks"; @@ -258,6 +267,7 @@ TabPage TP_TOX_SELECT RadioButton RB_FROMCAPTIONS { + HelpID = "sw:RadioButton:TP_TOX_SELECT:RB_FROMCAPTIONS"; Pos = MAP_APPFONT ( 12 , 98 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Text [ en-US ] = "Captions"; @@ -270,6 +280,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_CAPTIONSEQUENCE { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_CAPTIONSEQUENCE"; Pos = MAP_APPFONT ( 55 , 112 ) ; Size = MAP_APPFONT ( 70 , 40 ) ; DropDown = TRUE; @@ -283,6 +294,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_DISPLAYTYPE { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_DISPLAYTYPE"; Pos = MAP_APPFONT ( 55 , 128 ) ; Size = MAP_APPFONT ( 70 , 40 ) ; DropDown = TRUE; @@ -296,54 +308,63 @@ TabPage TP_TOX_SELECT }; RadioButton RB_FROMOBJECTNAMES { + HelpID = "sw:RadioButton:TP_TOX_SELECT:RB_FROMOBJECTNAMES"; Pos = MAP_APPFONT ( 156 , 98 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Text [ en-US ] = "Object names"; }; CheckBox CB_COLLECTSAME { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_COLLECTSAME"; Pos = MAP_APPFONT ( 12 , 98 ) ; Size = MAP_APPFONT ( 121 , 10 ) ; Text [ en-US ] = "Combine identical entries"; }; CheckBox CB_USEFF { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_USEFF"; Pos = MAP_APPFONT ( 18 , 111 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text [ en-US ] = "Combine identical entries with p or ~pp"; }; CheckBox CB_USE_DASH { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_USE_DASH"; Pos = MAP_APPFONT ( 18 , 124 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text [ en-US ] = "Combine with -"; }; CheckBox CB_CASESENSITIVE { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_CASESENSITIVE"; Pos = MAP_APPFONT ( 18 , 137 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text [ en-US ] = "Case sensitive"; }; CheckBox CB_INITIALCAPS { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_INITIALCAPS"; Pos = MAP_APPFONT ( 136 , 98 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text [ en-US ] = "AutoCapitalize entries"; }; CheckBox CB_KEYASENTRY { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_KEYASENTRY"; Pos = MAP_APPFONT ( 136, 111 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text [ en-US ] = "Keys as separate entries"; }; CheckBox CB_FROMFILE { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMFILE"; Pos = MAP_APPFONT ( 136 , 124 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text [ en-US ] = "~Concordance file"; }; MenuButton MB_AUTOMARK { + HelpID = "sw:MenuButton:TP_TOX_SELECT:MB_AUTOMARK"; Pos = MAP_APPFONT ( 136 , 137 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -372,30 +393,35 @@ TabPage TP_TOX_SELECT }; CheckBox CB_FROMTABLES { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMTABLES"; Pos = MAP_APPFONT ( 112 , 99 ) ; Size = MAP_APPFONT ( 68 , 10 ) ; Text [ en-US ] = "Tables"; }; CheckBox CB_FROMFRAMES { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMFRAMES"; Pos = MAP_APPFONT ( 182 , 99 ) ; Size = MAP_APPFONT ( 68 , 10 ) ; Text [ en-US ] = "Te~xt frames"; }; CheckBox CB_FROMGRAPHICS { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMGRAPHICS"; Pos = MAP_APPFONT ( 112 , 113 ) ; Size = MAP_APPFONT ( 68 , 10 ) ; Text [ en-US ] = "Graphics"; }; CheckBox CB_FROMOLE { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMOLE"; Pos = MAP_APPFONT ( 182 , 113 ) ; Size = MAP_APPFONT ( 68 , 10 ) ; Text [ en-US ] = "OLE objects"; }; CheckBox CB_LEVELFROMCHAPTER { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_LEVELFROMCHAPTER"; Pos = MAP_APPFONT ( 118 , 127 ) ; Size = MAP_APPFONT ( 103 , 10 ) ; Text [ en-US ] = "Use level from source chapter"; @@ -443,6 +469,7 @@ TabPage TP_TOX_SELECT }; CheckBox CB_SEQUENCE { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_SEQUENCE"; Pos = MAP_APPFONT ( 12, 70) ; Size = MAP_APPFONT ( 100, 10 ) ; Text [ en-US ] = "~Number entries"; @@ -455,6 +482,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_BRACKET { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_BRACKET"; Pos = MAP_APPFONT ( 75, 84) ; Size = MAP_APPFONT ( 40, 50 ) ; Border = TRUE; @@ -495,6 +523,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_LANGUAGE { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_LANGUAGE"; Pos = MAP_APPFONT ( 47, 164) ; Size = MAP_APPFONT ( 80, 50 ) ; Border = TRUE; @@ -508,6 +537,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_SORTALG { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_SORTALG"; Pos = MAP_APPFONT ( 201, 164) ; Size = MAP_APPFONT ( 50, 50 ) ; Border = TRUE; @@ -549,6 +579,7 @@ TabPage TP_TOX_ENTRY Size = MAP_APPFONT ( 136, 12 ) ; ImageButton WIN_LEFT_SCROLL { + HelpID = "sw:ImageButton:TP_TOX_ENTRY:WIN_LEFT_SCROLL"; Pos = MAP_APPFONT ( 0, 0 ) ; Size = MAP_APPFONT ( 10, 12 ) ; Symbol = IMAGEBUTTON_ARROW_LEFT; @@ -563,6 +594,7 @@ TabPage TP_TOX_ENTRY }; ImageButton WIN_RIGHT_SCROLL { + HelpID = "sw:ImageButton:TP_TOX_ENTRY:WIN_RIGHT_SCROLL"; Pos = MAP_APPFONT ( 126, 0 ) ; Size = MAP_APPFONT ( 10, 12 ) ; Symbol = IMAGEBUTTON_ARROW_RIGHT; @@ -649,48 +681,56 @@ TabPage TP_TOX_ENTRY }; PushButton PB_ALL_LEVELS { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_ALL_LEVELS"; Pos = MAP_APPFONT ( 209 , 14 ) ; Size = MAP_APPFONT ( 40, 14 ) ; Text [ en-US ] = "~All"; }; PushButton PB_ENTRYNO { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_ENTRYNO"; Pos = MAP_APPFONT ( 37 , 32 ) ; Size = MAP_APPFONT ( 40, 14 ) ; Text [ en-US ] = "Chapter no."; }; PushButton PB_ENTRY { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_ENTRY"; Pos = MAP_APPFONT ( 80, 32 ) ; Size = MAP_APPFONT ( 40, 14 ) ; Text [ en-US ] = "Entry text"; }; PushButton PB_CHAPTERINFO { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_CHAPTERINFO"; Pos = MAP_APPFONT ( 123 , 32 ) ; Size = MAP_APPFONT ( 40, 14) ; Text [ en-US ] = "~Chapter info"; }; PushButton PB_PAGENO { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_PAGENO"; Pos = MAP_APPFONT ( 166 , 32 ) ; Size = MAP_APPFONT ( 40, 14 ) ; Text [ en-US ] = "Page no."; }; PushButton PB_TAB { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_TAB"; Pos = MAP_APPFONT ( 209 ,32 ) ; Size = MAP_APPFONT ( 40, 14 ) ; Text [ en-US ] = "Tab stop"; }; PushButton PB_HYPERLINK { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_HYPERLINK"; Pos = MAP_APPFONT ( 209 , 32 ) ; Size = MAP_APPFONT ( 40, 14 ) ; Text [ en-US ] = "H~yperlink"; }; ListBox LB_AUTHFIELD { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_AUTHFIELD"; Pos = MAP_APPFONT ( 37 , 33 ) ; Size = MAP_APPFONT ( 59, 60 ) ; DropDown = TRUE; @@ -699,12 +739,14 @@ TabPage TP_TOX_ENTRY }; PushButton PB_AUTHINSERT { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_AUTHINSERT"; Pos = MAP_APPFONT ( 99 , 32 ) ; Size = MAP_APPFONT ( 39, 14 ) ; Text [ en-US ] = "~Insert"; }; PushButton PB_AUTHREMOVE { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_AUTHREMOVE"; Pos = MAP_APPFONT ( 142 , 32 ) ; Size = MAP_APPFONT ( 39, 14 ) ; Text [ en-US ] = "~Remove"; @@ -717,6 +759,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_CHARSTYLE { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_CHARSTYLE"; Pos = MAP_APPFONT ( 100 , 53 ) ; Size = MAP_APPFONT ( 93, 60 ) ; TabStop = TRUE ; @@ -724,6 +767,7 @@ TabPage TP_TOX_ENTRY }; PushButton PB_EDITSTYLE { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_EDITSTYLE"; Pos = MAP_APPFONT ( 199 , 52 ) ; Size = MAP_APPFONT ( 50, 14 ) ; Text [ en-US ] = "~Edit..."; @@ -736,6 +780,7 @@ TabPage TP_TOX_ENTRY }; ComboBox CB_FILLCHAR { + HelpID = "sw:ComboBox:TP_TOX_ENTRY:CB_FILLCHAR"; Pos = MAP_APPFONT ( 100 , 69 ) ; Size = MAP_APPFONT ( 40, 40 ) ; TabStop = TRUE ; @@ -749,6 +794,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_CHAPTERENTRY { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_CHAPTERENTRY"; Pos = MAP_APPFONT ( 100 , 69 ) ; Size = MAP_APPFONT ( 93, 40 ) ; TabStop = TRUE ; @@ -769,6 +815,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_ENTRY_NO { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_ENTRY_NO"; Pos = MAP_APPFONT ( 100 , 69 ) ; Size = MAP_APPFONT ( 93, 40 ) ; TabStop = TRUE ; @@ -788,6 +835,7 @@ TabPage TP_TOX_ENTRY }; NumericField NF_LEVEL_OL { + HelpID = "sw:NumericField:TP_TOX_ENTRY:NF_LEVEL_OL"; Pos = MAP_APPFONT ( 100 , 85 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; Border = TRUE ; @@ -809,6 +857,7 @@ TabPage TP_TOX_ENTRY }; MetricField MF_TABPOS { + HelpID = "sw:MetricField:TP_TOX_ENTRY:MF_TABPOS"; Pos = MAP_APPFONT ( 100 , 85 ) ; Size = MAP_APPFONT ( 40, 12 ) ; Border = TRUE ; @@ -827,6 +876,7 @@ TabPage TP_TOX_ENTRY }; CheckBox CB_AUTORIGHT { + HelpID = "sw:CheckBox:TP_TOX_ENTRY:CB_AUTORIGHT"; Pos = MAP_APPFONT ( 143 , 86 ) ; Size = MAP_APPFONT ( 100, 10 ) ; Text [ en-US ] = "Align right"; @@ -839,6 +889,7 @@ TabPage TP_TOX_ENTRY }; CheckBox CB_RELTOSTYLE { + HelpID = "sw:CheckBox:TP_TOX_ENTRY:CB_RELTOSTYLE"; Pos = MAP_APPFONT ( 37 , 110 ) ; Size = MAP_APPFONT ( 200, 10 ) ; Text [ en-US ] = "Tab position relati~ve to Paragraph Style indent"; @@ -851,6 +902,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_MAIN_ENTRY_STYLE { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_MAIN_ENTRY_STYLE"; Pos = MAP_APPFONT ( 157 , 110 ) ; Size = MAP_APPFONT ( 92, 80 ) ; TabStop = TRUE ; @@ -860,12 +912,14 @@ TabPage TP_TOX_ENTRY CheckBox CB_ALPHADELIM { + HelpID = "sw:CheckBox:TP_TOX_ENTRY:CB_ALPHADELIM"; Pos = MAP_APPFONT ( 37 , 126 ) ; Size = MAP_APPFONT ( 105, 10 ) ; Text [ en-US ] = "Alphabetical delimiter"; }; CheckBox CB_COMMASEPARATED { + HelpID = "sw:CheckBox:TP_TOX_ENTRY:CB_COMMASEPARATED"; Pos = MAP_APPFONT ( 37 , 140 ) ; Size = MAP_APPFONT ( 105, 10 ) ; Text [ en-US ] = "Key separated by commas"; @@ -878,12 +932,14 @@ TabPage TP_TOX_ENTRY }; RadioButton RB_DOCPOS { + HelpID = "sw:RadioButton:TP_TOX_ENTRY:RB_DOCPOS"; Pos = MAP_APPFONT ( 40 , 113) ; Size = MAP_APPFONT ( 94, 10 ) ; Text [ en-US ] = "Document ~position "; }; RadioButton RB_SORTCONTENT { + HelpID = "sw:RadioButton:TP_TOX_ENTRY:RB_SORTCONTENT"; Pos = MAP_APPFONT ( 136 , 113 ) ; Size = MAP_APPFONT ( 90, 10 ) ; Text [ en-US ] = "~Content"; @@ -902,6 +958,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_FIRSTKEY { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_FIRSTKEY"; Pos = MAP_APPFONT ( 60 , 138 ) ; Size = MAP_APPFONT ( 159, 50 ) ; Border = TRUE; @@ -909,6 +966,7 @@ TabPage TP_TOX_ENTRY }; ImageRadioButton RB_SORTUP1 { + HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTUP1"; Pos = MAP_APPFONT ( 222 , 138 ) ; Size = MAP_APPFONT ( 12, 12 ) ; RadioButtonImage = @@ -922,6 +980,7 @@ TabPage TP_TOX_ENTRY }; ImageRadioButton RB_SORTDOWN1 { + HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTDOWN1"; Pos = MAP_APPFONT ( 237 , 138 ) ; Size = MAP_APPFONT ( 12, 12 ) ; RadioButtonImage = @@ -934,6 +993,7 @@ TabPage TP_TOX_ENTRY }; ImageRadioButton RB_SORTUP2 { + HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTUP2"; Pos = MAP_APPFONT ( 222 , 153 ) ; Size = MAP_APPFONT ( 12, 12 ) ; RadioButtonImage = @@ -947,6 +1007,7 @@ TabPage TP_TOX_ENTRY }; ImageRadioButton RB_SORTDOWN2 { + HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTDOWN2"; Pos = MAP_APPFONT ( 237 , 153 ) ; Size = MAP_APPFONT ( 12, 12 ) ; RadioButtonImage = @@ -959,6 +1020,7 @@ TabPage TP_TOX_ENTRY }; ImageRadioButton RB_SORTUP3 { + HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTUP3"; Pos = MAP_APPFONT ( 222 , 168 ) ; Size = MAP_APPFONT ( 12, 12 ) ; RadioButtonImage = @@ -972,6 +1034,7 @@ TabPage TP_TOX_ENTRY }; ImageRadioButton RB_SORTDOWN3 { + HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTDOWN3"; Pos = MAP_APPFONT ( 237 ,168 ) ; Size = MAP_APPFONT ( 12, 12 ) ; RadioButtonImage = @@ -990,6 +1053,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_SECONDKEY { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_SECONDKEY"; Pos = MAP_APPFONT ( 60 , 153 ) ; Size = MAP_APPFONT ( 159, 50 ) ; Border = TRUE; @@ -1003,6 +1067,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_THIRDKEY { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_THIRDKEY"; Pos = MAP_APPFONT ( 60 , 168 ) ; Size = MAP_APPFONT ( 159, 50 ) ; Border = TRUE; @@ -1042,6 +1107,7 @@ TabPage TP_TOX_STYLES }; ListBox LB_LEVEL { + HelpID = "sw:ListBox:TP_TOX_STYLES:LB_LEVEL"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 25 ) ; Size = MAP_APPFONT ( 102 , 131 ) ; @@ -1057,6 +1123,7 @@ TabPage TP_TOX_STYLES }; ListBox LB_PARALAY { + HelpID = "sw:ListBox:TP_TOX_STYLES:LB_PARALAY"; Border = TRUE ; Pos = MAP_APPFONT ( 142 , 25 ) ; Size = MAP_APPFONT ( 101 , 131 ) ; @@ -1066,6 +1133,7 @@ TabPage TP_TOX_STYLES }; PushButton BT_STD { + HelpID = "sw:PushButton:TP_TOX_STYLES:BT_STD"; Pos = MAP_APPFONT ( 64 , 162 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -1073,6 +1141,7 @@ TabPage TP_TOX_STYLES }; ImageButton BT_ASSIGN { + HelpID = "sw:ImageButton:TP_TOX_STYLES:BT_ASSIGN"; Pos = MAP_APPFONT ( 118 , 28 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; TabStop = TRUE ; @@ -1087,6 +1156,7 @@ TabPage TP_TOX_STYLES }; PushButton BT_EDIT_STYLE { + HelpID = "sw:PushButton:TP_TOX_STYLES:BT_EDIT_STYLE"; Pos = MAP_APPFONT ( 193 , 162 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -1126,6 +1196,7 @@ ModalDialog DLG_ADD_IDX_STYLES }; ImageButton PB_LEFT { + HelpID = "sw:ImageButton:DLG_ADD_IDX_STYLES:PB_LEFT"; Pos = MAP_APPFONT ( 12 , 182 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; TabStop = TRUE ; @@ -1140,6 +1211,7 @@ ModalDialog DLG_ADD_IDX_STYLES }; ImageButton PB_RIGHT { + HelpID = "sw:ImageButton:DLG_ADD_IDX_STYLES:PB_RIGHT"; Pos = MAP_APPFONT ( 65 , 182 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/index/idxmrk.src b/sw/source/ui/index/idxmrk.src index 6a4ce1934d..e0a1a4df9c 100644 --- a/sw/source/ui/index/idxmrk.src +++ b/sw/source/ui/index/idxmrk.src @@ -275,7 +275,7 @@ ModalDialog DLG_EDIT_IDXMARK Moveable = TRUE ; Closeable = TRUE; Sizeable = FALSE ; - HelpID = FN_EDIT_IDX_ENTRY_DLG; + HelpId = CMD_FN_EDIT_IDX_ENTRY_DLG; SVLook = TRUE ; #define IDX_WIN_WIDTH IDX_WIN_WIDTH_NORMAL Size = MAP_APPFONT ( IDX_WIN_WIDTH , 118 ) ; @@ -294,7 +294,7 @@ ModalDialog DLG_EDIT_IDXMARK_CJK Moveable = TRUE ; Closeable = TRUE; Sizeable = FALSE ; - HelpID = FN_EDIT_IDX_ENTRY_DLG; + HelpId = CMD_FN_EDIT_IDX_ENTRY_DLG; SVLook = TRUE ; #define IDX_WIN_WIDTH IDX_WIN_WIDTH_CJK Size = MAP_APPFONT ( IDX_WIN_WIDTH , 118 ) ; @@ -315,7 +315,7 @@ ModelessDialog DLG_INSIDXMARK Sizeable = FALSE ; Hide = TRUE ; // Zoomable = TRUE ; - HelpID = FN_INSERT_IDX_ENTRY_DLG; + HelpId = CMD_FN_INSERT_IDX_ENTRY_DLG; SVLook = TRUE ; #define IDX_WIN_WIDTH IDX_WIN_WIDTH_NORMAL Size = MAP_APPFONT ( IDX_WIN_WIDTH , 138) ; @@ -336,7 +336,7 @@ ModelessDialog DLG_INSIDXMARK_CJK Closeable = TRUE; Sizeable = FALSE ; // Zoomable = TRUE ; - HelpID = FN_INSERT_IDX_ENTRY_DLG; + HelpId = CMD_FN_INSERT_IDX_ENTRY_DLG; SVLook = TRUE ; #define IDX_WIN_WIDTH IDX_WIN_WIDTH_CJK Size = MAP_APPFONT ( IDX_WIN_WIDTH , 138) ; @@ -392,6 +392,7 @@ ModalDialog DLG_NEW_USER_IDX }; Edit ED_NAME { + HelpID = "sw:Edit:DLG_NEW_USER_IDX:ED_NAME"; Border = TRUE ; Pos = MAP_APPFONT ( 55 , 15 ) ; Size = MAP_APPFONT ( 78 , 12 ) ; @@ -523,7 +524,7 @@ ModalDialog DLG_EDIT_AUTHMARK Moveable = TRUE ; Closeable = TRUE ; Sizeable = FALSE ; - HelpID = FN_EDIT_AUTH_ENTRY_DLG; + HelpId = CMD_FN_EDIT_AUTH_ENTRY_DLG; SVLook = TRUE ; Size = MAP_APPFONT ( 218 , 118 ) ; #define RADIO_BUTTON_HEIGHT 0 @@ -536,7 +537,7 @@ ModelessDialog DLG_INSAUTHMARK Closeable = TRUE ; Sizeable = FALSE ; // Zoomable = TRUE ; - HelpID = FN_INSERT_AUTH_ENTRY_DLG; + HelpId = CMD_FN_INSERT_AUTH_ENTRY_DLG; SVLook = TRUE ; #define RADIO_BUTTON_HEIGHT 30 Size = MAP_APPFONT ( 218 , 118 + RADIO_BUTTON_HEIGHT) ; diff --git a/sw/source/ui/index/makefile.mk b/sw/source/ui/index/makefile.mk deleted file mode 100644 index a42f98122b..0000000000 --- a/sw/source/ui/index/makefile.mk +++ /dev/null @@ -1,67 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=index -LIBTARGET=NO -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - cnttab.src \ - idxmrk.src \ - multmrk.src - -EXCEPTIONSFILES = \ - $(SLO)$/cnttab.obj \ - $(SLO)$/cntex.obj \ - $(SLO)$/idxmrk.obj \ - $(SLO)$/multmrk.obj \ - $(SLO)$/swuiidxmrk.obj \ - $(SLO)$/toxmgr.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) - -LIB1TARGET= $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/idxmrk.obj \ - $(SLO)$/toxmgr.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/index/multmrk.src b/sw/source/ui/index/multmrk.src index 83db407d1a..d5d11ed530 100644 --- a/sw/source/ui/index/multmrk.src +++ b/sw/source/ui/index/multmrk.src @@ -31,7 +31,7 @@ #include "helpid.h" ModalDialog DLG_MULTMRK { - HelpID = FN_EDIT_IDX_ENTRY_DLG ; + HelpID = CMD_FN_EDIT_IDX_ENTRY_DLG ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 220 , 95 ) ; @@ -65,6 +65,7 @@ ModalDialog DLG_MULTMRK }; ListBox LB_TOX { + HelpID = "sw:ListBox:DLG_MULTMRK:LB_TOX"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 37 ) ; Size = MAP_APPFONT ( 100 , 49 ) ; diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index c7d1c331bd..9b9706bbbc 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -1129,7 +1129,7 @@ public: struct TextInfo { sal_uInt16 nToxField; - sal_uInt16 nHelpId; + const char* pHelpId; }; static const TextInfo aTextInfoArr[] = @@ -1640,7 +1640,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent, pTypeListBox->SetPosPixel(bLeft ? aTR1 : aTR2); pTypeListBox->Show(); pTypeListBox->SetSelectHdl(LINK(this, SwCreateAuthEntryDlg_Impl, EnableHdl)); - pTypeListBox->SetHelpId(aCurInfo.nHelpId); + pTypeListBox->SetHelpId(aCurInfo.pHelpId); } else if(AUTH_FIELD_IDENTIFIER == aCurInfo.nToxField && !m_bNewEntryMode) @@ -1668,7 +1668,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent, pIdentifierBox->SetSizePixel(aTmp); pIdentifierBox->SetPosPixel(bLeft ? aTR1 : aTR2); pIdentifierBox->Show(); - pIdentifierBox->SetHelpId(aCurInfo.nHelpId); + pIdentifierBox->SetHelpId(aCurInfo.pHelpId); } else { @@ -1679,7 +1679,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent, pEdits[nIndex]->SetPosPixel(bLeft ? aTR1 : aTR2); pEdits[nIndex]->SetText(pFields[aCurInfo.nToxField]); pEdits[nIndex]->Show(); - pEdits[nIndex]->SetHelpId(aCurInfo.nHelpId); + pEdits[nIndex]->SetHelpId(aCurInfo.pHelpId); if(AUTH_FIELD_IDENTIFIER == aCurInfo.nToxField) { pEdits[nIndex]->SetModifyHdl(LINK(this, SwCreateAuthEntryDlg_Impl, ShortNameHdl)); diff --git a/sw/source/ui/lingu/makefile.mk b/sw/source/ui/lingu/makefile.mk deleted file mode 100644 index 0abd0c319a..0000000000 --- a/sw/source/ui/lingu/makefile.mk +++ /dev/null @@ -1,56 +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. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=lingu - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES= \ - $(SLO)$/hhcwrp.obj \ - $(SLO)$/hyp.obj \ - $(SLO)$/olmenu.obj \ - $(SLO)$/sdrhhcwrap.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) - -SRS1NAME=$(TARGET) -SRC1FILES = \ - olmenu.src - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index ccacbc595d..f101122ff8 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -2,7 +2,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 @@ -54,6 +54,43 @@ #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 <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 <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 <svl/languageoptions.hxx> +#include <svl/stritem.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> #ifndef _SVSTDARR_HXX #define _SVSTDARR_STRINGSDTOR diff --git a/sw/source/ui/makefile.mk b/sw/source/ui/makefile.mk deleted file mode 100644 index b331a2a007..0000000000 --- a/sw/source/ui/makefile.mk +++ /dev/null @@ -1,101 +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. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=sw -TARGET=ui - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(GUI)" != "OS2" -.IF "$(GUI)" != "WNT" -.IF "$(COM)" != "BLC" -.IF "$(COM)" != "WTC" -LIBFLAGS=/NOI /NOE /PAGE:256 -.ENDIF -.ENDIF -.ENDIF -.ENDIF - -# --- Files -------------------------------------------------------- - -# andere Label als Verzeichnisnamen fuer VC++/NT - -SUBLIBS1= \ - $(SLB)$/app.lib \ - $(SLB)$/cctrl.lib \ - $(SLB)$/chrdlg.lib \ - $(SLB)$/config.lib \ - $(SLB)$/dbui.lib \ - $(SLB)$/dialog.lib \ - $(SLB)$/dochdl.lib \ - $(SLB)$/docvw.lib \ - $(SLB)$/envelp.lib \ - $(SLB)$/fldui.lib \ - $(SLB)$/frmdlg.lib \ - $(SLB)$/globdoc.lib - -SUBLIBS2= \ - $(SLB)$/index.lib \ - $(SLB)$/lingu.lib \ - $(SLB)$/misc.lib \ - $(SLB)$/ribbar.lib \ - $(SLB)$/shells.lib \ - $(SLB)$/smartmenu.lib \ - $(SLB)$/table.lib \ - $(SLB)$/unoidl.lib \ - $(SLB)$/utlui.lib \ - $(SLB)$/web.lib \ - $(SLB)$/uiview.lib \ - $(SLB)$/wrtsh.lib - -# ----------------------------------------------------------- - -################################################################ - -LIB1TARGET=$(SLB)$/ui1.lib -LIB1FILES= \ - $(SUBLIBS1) - -LIB2TARGET=$(SLB)$/ui2.lib -LIB2FILES= \ - $(SUBLIBS2) - -.INCLUDE : target.mk - -################################################################ - -kill: - @$(RM) $(SLB)$/ui.lst - @$(RM) $(SLB)$/ui.lib - - diff --git a/sw/source/ui/misc/bookmark.src b/sw/source/ui/misc/bookmark.src index 9ca4254eb6..39529dd67c 100644 --- a/sw/source/ui/misc/bookmark.src +++ b/sw/source/ui/misc/bookmark.src @@ -31,7 +31,7 @@ #include "helpid.h" ModalDialog DLG_INSERT_BOOKMARK { - HelpID = FN_INSERT_BOOKMARK ; + HelpID = CMD_FN_INSERT_BOOKMARK ; OUTPUTSIZE = TRUE ; Size = MAP_APPFONT ( 179 , 96 ) ; /* ### ACHTUNG: Neuer Text in Resource? Textmarke einfügen : Textmarke einf³gen */ @@ -54,6 +54,7 @@ ModalDialog DLG_INSERT_BOOKMARK }; ComboBox CB_BOOKMARK { + HelpID = "sw:ComboBox:DLG_INSERT_BOOKMARK:CB_BOOKMARK"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 99 , 76 ) ; TABSTOP = TRUE ; @@ -62,6 +63,7 @@ ModalDialog DLG_INSERT_BOOKMARK }; PushButton BT_DELETE { + HelpID = "sw:PushButton:DLG_INSERT_BOOKMARK:BT_DELETE"; Pos = MAP_APPFONT ( 123 , 40 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; /* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */ diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx index e7f566e602..d37ca9c516 100644 --- a/sw/source/ui/misc/docfnote.cxx +++ b/sw/source/ui/misc/docfnote.cxx @@ -254,7 +254,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& ) } // Seite - for( i = RES_POOLPAGE_BEGIN; i <= RES_POOLPAGE_LANDSCAPE; ++i ) + for( i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i ) aPageTemplBox.InsertEntry(SwStyleNameMapper::GetUIName( i, aEmptyStr )); USHORT nCount = pSh->GetPageDescCnt(); diff --git a/sw/source/ui/misc/docfnote.src b/sw/source/ui/misc/docfnote.src index bdb4d55eb2..bc983676d7 100644 --- a/sw/source/ui/misc/docfnote.src +++ b/sw/source/ui/misc/docfnote.src @@ -78,6 +78,7 @@ TabPage TP_FOOTNOTEOPTION }; ListBox LB_NUMVIEW { + HelpID = "sw:ListBox:TP_FOOTNOTEOPTION:LB_NUMVIEW"; Border = TRUE ; Pos = MAP_APPFONT ( 65 , 14 ) ; Size = MAP_APPFONT ( 59 , 72 ) ; @@ -94,6 +95,7 @@ TabPage TP_FOOTNOTEOPTION }; NumericField FLD_OFFSET { + HelpID = "sw:NumericField:TP_FOOTNOTEOPTION:FLD_OFFSET"; Pos = MAP_APPFONT ( 189 , 14 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; Spin = TRUE ; @@ -112,6 +114,7 @@ TabPage TP_FOOTNOTEOPTION }; ListBox LB_NUMCOUNT { + HelpID = "sw:ListBox:TP_FOOTNOTEOPTION:LB_NUMCOUNT"; Border = TRUE ; Pos = MAP_APPFONT ( 65 , 29 ) ; Size = MAP_APPFONT ( 59 , 50 ) ; @@ -135,6 +138,7 @@ TabPage TP_FOOTNOTEOPTION }; Edit ED_PREFIX { + HelpID = "sw:Edit:TP_FOOTNOTEOPTION:ED_PREFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 65 , 44 ) ; Size = MAP_APPFONT ( 59 , 12 ) ; @@ -151,6 +155,7 @@ TabPage TP_FOOTNOTEOPTION }; Edit ED_SUFFIX { + HelpID = "sw:Edit:TP_FOOTNOTEOPTION:ED_SUFFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 189 , 44 ) ; Size = MAP_APPFONT ( 59 , 12 ) ; @@ -166,6 +171,7 @@ TabPage TP_FOOTNOTEOPTION }; RadioButton RB_POS_PAGE { + HelpID = "sw:RadioButton:TP_FOOTNOTEOPTION:RB_POS_PAGE"; Pos = MAP_APPFONT ( 65 , 62 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text [ en-US ] = "~End of page" ; @@ -174,6 +180,7 @@ TabPage TP_FOOTNOTEOPTION }; RadioButton RB_POS_CHAPTER { + HelpID = "sw:RadioButton:TP_FOOTNOTEOPTION:RB_POS_CHAPTER"; Pos = MAP_APPFONT ( 65 , 75 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text [ en-US ] = "En~d of document" ; @@ -193,6 +200,7 @@ TabPage TP_FOOTNOTEOPTION }; ListBox LB_PARA_TEMPL { + HelpID = "sw:ListBox:TP_FOOTNOTEOPTION:LB_PARA_TEMPL"; Border = TRUE ; Pos = MAP_APPFONT ( 48 , 100 ) ; Size = MAP_APPFONT ( 58 , 80 ) ; @@ -210,6 +218,7 @@ TabPage TP_FOOTNOTEOPTION }; ListBox LB_PAGE_TEMPL { + HelpID = "sw:ListBox:TP_FOOTNOTEOPTION:LB_PAGE_TEMPL"; Border = TRUE ; Pos = MAP_APPFONT ( 48 , 116) ; Size = MAP_APPFONT ( 58 , 80 ) ; @@ -232,6 +241,7 @@ TabPage TP_FOOTNOTEOPTION }; ListBox LB_ANCHR_CHARFMT { + HelpID = "sw:ListBox:TP_FOOTNOTEOPTION:LB_ANCHR_CHARFMT"; Border = TRUE ; Pos = MAP_APPFONT ( 186 , 100 ) ; Size = MAP_APPFONT ( 65 , 72 ) ; @@ -248,6 +258,7 @@ TabPage TP_FOOTNOTEOPTION }; ListBox LB_TEXT_CHARFMT { + HelpID = "sw:ListBox:TP_FOOTNOTEOPTION:LB_TEXT_CHARFMT"; Border = TRUE ; Pos = MAP_APPFONT ( 186 , 116 ) ; Size = MAP_APPFONT ( 65 , 72 ) ; @@ -270,6 +281,7 @@ TabPage TP_FOOTNOTEOPTION }; Edit ED_CONT { + HelpID = "sw:Edit:TP_FOOTNOTEOPTION:ED_CONT"; Border = TRUE ; Pos = MAP_APPFONT ( 88, 145 ) ; Size = MAP_APPFONT ( 160 , 12 ) ; @@ -286,6 +298,7 @@ TabPage TP_FOOTNOTEOPTION }; Edit ED_CONT_FROM { + HelpID = "sw:Edit:TP_FOOTNOTEOPTION:ED_CONT_FROM"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 161 ) ; Size = MAP_APPFONT ( 160 , 12 ) ; @@ -316,6 +329,7 @@ TabPage TP_ENDNOTEOPTION }; ListBox LB_NUMVIEW { + HelpID = "sw:ListBox:TP_ENDNOTEOPTION:LB_NUMVIEW"; Border = TRUE ; Pos = MAP_APPFONT ( 65 , 14 ) ; Size = MAP_APPFONT ( 59 , 72 ) ; @@ -343,6 +357,7 @@ TabPage TP_ENDNOTEOPTION }; NumericField FLD_OFFSET { + HelpID = "sw:NumericField:TP_ENDNOTEOPTION:FLD_OFFSET"; Pos = MAP_APPFONT ( 189 , 14 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; Spin = TRUE ; @@ -361,6 +376,7 @@ TabPage TP_ENDNOTEOPTION }; ListBox LB_NUMCOUNT { + HelpID = "sw:ListBox:TP_ENDNOTEOPTION:LB_NUMCOUNT"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 62 , 72 ) ; @@ -376,6 +392,7 @@ TabPage TP_ENDNOTEOPTION }; Edit ED_PREFIX { + HelpID = "sw:Edit:TP_ENDNOTEOPTION:ED_PREFIX"; Pos = MAP_APPFONT ( 65 , 30 ) ; Size = MAP_APPFONT ( 59 , 12 ) ; Border = TRUE ; @@ -392,6 +409,7 @@ TabPage TP_ENDNOTEOPTION }; Edit ED_SUFFIX { + HelpID = "sw:Edit:TP_ENDNOTEOPTION:ED_SUFFIX"; Pos = MAP_APPFONT ( 189 , 30 ) ; Size = MAP_APPFONT ( 59 , 12 ) ; Border = TRUE ; @@ -407,6 +425,7 @@ TabPage TP_ENDNOTEOPTION }; RadioButton RB_POS_PAGE { + HelpID = "sw:RadioButton:TP_ENDNOTEOPTION:RB_POS_PAGE"; Pos = MAP_APPFONT ( 12 , 104 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; Text [ en-US ] = "End ~of page" ; @@ -415,6 +434,7 @@ TabPage TP_ENDNOTEOPTION }; RadioButton RB_POS_CHAPTER { + HelpID = "sw:RadioButton:TP_ENDNOTEOPTION:RB_POS_CHAPTER"; Pos = MAP_APPFONT ( 12 , 118 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; Text [ en-US ] = "End of ~document" ; @@ -434,6 +454,7 @@ TabPage TP_ENDNOTEOPTION }; ListBox LB_PARA_TEMPL { + HelpID = "sw:ListBox:TP_ENDNOTEOPTION:LB_PARA_TEMPL"; Border = TRUE ; Pos = MAP_APPFONT ( 51 , 56 ) ; Size = MAP_APPFONT ( 67 , 72 ) ; @@ -451,6 +472,7 @@ TabPage TP_ENDNOTEOPTION }; ListBox LB_PAGE_TEMPL { + HelpID = "sw:ListBox:TP_ENDNOTEOPTION:LB_PAGE_TEMPL"; Border = TRUE ; Pos = MAP_APPFONT ( 51 , 72 ) ; Size = MAP_APPFONT ( 67 , 72 ) ; @@ -472,6 +494,7 @@ TabPage TP_ENDNOTEOPTION }; ListBox LB_ANCHR_CHARFMT { + HelpID = "sw:ListBox:TP_ENDNOTEOPTION:LB_ANCHR_CHARFMT"; Border = TRUE ; Pos = MAP_APPFONT ( 186 , 56 ) ; Size = MAP_APPFONT ( 65 , 72 ) ; @@ -488,6 +511,7 @@ TabPage TP_ENDNOTEOPTION }; ListBox LB_TEXT_CHARFMT { + HelpID = "sw:ListBox:TP_ENDNOTEOPTION:LB_TEXT_CHARFMT"; Border = TRUE ; Pos = MAP_APPFONT ( 186 , 72 ) ; Size = MAP_APPFONT ( 65 , 72 ) ; @@ -511,6 +535,7 @@ TabPage TP_ENDNOTEOPTION }; Edit ED_CONT { + HelpID = "sw:Edit:TP_ENDNOTEOPTION:ED_CONT"; Border = TRUE ; Pos = MAP_APPFONT ( 137 , 101 ) ; Size = MAP_APPFONT ( 114 , 12 ) ; @@ -527,6 +552,7 @@ TabPage TP_ENDNOTEOPTION }; Edit ED_CONT_FROM { + HelpID = "sw:Edit:TP_ENDNOTEOPTION:ED_CONT_FROM"; Border = TRUE ; Pos = MAP_APPFONT ( 137 , 116 ) ; Size = MAP_APPFONT ( 114 , 12 ) ; diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index 57703df74e..512049d87c 100644 --- a/sw/source/ui/misc/glosbib.cxx +++ b/sw/source/ui/misc/glosbib.cxx @@ -97,7 +97,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent, aGroupTLB.SetHelpId(HID_GLOS_GROUP_TREE); aGroupTLB.SetTabs( &nTabs[0], MAP_APPFONT ); - aGroupTLB.SetWindowBits(WB_HSCROLL|WB_CLIPCHILDREN|WB_SORT); + aGroupTLB.SetStyle(aGroupTLB.GetStyle()|WB_HSCROLL|WB_CLIPCHILDREN|WB_SORT); aGroupTLB.SetSelectHdl(LINK(this, SwGlossaryGroupDlg, SelectHdl)); aGroupTLB.GetModel()->SetSortMode(SortAscending); aNewPB.SetClickHdl(LINK(this, SwGlossaryGroupDlg, NewHdl)); diff --git a/sw/source/ui/misc/glosbib.src b/sw/source/ui/misc/glosbib.src index 75a03eb85e..9bd9489977 100644 --- a/sw/source/ui/misc/glosbib.src +++ b/sw/source/ui/misc/glosbib.src @@ -38,6 +38,7 @@ ModalDialog DLG_BIB_BASE Text [ en-US ] = "Edit Categories" ; PushButton PB_NEW { + HelpID = "sw:PushButton:DLG_BIB_BASE:PB_NEW"; Disable = TRUE ; Pos = MAP_APPFONT ( 293 , 66 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; @@ -46,6 +47,7 @@ ModalDialog DLG_BIB_BASE }; PushButton PB_DELETE { + HelpID = "sw:PushButton:DLG_BIB_BASE:PB_DELETE"; Pos = MAP_APPFONT ( 293 , 83 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; /* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */ @@ -55,6 +57,7 @@ ModalDialog DLG_BIB_BASE }; PushButton PB_RENAME { + HelpID = "sw:PushButton:DLG_BIB_BASE:PB_RENAME"; Disable = TRUE ; Pos = MAP_APPFONT ( 293 , 100 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; @@ -88,6 +91,7 @@ ModalDialog DLG_BIB_BASE }; Edit ED_NAME { + HelpID = "sw:Edit:DLG_BIB_BASE:ED_NAME"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 159 , 12 ) ; TabStop = TRUE ; @@ -102,6 +106,7 @@ ModalDialog DLG_BIB_BASE }; ListBox LB_PATH { + HelpID = "sw:ListBox:DLG_BIB_BASE:LB_PATH"; Pos = MAP_APPFONT ( 174 , 14 ) ; Size = MAP_APPFONT ( 107 , 50 ) ; DropDown = TRUE ; diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 990406d4a8..2c2b4503a8 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -279,7 +279,7 @@ SwGlossaryDlg::SwGlossaryDlg(SfxViewFrame* pViewFrame, aInsertBtn.Enable(sal_False); aNameED.GrabFocus(); aCategoryBox.SetHelpId(HID_MD_GLOS_CATEGORY); - aCategoryBox.SetWindowBits(WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL|WB_VSCROLL|WB_CLIPCHILDREN|WB_SORT); + aCategoryBox.SetStyle(aCategoryBox.GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL|WB_VSCROLL|WB_CLIPCHILDREN|WB_SORT); aCategoryBox.GetModel()->SetSortMode(SortAscending); aCategoryBox.SetHighlightRange(); // ueber volle Breite selektieren aCategoryBox.SetNodeDefaultImages( ); diff --git a/sw/source/ui/misc/glossary.src b/sw/source/ui/misc/glossary.src index 88f4ea0c88..a38cf6defe 100644 --- a/sw/source/ui/misc/glossary.src +++ b/sw/source/ui/misc/glossary.src @@ -32,7 +32,7 @@ // #define DLG_GLOSSARY 256 ModalDialog DLG_GLOSSARY { - HelpID = FN_GLOSSARY_DLG ; + HelpID = CMD_FN_GLOSSARY_DLG ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 375 , 164 ) ; @@ -40,6 +40,7 @@ ModalDialog DLG_GLOSSARY Moveable = TRUE ; CheckBox CB_INSERT_TIP { + HelpID = "sw:CheckBox:DLG_GLOSSARY:CB_INSERT_TIP"; Pos = MAP_APPFONT ( 12 , 12 ) ; Size = MAP_APPFONT ( 200 , 12 ) ; TabStop = TRUE ; @@ -54,6 +55,7 @@ ModalDialog DLG_GLOSSARY }; Edit ED_NAME { + HelpID = "sw:Edit:DLG_GLOSSARY:ED_NAME"; Border = TRUE ; Pos = MAP_APPFONT ( 55 , 29 ) ; Size = MAP_APPFONT ( 85 , 12 ) ; @@ -70,6 +72,7 @@ ModalDialog DLG_GLOSSARY }; Edit ED_SHORTNAME { + HelpID = "sw:Edit:DLG_GLOSSARY:ED_SHORTNAME"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 203 , 29 ) ; @@ -98,6 +101,7 @@ ModalDialog DLG_GLOSSARY }; CheckBox CB_FILE_REL { + HelpID = "sw:CheckBox:DLG_GLOSSARY:CB_FILE_REL"; Pos = MAP_APPFONT ( 14 , 145 ) ; Size = MAP_APPFONT ( 90 , 12 ) ; TabStop = TRUE ; @@ -105,6 +109,7 @@ ModalDialog DLG_GLOSSARY }; CheckBox CB_NET_REL { + HelpID = "sw:CheckBox:DLG_GLOSSARY:CB_NET_REL"; Pos = MAP_APPFONT ( 109 , 145 ) ; Size = MAP_APPFONT ( 90 , 12 ) ; Text [ en-US ] = "Inte~rnet" ; @@ -122,6 +127,7 @@ ModalDialog DLG_GLOSSARY }; CheckBox CB_SHOW_EXAMPLE { + HelpID = "sw:CheckBox:DLG_GLOSSARY:CB_SHOW_EXAMPLE"; Pos = MAP_APPFONT ( 231 , 145 ) ; Size = MAP_APPFONT ( 82 , 12 ) ; Text [ en-US ] = "Sho~w preview"; @@ -151,6 +157,7 @@ ModalDialog DLG_GLOSSARY }; MenuButton PB_EDIT { + HelpID = "sw:MenuButton:DLG_GLOSSARY:PB_EDIT"; Pos = MAP_APPFONT ( 319 , 60 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "AutoTe~xt" ; @@ -158,6 +165,7 @@ ModalDialog DLG_GLOSSARY }; PushButton PB_BIB { + HelpID = "sw:PushButton:DLG_GLOSSARY:PB_BIB"; Pos = MAP_APPFONT ( 319 , 77 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "C~ategories..." ; @@ -165,6 +173,7 @@ ModalDialog DLG_GLOSSARY }; PushButton PB_PATH { + HelpID = "sw:PushButton:DLG_GLOSSARY:PB_PATH"; Pos = MAP_APPFONT ( 319 , 94 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -308,6 +317,7 @@ ModalDialog DLG_RENAME_GLOS }; Edit ED_ON { + HelpID = "sw:Edit:DLG_RENAME_GLOS:ED_ON"; ReadOnly = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 44 , 12 ) ; @@ -322,6 +332,7 @@ ModalDialog DLG_RENAME_GLOS }; Edit ED_OS { + HelpID = "sw:Edit:DLG_RENAME_GLOS:ED_OS"; ReadOnly = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 200 , 12 ) ; @@ -336,6 +347,7 @@ ModalDialog DLG_RENAME_GLOS }; Edit ED_NN { + HelpID = "sw:Edit:DLG_RENAME_GLOS:ED_NN"; TabStop = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 44 , 27 ) ; @@ -350,6 +362,7 @@ ModalDialog DLG_RENAME_GLOS }; Edit ED_NS { + HelpID = "sw:Edit:DLG_RENAME_GLOS:ED_NS"; TabStop = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 200 , 27 ) ; diff --git a/sw/source/ui/misc/insfnote.src b/sw/source/ui/misc/insfnote.src index fda4b92b0d..c462e01188 100644 --- a/sw/source/ui/misc/insfnote.src +++ b/sw/source/ui/misc/insfnote.src @@ -31,6 +31,7 @@ // #define DLG_INS_FOOTNOTE 257 ModalDialog DLG_INS_FOOTNOTE { + HelpID = "sw:ModalDialog:DLG_INS_FOOTNOTE"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 160 , 100 ) ; @@ -39,6 +40,7 @@ ModalDialog DLG_INS_FOOTNOTE Moveable = TRUE ; Edit ED_NUMBER_CHAR { + HelpID = "sw:Edit:DLG_INS_FOOTNOTE:ED_NUMBER_CHAR"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 69 , 27 ) ; @@ -71,6 +73,7 @@ ModalDialog DLG_INS_FOOTNOTE }; ImageButton BT_PREV { + HelpID = "sw:ImageButton:DLG_INS_FOOTNOTE:BT_PREV"; Pos = MAP_APPFONT ( 104 , 82 ) ; Size = MAP_APPFONT ( 24 , 14 ) ; TabStop = TRUE ; @@ -79,6 +82,7 @@ ModalDialog DLG_INS_FOOTNOTE }; ImageButton BT_NEXT { + HelpID = "sw:ImageButton:DLG_INS_FOOTNOTE:BT_NEXT"; Pos = MAP_APPFONT ( 130 , 82 ) ; Size = MAP_APPFONT ( 24 , 14 ) ; TabStop = TRUE ; @@ -87,6 +91,7 @@ ModalDialog DLG_INS_FOOTNOTE }; RadioButton RB_NUMBER_AUTO { + HelpID = "sw:RadioButton:DLG_INS_FOOTNOTE:RB_NUMBER_AUTO"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 79 , 10 ) ; Text [ en-US ] = "~Automatic" ; @@ -96,6 +101,7 @@ ModalDialog DLG_INS_FOOTNOTE }; RadioButton RB_NUMBER_CHAR { + HelpID = "sw:RadioButton:DLG_INS_FOOTNOTE:RB_NUMBER_CHAR"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 54 , 10 ) ; Text [ en-US ] = "~Character" ; @@ -108,12 +114,14 @@ ModalDialog DLG_INS_FOOTNOTE }; PushButton BT_NUMBER_CHAR { + HelpID = "sw:PushButton:DLG_INS_FOOTNOTE:BT_NUMBER_CHAR"; Pos = MAP_APPFONT ( 69 , 42 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; Text = "..." ; }; RadioButton RB_TYPE_FTN { + HelpID = "sw:RadioButton:DLG_INS_FOOTNOTE:RB_TYPE_FTN"; Pos = MAP_APPFONT ( 12 , 70 ) ; Size = MAP_APPFONT ( 79 , 10 ) ; TabStop = TRUE ; @@ -123,6 +131,7 @@ ModalDialog DLG_INS_FOOTNOTE }; RadioButton RB_TYPE_ENDNOTE { + HelpID = "sw:RadioButton:DLG_INS_FOOTNOTE:RB_TYPE_ENDNOTE"; Pos = MAP_APPFONT ( 12 , 83 ) ; Size = MAP_APPFONT ( 79 , 10 ) ; Text [ en-US ] = "~Endnote" ; diff --git a/sw/source/ui/misc/linenum.src b/sw/source/ui/misc/linenum.src index 61cee918d7..feb17ca5bb 100644 --- a/sw/source/ui/misc/linenum.src +++ b/sw/source/ui/misc/linenum.src @@ -47,6 +47,7 @@ TabPage TP_LINENUMBERING Size = MAP_APPFONT ( 260 , 185 ) ; CheckBox CB_NUMBERING_ON { + HelpID = "sw:CheckBox:TP_LINENUMBERING:CB_NUMBERING_ON"; Pos = MAP_APPFONT ( 12 , 6 ) ; Size = MAP_APPFONT ( 242 , 8 ) ; TabStop = TRUE ; @@ -60,6 +61,7 @@ TabPage TP_LINENUMBERING }; ListBox LB_CHAR_STYLE { + HelpID = "sw:ListBox:TP_LINENUMBERING:LB_CHAR_STYLE"; Pos = MAP_APPFONT ( 100 , 30 ) ; Size = MAP_APPFONT ( 148 , 80 ) ; TabStop = TRUE ; @@ -74,6 +76,7 @@ TabPage TP_LINENUMBERING }; ListBox LB_FORMAT { + HelpID = "sw:ListBox:TP_LINENUMBERING:LB_FORMAT"; Pos = MAP_APPFONT ( 100 , 44 ) ; Size = MAP_APPFONT ( 148 , 80 ) ; TabStop = TRUE ; @@ -87,6 +90,7 @@ TabPage TP_LINENUMBERING }; ListBox LB_POS { + HelpID = "sw:ListBox:TP_LINENUMBERING:LB_POS"; Pos = MAP_APPFONT ( 100 , 60 ) ; Size = MAP_APPFONT ( 148 , 60 ) ; TabStop = TRUE ; @@ -107,6 +111,7 @@ TabPage TP_LINENUMBERING }; MetricField MF_OFFSET { + HelpID = "sw:MetricField:TP_LINENUMBERING:MF_OFFSET"; Pos = MAP_APPFONT ( 100 , 76 ) ; Size = MAP_APPFONT ( 45 , 12 ) ; Border = TRUE ; @@ -130,6 +135,7 @@ TabPage TP_LINENUMBERING }; NumericField NF_NUM_INVERVAL { + HelpID = "sw:NumericField:TP_LINENUMBERING:NF_NUM_INVERVAL"; Pos = MAP_APPFONT ( 100 , 92 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; Border = TRUE ; @@ -163,6 +169,7 @@ TabPage TP_LINENUMBERING }; Edit ED_DIVISOR { + HelpID = "sw:Edit:TP_LINENUMBERING:ED_DIVISOR"; Pos = MAP_APPFONT ( 45 , 121 ) ; Size = MAP_APPFONT ( 76 , 12 ) ; Left = TRUE ; @@ -177,6 +184,7 @@ TabPage TP_LINENUMBERING }; NumericField NF_DIV_INTERVAL { + HelpID = "sw:NumericField:TP_LINENUMBERING:NF_DIV_INTERVAL"; Pos = MAP_APPFONT ( 45 , 137 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; Border = TRUE ; @@ -205,6 +213,7 @@ TabPage TP_LINENUMBERING }; CheckBox CB_COUNT_EMPTYLINES { + HelpID = "sw:CheckBox:TP_LINENUMBERING:CB_COUNT_EMPTYLINES"; Pos = MAP_APPFONT ( 139 , 121 ) ; Size = MAP_APPFONT ( 110 , 10 ) ; TabStop = TRUE ; @@ -212,6 +221,7 @@ TabPage TP_LINENUMBERING }; CheckBox CB_COUNT_FRAMELINES { + HelpID = "sw:CheckBox:TP_LINENUMBERING:CB_COUNT_FRAMELINES"; Pos = MAP_APPFONT ( 139 , 135 ) ; Size = MAP_APPFONT ( 110 , 10 ) ; TabStop = TRUE ; @@ -219,6 +229,7 @@ TabPage TP_LINENUMBERING }; CheckBox CB_RESTART_PAGE { + HelpID = "sw:CheckBox:TP_LINENUMBERING:CB_RESTART_PAGE"; Pos = MAP_APPFONT ( 139 , 149 ); Size = MAP_APPFONT ( 110 , 10 ); TabStop = TRUE; diff --git a/sw/source/ui/misc/makefile.mk b/sw/source/ui/misc/makefile.mk deleted file mode 100644 index 4448c9acfa..0000000000 --- a/sw/source/ui/misc/makefile.mk +++ /dev/null @@ -1,93 +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. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=misc -LIBTARGET=no -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES=\ - bookmark.src \ - docfnote.src \ - glossary.src \ - glosbib.src \ - insfnote.src \ - insrule.src \ - linenum.src \ - num.src \ - numberingtypelistbox.src \ - outline.src \ - pgfnote.src \ - pggrid.src \ - redlndlg.src \ - srtdlg.src \ - titlepage.src - -EXCEPTIONSFILES = \ - $(SLO)$/bookmark.obj \ - $(SLO)$/docfnote.obj \ - $(SLO)$/glosbib.obj \ - $(SLO)$/glosdoc.obj \ - $(SLO)$/glossary.obj \ - $(SLO)$/glshell.obj \ - $(SLO)$/insfnote.obj \ - $(SLO)$/insrule.obj \ - $(SLO)$/linenum.obj \ - $(SLO)$/num.obj \ - $(SLO)$/numberingtypelistbox.obj \ - $(SLO)$/outline.obj \ - $(SLO)$/pgfnote.obj \ - $(SLO)$/pggrid.obj \ - $(SLO)$/redlndlg.obj \ - $(SLO)$/srtdlg.obj \ - $(SLO)$/swmodalredlineacceptdlg.obj \ - $(SLO)$/titlepage.obj - - -SLOFILES = \ - $(EXCEPTIONSFILES) - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/glosdoc.obj \ - $(SLO)$/glshell.obj \ - $(SLO)$/numberingtypelistbox.obj \ - $(SLO)$/redlndlg.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/misc/num.src b/sw/source/ui/misc/num.src index 0fbc45eb1c..9bf1cf54f9 100644 --- a/sw/source/ui/misc/num.src +++ b/sw/source/ui/misc/num.src @@ -53,6 +53,7 @@ TabPage TP_NUM_POSITION }; MultiListBox LB_LEVEL { + HelpID = "sw:MultiListBox:TP_NUM_POSITION:LB_LEVEL"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 26 , 163 ) ; TabStop = TRUE ; @@ -75,6 +76,7 @@ TabPage TP_NUM_POSITION }; MetricField MF_BORDERDIST { + HelpID = "sw:MetricField:TP_NUM_POSITION:MF_BORDERDIST"; Pos = MAP_APPFONT ( 198 , 25 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -93,6 +95,7 @@ TabPage TP_NUM_POSITION }; CheckBox CB_RELATIVE { + HelpID = "sw:CheckBox:TP_NUM_POSITION:CB_RELATIVE"; Pos = MAP_APPFONT ( 198 , 41 ) ; Size = MAP_APPFONT ( 52 , 10 ) ; Text [ en-US ] = "Relati~ve" ; @@ -105,6 +108,7 @@ TabPage TP_NUM_POSITION }; MetricField MF_INDENT { + HelpID = "sw:MetricField:TP_NUM_POSITION:MF_INDENT"; Pos = MAP_APPFONT ( 198 , 57 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -129,6 +133,7 @@ TabPage TP_NUM_POSITION }; MetricField MF_NUMDIST { + HelpID = "sw:MetricField:TP_NUM_POSITION:MF_NUMDIST"; Pos = MAP_APPFONT ( 198 , 73 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Left = TRUE ; @@ -153,6 +158,7 @@ TabPage TP_NUM_POSITION }; ListBox LB_ALIGN { + HelpID = "sw:ListBox:TP_NUM_POSITION:LB_ALIGN"; Pos = MAP_APPFONT ( 198 , 89 ) ; Size = MAP_APPFONT ( 40 , 40 ) ; TabStop = TRUE ; @@ -172,6 +178,7 @@ TabPage TP_NUM_POSITION }; ListBox LB_LABEL_FOLLOWED_BY { + HelpID = "sw:ListBox:TP_NUM_POSITION:LB_LABEL_FOLLOWED_BY"; Pos = MAP_APPFONT ( 198 , 25 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; TabStop = TRUE ; @@ -192,6 +199,7 @@ TabPage TP_NUM_POSITION }; MetricField MF_LISTTAB { + HelpID = "sw:MetricField:TP_NUM_POSITION:MF_LISTTAB"; Pos = MAP_APPFONT ( 198 , 41 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -215,6 +223,7 @@ TabPage TP_NUM_POSITION }; ListBox LB_ALIGN_2 { + HelpID = "sw:ListBox:TP_NUM_POSITION:LB_ALIGN_2"; Pos = MAP_APPFONT ( 198 , 57 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; TabStop = TRUE ; @@ -228,6 +237,7 @@ TabPage TP_NUM_POSITION }; MetricField MF_ALIGNED_AT { + HelpID = "sw:MetricField:TP_NUM_POSITION:MF_ALIGNED_AT"; Pos = MAP_APPFONT ( 198 , 73 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Left = TRUE ; @@ -252,6 +262,7 @@ TabPage TP_NUM_POSITION }; MetricField MF_INDENT_AT { + HelpID = "sw:MetricField:TP_NUM_POSITION:MF_INDENT_AT"; Pos = MAP_APPFONT ( 198 , 89 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Left = TRUE ; @@ -270,6 +281,7 @@ TabPage TP_NUM_POSITION }; PushButton PB_STANDARD { + HelpID = "sw:PushButton:TP_NUM_POSITION:PB_STANDARD"; Pos = MAP_APPFONT ( 198 , 165 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "Default" ; diff --git a/sw/source/ui/misc/outline.src b/sw/source/ui/misc/outline.src index 64dd97494a..f54025127d 100644 --- a/sw/source/ui/misc/outline.src +++ b/sw/source/ui/misc/outline.src @@ -65,6 +65,7 @@ ModalDialog DLG_NUM_NAMES }; ListBox LB_FORM { + HelpID = "sw:ListBox:DLG_NUM_NAMES:LB_FORM"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 29 ) ; Size = MAP_APPFONT ( 84 , 42 ) ; @@ -85,6 +86,7 @@ ModalDialog DLG_NUM_NAMES }; Edit ED_FORM { + HelpID = "sw:Edit:DLG_NUM_NAMES:ED_FORM"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 84 , 12 ) ; @@ -211,6 +213,7 @@ TabPage TP_OUTLINE_NUM Hide = TRUE; ListBox LB_LEVEL { + HelpID = "sw:ListBox:TP_OUTLINE_NUM:LB_LEVEL"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 23 , 129 ) ; TabStop = TRUE ; @@ -233,6 +236,7 @@ TabPage TP_OUTLINE_NUM }; ListBox LB_COLL { + HelpID = "sw:ListBox:TP_OUTLINE_NUM:LB_COLL"; Border = TRUE ; Pos = MAP_APPFONT ( 50 , 25 ) ; Size = MAP_APPFONT ( 120 , 75 ) ; @@ -251,6 +255,7 @@ TabPage TP_OUTLINE_NUM }; ListBox LB_NUMBER { + HelpID = "sw:ListBox:TP_OUTLINE_NUM:LB_NUMBER"; Pos = MAP_APPFONT ( 104 , 41 ) ; Size = MAP_APPFONT ( 66 , 65 ) ; TabStop = TRUE ; @@ -266,6 +271,7 @@ TabPage TP_OUTLINE_NUM }; ListBox LB_CHARFMT { + HelpID = "sw:ListBox:TP_OUTLINE_NUM:LB_CHARFMT"; TabStop = TRUE ; DropDown = TRUE ; Pos = MAP_APPFONT ( 104 , 57 ) ; @@ -279,6 +285,7 @@ TabPage TP_OUTLINE_NUM }; NumericField NF_ALL_LEVEL { + HelpID = "sw:NumericField:TP_OUTLINE_NUM:NF_ALL_LEVEL"; Border = TRUE ; Pos = MAP_APPFONT ( 104 , 73 ) ; Size = MAP_APPFONT ( 66 , 12 ) ; @@ -308,6 +315,7 @@ TabPage TP_OUTLINE_NUM }; Edit ED_PREFIX { + HelpID = "sw:Edit:TP_OUTLINE_NUM:ED_PREFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 104 , 100 ) ; Size = MAP_APPFONT ( 66 , 12 ) ; @@ -324,6 +332,7 @@ TabPage TP_OUTLINE_NUM }; Edit ED_SUFFIX { + HelpID = "sw:Edit:TP_OUTLINE_NUM:ED_SUFFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 104 , 115 ) ; Size = MAP_APPFONT ( 66 , 12 ) ; @@ -340,6 +349,7 @@ TabPage TP_OUTLINE_NUM }; NumericField ED_START { + HelpID = "sw:NumericField:TP_OUTLINE_NUM:ED_START"; Border = TRUE ; Pos = MAP_APPFONT ( 104 , 131 ) ; Size = MAP_APPFONT ( 66 , 12 ) ; diff --git a/sw/source/ui/misc/pgfnote.src b/sw/source/ui/misc/pgfnote.src index 18acc28267..eebc13ca5d 100644 --- a/sw/source/ui/misc/pgfnote.src +++ b/sw/source/ui/misc/pgfnote.src @@ -35,6 +35,7 @@ TabPage TP_FOOTNOTE_PAGE Hide = TRUE; RadioButton RB_MAXHEIGHT_PAGE { + HelpID = "sw:RadioButton:TP_FOOTNOTE_PAGE:RB_MAXHEIGHT_PAGE"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 132 , 10 ) ; Text [ en-US ] = "~Not larger than page area" ; @@ -43,12 +44,14 @@ TabPage TP_FOOTNOTE_PAGE }; RadioButton RB_MAXHEIGHT { + HelpID = "sw:RadioButton:TP_FOOTNOTE_PAGE:RB_MAXHEIGHT"; Pos = MAP_APPFONT ( 12 , 28 ) ; Size = MAP_APPFONT ( 132 , 10 ) ; Text [ en-US ] = "Maximum footnote ~height" ; }; MetricField ED_MAXHEIGHT { + HelpID = "sw:MetricField:TP_FOOTNOTE_PAGE:ED_MAXHEIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( 148 , 26 ) ; Size = MAP_APPFONT ( 42 , 12 ) ; @@ -75,6 +78,7 @@ TabPage TP_FOOTNOTE_PAGE }; MetricField ED_DIST { + HelpID = "sw:MetricField:TP_FOOTNOTE_PAGE:ED_DIST"; Border = TRUE ; Pos = MAP_APPFONT ( 148 , 42 ) ; Size = MAP_APPFONT ( 42 , 12 ) ; @@ -105,6 +109,7 @@ TabPage TP_FOOTNOTE_PAGE }; ListBox DLB_LINEPOS { + HelpID = "sw:ListBox:TP_FOOTNOTE_PAGE:DLB_LINEPOS"; Pos = MAP_APPFONT ( 148 , 71 ) ; Size = MAP_APPFONT ( 57 , 40 ) ; TabStop = TRUE ; @@ -128,6 +133,7 @@ TabPage TP_FOOTNOTE_PAGE }; ListBox DLB_LINETYPE { + HelpID = "sw:ListBox:TP_FOOTNOTE_PAGE:DLB_LINETYPE"; Pos = MAP_APPFONT ( 148 , 87 ) ; Size = MAP_APPFONT ( 57 , 50 ) ; TabStop = TRUE ; @@ -145,6 +151,7 @@ TabPage TP_FOOTNOTE_PAGE }; MetricField ED_LINEWIDTH { + HelpID = "sw:MetricField:TP_FOOTNOTE_PAGE:ED_LINEWIDTH"; Border = TRUE ; Pos = MAP_APPFONT ( 148 , 103 ) ; Size = MAP_APPFONT ( 42 , 12 ) ; @@ -168,6 +175,7 @@ TabPage TP_FOOTNOTE_PAGE }; MetricField ED_LINEDIST { + HelpID = "sw:MetricField:TP_FOOTNOTE_PAGE:ED_LINEDIST"; Border = TRUE ; Pos = MAP_APPFONT ( 148 , 119 ) ; Size = MAP_APPFONT ( 42 , 12 ) ; diff --git a/sw/source/ui/misc/pggrid.src b/sw/source/ui/misc/pggrid.src index a6377dd25f..f660772415 100644 --- a/sw/source/ui/misc/pggrid.src +++ b/sw/source/ui/misc/pggrid.src @@ -41,24 +41,28 @@ TabPage TP_TEXTGRID_PAGE }; RadioButton RB_NOGRID { + HelpID = "sw:RadioButton:TP_TEXTGRID_PAGE:RB_NOGRID"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 158 , 10 ) ; Text [ en-US ] = "No grid" ; }; RadioButton RB_LINESGRID { + HelpID = "sw:RadioButton:TP_TEXTGRID_PAGE:RB_LINESGRID"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 158 , 10 ) ; Text [ en-US ] = "Grid (lines only)" ; }; RadioButton RB_CHARSGRID { + HelpID = "sw:RadioButton:TP_TEXTGRID_PAGE:RB_CHARSGRID"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 158 , 10 ) ; Text [ en-US ] = "Grid (lines and characters)" ; }; CheckBox CB_SNAPTOCHARS { + HelpID = "sw:CheckBox:TP_TEXTGRID_PAGE:CB_SNAPTOCHARS"; Pos = MAP_APPFONT ( 14 , 53 ) ; Size = MAP_APPFONT ( 158 , 10 ) ; Text [ en-US ] = "~Snap to characters" ; @@ -83,6 +87,7 @@ TabPage TP_TEXTGRID_PAGE }; NumericField NF_LINESPERPAGE { + HelpID = "sw:NumericField:TP_TEXTGRID_PAGE:NF_LINESPERPAGE"; Pos = MAP_APPFONT ( 74 , 80 ) ; Size = MAP_APPFONT ( 25 , 12 ) ; Border = TRUE ; @@ -111,6 +116,7 @@ TabPage TP_TEXTGRID_PAGE }; MetricField MF_TEXTSIZE { + HelpID = "sw:MetricField:TP_TEXTGRID_PAGE:MF_TEXTSIZE"; Pos = MAP_APPFONT ( 216 , 80 ) ; Size = MAP_APPFONT ( 35 , 12 ) ; Border = TRUE ; @@ -134,6 +140,7 @@ TabPage TP_TEXTGRID_PAGE }; NumericField NF_CHARSPERLINE { + HelpID = "sw:NumericField:TP_TEXTGRID_PAGE:NF_CHARSPERLINE"; Pos = MAP_APPFONT ( 74 , 96 ) ; Size = MAP_APPFONT ( 25 , 12 ) ; Border = TRUE ; @@ -157,6 +164,7 @@ TabPage TP_TEXTGRID_PAGE }; MetricField MF_CHARWIDTH { + HelpID = "sw:MetricField:TP_TEXTGRID_PAGE:MF_CHARWIDTH"; Pos = MAP_APPFONT ( 216 , 96 ) ; Size = MAP_APPFONT ( 35 , 12 ) ; Border = TRUE ; @@ -186,6 +194,7 @@ TabPage TP_TEXTGRID_PAGE }; MetricField MF_RUBYSIZE { + HelpID = "sw:MetricField:TP_TEXTGRID_PAGE:MF_RUBYSIZE"; Pos = MAP_APPFONT ( 216 , 96 ) ; Size = MAP_APPFONT ( 35 , 12 ) ; Border = TRUE ; @@ -203,6 +212,7 @@ TabPage TP_TEXTGRID_PAGE }; CheckBox CB_RUBYBELOW { + HelpID = "sw:CheckBox:TP_TEXTGRID_PAGE:CB_RUBYBELOW"; Pos = MAP_APPFONT ( 14 , 112 ) ; Size = MAP_APPFONT ( 237 , 10 ) ; Text [ en-US ] = "Ruby text below/left from base text" ; @@ -215,12 +225,14 @@ TabPage TP_TEXTGRID_PAGE }; CheckBox CB_DISPLAY { + HelpID = "sw:CheckBox:TP_TEXTGRID_PAGE:CB_DISPLAY"; Pos = MAP_APPFONT ( 12 , 139 ) ; Size = MAP_APPFONT ( 118 , 10 ) ; Text [ en-US ] = "Display grid" ; }; CheckBox CB_PRINT { + HelpID = "sw:CheckBox:TP_TEXTGRID_PAGE:CB_PRINT"; Pos = MAP_APPFONT ( 18 , 154 ) ; Size = MAP_APPFONT ( 112 , 10 ) ; Text [ en-US ] = "Print grid" ; @@ -233,6 +245,7 @@ TabPage TP_TEXTGRID_PAGE }; ListBox LB_COLOR { + HelpID = "sw:ListBox:TP_TEXTGRID_PAGE:LB_COLOR"; Pos = MAP_APPFONT ( 191 , 137 ) ; Size = MAP_APPFONT ( 60 , 50 ) ; TabStop = TRUE; diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx index 2752bbfb38..19dbdf2f8b 100644 --- a/sw/source/ui/misc/redlndlg.cxx +++ b/sw/source/ui/misc/redlndlg.cxx @@ -223,7 +223,7 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, BOOL bAutoFmt) : pActLB->SelectEntryPos(0); - pTable->SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); + pTable->SetStyle(pTable->GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL); pTable->SetNodeDefaultImages(); pTable->SetSelectionMode(MULTIPLE_SELECTION); pTable->SetHighlightRange(1); diff --git a/sw/source/ui/misc/srtdlg.src b/sw/source/ui/misc/srtdlg.src index 8a1eb3a3ee..ddacdac459 100644 --- a/sw/source/ui/misc/srtdlg.src +++ b/sw/source/ui/misc/srtdlg.src @@ -32,7 +32,7 @@ ModalDialog DLG_SORTING { - HelpID = FN_SORTING_DLG ; + HelpID = CMD_FN_SORTING_DLG ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 268 , 193 ) ; @@ -80,6 +80,7 @@ ModalDialog DLG_SORTING }; CheckBox CB_KEY1 { + HelpID = "sw:CheckBox:DLG_SORTING:CB_KEY1"; Pos = MAP_APPFONT ( 12 , 25 ) ; Size = MAP_APPFONT ( 49 , 8 ) ; /* ### ACHTUNG: Neuer Text in Resource? Schlüssel ~1 : Schl³ssel ~1 */ @@ -88,6 +89,7 @@ ModalDialog DLG_SORTING }; NumericField ED_KEY1 { + HelpID = "sw:NumericField:DLG_SORTING:ED_KEY1"; Border = TRUE ; Pos = MAP_APPFONT ( 66 , 23 ) ; Size = MAP_APPFONT ( 25 , 12 ) ; @@ -109,6 +111,7 @@ ModalDialog DLG_SORTING }; ListBox DLB_KEY1 { + HelpID = "sw:ListBox:DLG_SORTING:DLB_KEY1"; Pos = MAP_APPFONT ( 96 , 23 ) ; Size = MAP_APPFONT ( 55 , 45 ) ; TabStop = TRUE ; @@ -118,6 +121,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_UP { + HelpID = "sw:RadioButton:DLG_SORTING:RB_UP"; Pos = MAP_APPFONT ( 155 , 23 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "~Ascending" ; @@ -126,6 +130,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_DN { + HelpID = "sw:RadioButton:DLG_SORTING:RB_DN"; Pos = MAP_APPFONT ( 155 , 35 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "~Descending" ; @@ -133,6 +138,7 @@ ModalDialog DLG_SORTING }; CheckBox CB_KEY2 { + HelpID = "sw:CheckBox:DLG_SORTING:CB_KEY2"; Pos = MAP_APPFONT ( 12 , 52 ) ; Size = MAP_APPFONT ( 49 , 8 ) ; /* ### ACHTUNG: Neuer Text in Resource? Schlüssel ~2 : Schl³ssel ~2 */ @@ -140,6 +146,7 @@ ModalDialog DLG_SORTING }; NumericField ED_KEY2 { + HelpID = "sw:NumericField:DLG_SORTING:ED_KEY2"; Border = TRUE ; Pos = MAP_APPFONT ( 66 , 50 ) ; Size = MAP_APPFONT ( 25 , 12 ) ; @@ -156,6 +163,7 @@ ModalDialog DLG_SORTING }; ListBox DLB_KEY2 { + HelpID = "sw:ListBox:DLG_SORTING:DLB_KEY2"; Pos = MAP_APPFONT ( 96 , 50 ) ; Size = MAP_APPFONT ( 55 , 45 ) ; TabStop = TRUE ; @@ -165,6 +173,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_UP2 { + HelpID = "sw:RadioButton:DLG_SORTING:RB_UP2"; Pos = MAP_APPFONT ( 155 , 50 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "Ascending" ; @@ -173,6 +182,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_DN2 { + HelpID = "sw:RadioButton:DLG_SORTING:RB_DN2"; Pos = MAP_APPFONT ( 155 , 62 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "Descending" ; @@ -180,6 +190,7 @@ ModalDialog DLG_SORTING }; CheckBox CB_KEY3 { + HelpID = "sw:CheckBox:DLG_SORTING:CB_KEY3"; Pos = MAP_APPFONT ( 12 , 81 ) ; Size = MAP_APPFONT ( 49 , 8 ) ; /* ### ACHTUNG: Neuer Text in Resource? Schlüssel ~3 : Schl³ssel ~3 */ @@ -187,6 +198,7 @@ ModalDialog DLG_SORTING }; NumericField ED_KEY3 { + HelpID = "sw:NumericField:DLG_SORTING:ED_KEY3"; Border = TRUE ; Pos = MAP_APPFONT ( 66 , 79 ) ; Size = MAP_APPFONT ( 25 , 12 ) ; @@ -203,6 +215,7 @@ ModalDialog DLG_SORTING }; ListBox DLB_KEY3 { + HelpID = "sw:ListBox:DLG_SORTING:DLB_KEY3"; Pos = MAP_APPFONT ( 96 , 79 ) ; Size = MAP_APPFONT ( 55 , 45 ) ; TabStop = TRUE ; @@ -212,6 +225,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_UP3 { + HelpID = "sw:RadioButton:DLG_SORTING:RB_UP3"; Pos = MAP_APPFONT ( 155 , 79 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "Ascending" ; @@ -220,6 +234,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_DN3 { + HelpID = "sw:RadioButton:DLG_SORTING:RB_DN3"; Pos = MAP_APPFONT ( 155 , 91 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "Descending" ; @@ -233,6 +248,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_COL { + HelpID = "sw:RadioButton:DLG_SORTING:RB_COL"; Pos = MAP_APPFONT ( 12 , 120 ) ; Size = MAP_APPFONT ( 38 , 10 ) ; Text [ en-US ] = "Col~umns" ; @@ -240,6 +256,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_ROW { + HelpID = "sw:RadioButton:DLG_SORTING:RB_ROW"; Pos = MAP_APPFONT ( 12 , 133 ) ; Size = MAP_APPFONT ( 34 , 10 ) ; Text [ en-US ] = "~Rows" ; @@ -254,6 +271,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_TAB { + HelpID = "sw:RadioButton:DLG_SORTING:RB_TAB"; Pos = MAP_APPFONT ( 113 , 120 ) ; Size = MAP_APPFONT ( 44 , 9 ) ; Text [ en-US ] = "~Tabs" ; @@ -262,6 +280,7 @@ ModalDialog DLG_SORTING }; RadioButton RB_TABCH { + HelpID = "sw:RadioButton:DLG_SORTING:RB_TABCH"; Pos = MAP_APPFONT ( 113 , 133 ) ; Size = MAP_APPFONT ( 38 , 10 ) ; Text [ en-US ] = "~Character" ; @@ -269,6 +288,7 @@ ModalDialog DLG_SORTING }; Edit ED_TABCH { + HelpID = "sw:Edit:DLG_SORTING:ED_TABCH"; Border = TRUE ; Pos = MAP_APPFONT ( 180 , 133 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; @@ -291,6 +311,7 @@ ModalDialog DLG_SORTING }; PushButton PB_DELIM { + HelpID = "sw:PushButton:DLG_SORTING:PB_DELIM"; Pos = MAP_APPFONT ( 195 , 133 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; TabStop = TRUE ; @@ -304,6 +325,7 @@ ModalDialog DLG_SORTING }; ListBox LB_LANG { + HelpID = "sw:ListBox:DLG_SORTING:LB_LANG"; Pos = MAP_APPFONT ( 12 , 158 ) ; Size = MAP_APPFONT ( 83 , 61 ) ; TabStop = TRUE ; @@ -318,6 +340,7 @@ ModalDialog DLG_SORTING }; CheckBox CB_CASE { + HelpID = "sw:CheckBox:DLG_SORTING:CB_CASE"; Pos = MAP_APPFONT ( 113 , 159 ) ; Size = MAP_APPFONT ( 147 , 10 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx index 899e877be0..27b7d30a2b 100644..100755 --- a/sw/source/ui/ribbar/inputwin.cxx +++ b/sw/source/ui/ribbar/inputwin.cxx @@ -80,6 +80,8 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind ) bActive = bIsTable = bDelSel = bResetUndo = bCallUndo = FALSE; FreeResource(); + + aEdit.SetSizePixel( aEdit.CalcMinimumSize() ); SfxImageManager* pManager = SfxImageManager::GetImageManager( SW_MOD() ); pManager->RegisterToolBox(this); @@ -101,16 +103,23 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind ) SetDropdownClickHdl( LINK( this, SwInputWindow, DropdownClickHdl )); Size aSizeTbx = CalcWindowSizePixel(); + Size aEditSize = aEdit.GetSizePixel(); + Rectangle aItemRect( GetItemRect(FN_FORMULA_CALC) ); + long nMaxHeight = (aEditSize.Height() > aItemRect.GetHeight()) ? aEditSize.Height() : aItemRect.GetHeight(); + if( nMaxHeight+2 > aSizeTbx.Height() ) + aSizeTbx.Height() = nMaxHeight+2; Size aSize = GetSizePixel(); aSize.Height() = aSizeTbx.Height(); SetSizePixel( aSize ); - Size aPosSize = aPos.GetSizePixel(); - Size aEditSize = aEdit.GetSizePixel(); - aPosSize.Height() = aEditSize.Height() = GetItemRect(FN_FORMULA_CALC).GetHeight() - 2; - Point aPosPos = aPos.GetPosPixel(); - Point aEditPos= aEdit.GetPosPixel(); - aPosPos.Y() = aEditPos.Y() = GetItemRect( FN_FORMULA_CALC ).TopLeft().Y() + 1; + // align edit and item vcentered + Size aPosSize = aPos.GetSizePixel(); + aPosSize.Height() = nMaxHeight; + aEditSize.Height() = nMaxHeight; + Point aPosPos = aPos.GetPosPixel(); + Point aEditPos = aEdit.GetPosPixel(); + aPosPos.Y() = (aSize.Height() - nMaxHeight)/2 + 1; + aEditPos.Y() = (aSize.Height() - nMaxHeight)/2 + 1; aPos.SetPosSizePixel( aPosPos, aPosSize ); aEdit.SetPosSizePixel( aEditPos, aEditSize ); diff --git a/sw/source/ui/ribbar/inputwin.src b/sw/source/ui/ribbar/inputwin.src index e8f8fa58f5..24ae9a48bc 100644 --- a/sw/source/ui/ribbar/inputwin.src +++ b/sw/source/ui/ribbar/inputwin.src @@ -44,7 +44,7 @@ ToolBox RID_TBX_FORMULA ToolBoxItem { Identifier = FN_FORMULA_CALC ; - HelpID = FN_FORMULA_CALC ; + HelpId = HID_TBX_FORMULA_CALC ; DropDown = TRUE ; Text [ en-US ] = "Formula" ; /* ### ACHTUNG: Neuer Text in Resource? Formel auswählen : Formel auswõhlen */ @@ -52,14 +52,14 @@ ToolBox RID_TBX_FORMULA ToolBoxItem { Identifier = FN_FORMULA_CANCEL ; - HelpID = FN_FORMULA_CANCEL ; + HelpId = HID_TBX_FORMULA_CANCEL ; Text [ en-US ] = "Cancel" ; /* ### ACHTUNG: Neuer Text in Resource? Formel nicht übenehmen : Formel nicht ³benehmen */ }; ToolBoxItem { Identifier = FN_FORMULA_APPLY ; - HelpID = FN_FORMULA_APPLY ; + HelpId = HID_TBX_FORMULA_APPLY ; /* ### ACHTUNG: Neuer Text in Resource? Übernehmen : šbernehmen */ Text [ en-US ] = "Apply" ; /* ### ACHTUNG: Neuer Text in Resource? Formel einfügen : Formel einf³gen */ @@ -287,21 +287,21 @@ String STR_TBL_FORMULA ToolBoxItem\ {\ Identifier = FN_FORMULA_CALC ; \ - HelpID = FN_FORMULA_CALC ; \ + HelpID = HID_TBX_FORMULA_CALC ; \ Text [ en-US ] = "Formula" ; \ /* ### ACHTUNG: Neuer Text in Resource? Formel auswählen : Formel auswõhlen */\ };\ ToolBoxItem\ {\ Identifier = FN_FORMULA_CANCEL ; \ - HelpID = FN_FORMULA_CANCEL ; \ + HelpId = HID_TBX_FORMULA_CANCEL ; \ Text [ en-US ] = "Cancel" ; \ /* ### ACHTUNG: Neuer Text in Resource? Formel nicht übenehmen : Formel nicht ³benehmen */\ };\ ToolBoxItem\ {\ Identifier = FN_FORMULA_APPLY ; \ - HelpID = FN_FORMULA_APPLY ; \ + HelpID = HID_TBX_FORMULA_APPLY ; \ /* ### ACHTUNG: Neuer Text in Resource? Übernehmen : šbernehmen */\ Text [ en-US ] = "Apply" ; \ /* ### ACHTUNG: Neuer Text in Resource? Formel einfügen : Formel einf³gen */\ diff --git a/sw/source/ui/ribbar/makefile.mk b/sw/source/ui/ribbar/makefile.mk deleted file mode 100644 index 13e3600aa8..0000000000 --- a/sw/source/ui/ribbar/makefile.mk +++ /dev/null @@ -1,69 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=ribbar - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - tbxanchr.src \ - inputwin.src \ - tblctrl.src \ - workctrl.src - -EXCEPTIONSFILES = \ - $(SLO)$/conarc.obj \ - $(SLO)$/concustomshape.obj \ - $(SLO)$/conform.obj \ - $(SLO)$/conpoly.obj \ - $(SLO)$/conrect.obj \ - $(SLO)$/drawbase.obj \ - $(SLO)$/dselect.obj \ - $(SLO)$/inputwin.obj \ - $(SLO)$/tblctrl.obj \ - $(SLO)$/tbxanchr.obj \ - $(SLO)$/workctrl.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - -$(SRS)$/ribbar.srs: $(SOLARINCDIR)$/svx$/globlmn.hrc - diff --git a/sw/source/ui/ribbar/tblctrl.src b/sw/source/ui/ribbar/tblctrl.src deleted file mode 100644 index afc5949983..0000000000 --- a/sw/source/ui/ribbar/tblctrl.src +++ /dev/null @@ -1,94 +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 "tblctrl.hrc" -#include "helpid.h" -#include "cmdid.h" -FloatingWindow RID_TBL_OPT_CTRL -{ - Moveable = TRUE ; - Closeable = TRUE ; - Hide = TRUE ; - SVLook = TRUE ; - HelpID = HID_TBL_OPT_CTRL ; - ToolBox TBX_OPTIMIZE_TABLE - { - MenuStrings = TRUE ; - SVLook = TRUE ; - HelpID = 1 ; - ItemList = - { - ToolBoxItem - { - Identifier = FN_TABLE_BALANCE_CELLS ; - HelpID = FN_TABLE_BALANCE_CELLS ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_BALANCE_ROWS ; - HelpID = FN_TABLE_BALANCE_ROWS ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_OPTIMAL_HEIGHT ; - HelpID = FN_TABLE_OPTIMAL_HEIGHT ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_ADJUST_CELLS ; - HelpID = FN_TABLE_ADJUST_CELLS ; - }; - }; - }; - Text [ en-US ] = "Optimize" ; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx index bac4704603..a4891f98cb 100644 --- a/sw/source/ui/ribbar/workctrl.cxx +++ b/sw/source/ui/ribbar/workctrl.cxx @@ -376,7 +376,7 @@ static USHORT const aNavigationInsertIds[ NAVI_ENTRIES ] = NID_TABLE_FORMULA_ERROR, NID_NEXT }; -static USHORT const aNavigationHelpIds[ NAVI_ENTRIES ] = +static const char* aNavigationHelpIds[ NAVI_ENTRIES ] = { // -- first line HID_NID_TBL, diff --git a/sw/source/ui/ribbar/workctrl.src b/sw/source/ui/ribbar/workctrl.src index 74b0fa42cb..03d97b49c1 100644 --- a/sw/source/ui/ribbar/workctrl.src +++ b/sw/source/ui/ribbar/workctrl.src @@ -32,138 +32,9 @@ #include <svx/globlmn.hrc> #endif #include "workctrl.hrc" -#include "workctrl.hrc" #include "helpid.h" #include "cmdid.h" -FloatingWindow RID_INSERT_CTRL -{ - Moveable = TRUE ; - Closeable = TRUE ; - Hide = TRUE ; - SVLook = TRUE ; - HelpID = HID_INSERT_CTRL ; - /* ### ACHTUNG: Neuer Text in Resource? Einfügen : Einf³gen */ - ToolBox TBX_INSERT - { - MenuStrings = TRUE ; - SVLook = TRUE ; - HelpID = 1 ; - ItemList = - { - ToolBoxItem - { - Identifier = FN_INSERT_FRAME_INTERACT_NOCOL ; - HelpID = FN_INSERT_FRAME_INTERACT_NOCOL ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_FRAME_INTERACT ; - HelpID = FN_INSERT_FRAME_INTERACT ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = SID_INSERT_GRAPHIC ; - HelpID = SID_INSERT_GRAPHIC ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_TABLE ; - HelpID = FN_INSERT_TABLE ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = SID_INSERTDOC ; - HelpID = SID_INSERTDOC ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_FOOTNOTE ; - HelpID = FN_INSERT_FOOTNOTE ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_ENDNOTE ; - HelpID = FN_INSERT_ENDNOTE ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_SYMBOL ; - HelpID = FN_INSERT_SYMBOL ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_REGION ; - HelpID = FN_INSERT_REGION; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_IDX_ENTRY_DLG ; - HelpID = FN_INSERT_IDX_ENTRY_DLG ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_BOOKMARK ; - HelpID = FN_INSERT_BOOKMARK ; - RadioCheck = TRUE ; - }; - }; - }; - Text [ en-US ] = "Insert" ; -}; -FloatingWindow RID_INSERT_OBJ_CTRL -{ - Moveable = TRUE ; - Closeable = TRUE ; - Hide = TRUE ; - SVLook = TRUE ; - HelpID = HID_INSERT_OBJ_CTRL ; - /* ### ACHTUNG: Neuer Text in Resource? Objekt einfügen : Objekt einf³gen */ - ToolBox TBX_OBJ_INSERT - { - MenuStrings = TRUE ; - SVLook = TRUE ; - HelpID = 1 ; - ItemList = - { - ToolBoxItem - { - Identifier = SID_INSERT_DIAGRAM ; - HelpID = SID_INSERT_DIAGRAM ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_SMA ; - HelpID = FN_INSERT_SMA ; - }; - ToolBoxItem - { - Identifier = SID_INSERT_FLOATINGFRAME ; - HelpID = SID_INSERT_FLOATINGFRAME ; - }; - ToolBoxItem - { - Identifier = SID_INSERT_OBJECT ; - HelpID = SID_INSERT_OBJECT ; - }; - ToolBoxItem - { - Identifier = SID_INSERT_PLUGIN ; - HelpID = SID_INSERT_PLUGIN ; - }; -#ifdef SOLAR_JAVA - ToolBoxItem - { - Identifier = SID_INSERT_APPLET ; - HelpID = SID_INSERT_APPLET ; - }; -#endif - }; - }; - Text [ en-US ] = "Insert Object" ; -}; + Menu RID_INSERT_FIELD_CTRL { ItemList = @@ -171,43 +42,43 @@ Menu RID_INSERT_FIELD_CTRL MenuItem { Identifier = FN_INSERT_FLD_DATE ; - HelpID = FN_INSERT_FLD_DATE ; + HelpId = CMD_FN_INSERT_FLD_DATE ; Text [ en-US ] = "Date" ; }; MenuItem { Identifier = FN_INSERT_FLD_TIME ; - HelpID = FN_INSERT_FLD_TIME ; + HelpId = CMD_FN_INSERT_FLD_TIME ; Text [ en-US ] = "Time" ; }; MenuItem { Identifier = FN_INSERT_FLD_PGNUMBER ; - HelpID = FN_INSERT_FLD_PGNUMBER ; + HelpId = CMD_FN_INSERT_FLD_PGNUMBER ; Text [ en-US ] = "Page Number" ; }; MenuItem { Identifier = FN_INSERT_FLD_PGCOUNT ; - HelpID = FN_INSERT_FLD_PGCOUNT ; + HelpId = CMD_FN_INSERT_FLD_PGCOUNT ; Text [ en-US ] = "Page Count" ; }; MenuItem { Identifier = FN_INSERT_FLD_TOPIC ; - HelpID = FN_INSERT_FLD_TOPIC ; + HelpId = CMD_FN_INSERT_FLD_TOPIC ; Text [ en-US ] = "Subject" ; }; MenuItem { Identifier = FN_INSERT_FLD_TITLE ; - HelpID = FN_INSERT_FLD_TITLE ; + HelpId = CMD_FN_INSERT_FLD_TITLE ; Text [ en-US ] = "Title" ; }; MenuItem { Identifier = FN_INSERT_FLD_AUTHOR ; - HelpID = FN_INSERT_FLD_AUTHOR ; + HelpId = CMD_FN_INSERT_FLD_AUTHOR ; Text [ en-US ] = "Author" ; }; MenuItem @@ -217,7 +88,7 @@ Menu RID_INSERT_FIELD_CTRL MenuItem { Identifier = FN_INSERT_FIELD ; - HelpID = FN_INSERT_FIELD ; + HelpId = CMD_FN_INSERT_FIELD ; Text [ en-US ] = "Other..." ; }; }; @@ -310,7 +181,7 @@ FloatingWindow RID_SCROLL_NAVIGATION_WIN }; String ST_OUTL { - /* ### ACHTUNG: Neuer Text in Resource? Überschrift : šberschrift */ + /* ### ACHTUNG: Neuer Text in Resource? �berschrift : �berschrift */ Text [ en-US ] = "Headings" ; }; String ST_SEL @@ -319,7 +190,7 @@ FloatingWindow RID_SCROLL_NAVIGATION_WIN }; String ST_FTN { - /* ### ACHTUNG: Neuer Text in Resource? Fußnote : Fu˜note */ + /* ### ACHTUNG: Neuer Text in Resource? Fu�note : Fu�note */ Text [ en-US ] = "Footnote" ; }; String ST_MARK @@ -361,72 +232,72 @@ String STR_IMGBTN_PREV_DOWN }; String STR_IMGBTN_TBL_DOWN { - /* ### ACHTUNG: Neuer Text in Resource? Nächste Tabelle : Nõchste Tabelle */ + /* ### ACHTUNG: Neuer Text in Resource? N�chste Tabelle : N�chste Tabelle */ Text [ en-US ] = "Next table" ; }; String STR_IMGBTN_FRM_DOWN { - /* ### ACHTUNG: Neuer Text in Resource? Nächster Textrahmen : Nõchster Textrahmen */ + /* ### ACHTUNG: Neuer Text in Resource? N�chster Textrahmen : N�chster Textrahmen */ Text [ en-US ] = "Next text frame" ; }; String STR_IMGBTN_PGE_DOWN { - /* ### ACHTUNG: Neuer Text in Resource? Nächste Seite : Nõchste Seite */ + /* ### ACHTUNG: Neuer Text in Resource? N�chste Seite : N�chste Seite */ Text [ en-US ] = "Next page" ; }; String STR_IMGBTN_DRW_DOWN { - /* ### ACHTUNG: Neuer Text in Resource? Nächstes Zeichenobjekt : Nõchstes Zeichenobjekt */ + /* ### ACHTUNG: Neuer Text in Resource? N�chstes Zeichenobjekt : N�chstes Zeichenobjekt */ Text [ en-US ] = "Next drawing" ; }; String STR_IMGBTN_CTRL_DOWN { - /* ### ACHTUNG: Neuer Text in Resource? Nächstes Kontrollfeld : Nõchstes Kontrollfeld */ + /* ### ACHTUNG: Neuer Text in Resource? N�chstes Kontrollfeld : N�chstes Kontrollfeld */ Text [ en-US ] = "Next control" ; }; String STR_IMGBTN_REG_DOWN { - /* ### ACHTUNG: Neuer Text in Resource? Nächster Bereich : Nõchster Bereich */ + /* ### ACHTUNG: Neuer Text in Resource? N�chster Bereich : N�chster Bereich */ Text [ en-US ] = "Next section" ; }; String STR_IMGBTN_BKM_DOWN { - /* ### ACHTUNG: Neuer Text in Resource? Nächste Textmarke : Nõchste Textmarke */ + /* ### ACHTUNG: Neuer Text in Resource? N�chste Textmarke : N�chste Textmarke */ Text [ en-US ] = "Next bookmark" ; }; String STR_IMGBTN_GRF_DOWN { - /* ### ACHTUNG: Neuer Text in Resource? Nächste Grafik : Nõchste Grafik */ + /* ### ACHTUNG: Neuer Text in Resource? N�chste Grafik : N�chste Grafik */ Text [ en-US ] = "Next graphic" ; }; String STR_IMGBTN_OLE_DOWN { - /* ### ACHTUNG: Neuer Text in Resource? Nächstes OLE-Objekt : Nõchstes OLE-Objekt */ + /* ### ACHTUNG: Neuer Text in Resource? N�chstes OLE-Objekt : N�chstes OLE-Objekt */ Text [ en-US ] = "Next OLE object" ; }; String STR_IMGBTN_OUTL_DOWN { - /* ### ACHTUNG: Neuer Text in Resource? Nächste Überschrift : Nõchste šberschrift */ + /* ### ACHTUNG: Neuer Text in Resource? N�chste �berschrift : N�chste �berschrift */ Text [ en-US ] = "Next heading" ; }; String STR_IMGBTN_SEL_DOWN { - /* ### ACHTUNG: Neuer Text in Resource? Nächste Markierung : Nõchste Markierung */ + /* ### ACHTUNG: Neuer Text in Resource? N�chste Markierung : N�chste Markierung */ Text [ en-US ] = "Next selection" ; }; String STR_IMGBTN_FTN_DOWN { - /* ### ACHTUNG: Neuer Text in Resource? Nächste Fußnote : Nõchste Fu˜note */ + /* ### ACHTUNG: Neuer Text in Resource? N�chste Fu�note : N�chste Fu�note */ Text [ en-US ] = "Next footnote" ; }; String STR_IMGBTN_MARK_DOWN { - /* ### ACHTUNG: Neuer Text in Resource? Nächster Merker : Nõchster Merker */ + /* ### ACHTUNG: Neuer Text in Resource? N�chster Merker : N�chster Merker */ Text [ en-US ] = "Next Reminder" ; }; String STR_IMGBTN_POSTIT_DOWN { - /* ### ACHTUNG: Neuer Text in Resource? Nächste Notiz : Nõchste Notiz */ + /* ### ACHTUNG: Neuer Text in Resource? N�chste Notiz : N�chste Notiz */ Text [ en-US ] = "Next Note" ; }; String STR_IMGBTN_SRCH_REP_DOWN @@ -484,7 +355,7 @@ String STR_IMGBTN_OLE_UP }; String STR_IMGBTN_OUTL_UP { - /* ### ACHTUNG: Neuer Text in Resource? Vorige Überschrift : Vorige šberschrift */ + /* ### ACHTUNG: Neuer Text in Resource? Vorige �berschrift : Vorige �berschrift */ Text [ en-US ] = "Previous heading" ; }; String STR_IMGBTN_SEL_UP @@ -493,7 +364,7 @@ String STR_IMGBTN_SEL_UP }; String STR_IMGBTN_FTN_UP { - /* ### ACHTUNG: Neuer Text in Resource? Vorige Fußnote : Vorige Fu˜note */ + /* ### ACHTUNG: Neuer Text in Resource? Vorige Fu�note : Vorige Fu�note */ Text [ en-US ] = "Previous footnote" ; }; String STR_IMGBTN_MARK_UP diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx index 56742b7220..0f1feccc21 100644 --- a/sw/source/ui/shells/annotsh.cxx +++ b/sw/source/ui/shells/annotsh.cxx @@ -116,6 +116,7 @@ #include <editeng/editview.hxx> #include <svl/languageoptions.hxx> +#include <editeng/langitem.hxx> #include <svtools/langtab.hxx> #include <docsh.hxx> @@ -1006,7 +1007,6 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq) case FN_REPLY: case FN_POSTIT: case FN_DELETE_COMMENT: - case FN_DELETE_NOTE: if ( pPostItMgr->HasActiveSidebarWin() ) pPostItMgr->GetActiveSidebarWin()->ExecuteCommand(nSlot); break; @@ -1045,24 +1045,15 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet) switch( nSlotId ) { case FN_POSTIT: - case FN_DELETE_NOTE: case FN_DELETE_NOTE_AUTHOR: case FN_DELETE_ALL_NOTES: case FN_HIDE_NOTE: case FN_HIDE_NOTE_AUTHOR: case FN_HIDE_ALL_NOTES: - { - if ( !pPostItMgr || - !pPostItMgr->HasActiveAnnotationWin() ) - { - rSet.DisableItem(nWhich); - } - break; - } case FN_DELETE_COMMENT: { if ( !pPostItMgr || - !pPostItMgr->HasActiveSidebarWin() /*HasActiveRedCommentWin()*/ ) + !pPostItMgr->HasActiveAnnotationWin() ) { rSet.DisableItem(nWhich); } @@ -1095,7 +1086,7 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet) if (pPostItMgr->HasActiveSidebarWin()) { if ( (pPostItMgr->GetActiveSidebarWin()->IsProtected()) && - ( (nSlotId==FN_DELETE_NOTE) || (nSlotId==FN_REPLY) ) ) + ( (nSlotId==FN_DELETE_COMMENT) || (nSlotId==FN_REPLY) ) ) rSet.DisableItem( nWhich ); } nWhich = aIter.NextWhich(); diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx index 6a0fff08db..20a7600daf 100644 --- a/sw/source/ui/shells/basesh.cxx +++ b/sw/source/ui/shells/basesh.cxx @@ -2,7 +2,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 @@ -1033,6 +1033,14 @@ void SwBaseShell::Execute(SfxRequest &rReq) rSh.SetFlyFrmAttr(aSet); } + // if new anchor is 'as char' and it is a Math object and the usual + // pre-conditions are met then align the formula to the baseline of the text + const uno::Reference < embed::XEmbeddedObject > xObj( rSh.GetOleRef() ); + const bool bDoMathBaselineAlignment = xObj.is() && SotExchange::IsMath( xObj->getClassID() ) + && FLY_AS_CHAR == eSet && rSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ); + if (bDoMathBaselineAlignment) + rSh.AlignFormulaToBaseline( xObj ); + USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); if( nHtmlMode ) { diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx index a876b071e9..3c7ccff56f 100644 --- a/sw/source/ui/shells/drwtxtex.cxx +++ b/sw/source/ui/shells/drwtxtex.cxx @@ -36,8 +36,6 @@ #include <sfx2/bindings.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/request.hxx> -#include <tools/shl.hxx> -#include <svx/svdview.hxx> #include <editeng/spltitem.hxx> #include <editeng/orphitem.hxx> #include <editeng/brkitem.hxx> @@ -48,6 +46,7 @@ #include <editeng/adjitem.hxx> #include <editeng/crsditem.hxx> #include <editeng/shdditem.hxx> +#include <editeng/hyznitem.hxx> #include <editeng/udlnitem.hxx> #include <editeng/fontitem.hxx> #include <editeng/fhgtitem.hxx> @@ -63,13 +62,19 @@ #include <svl/ctloptions.hxx> #include <svtools/langtab.hxx> #include <svl/languageoptions.hxx> +#include <sfx2/bindings.hxx> #include <vcl/msgbox.hxx> +#include <sfx2/dispatch.hxx> +#include <sfx2/request.hxx> #include <editeng/flditem.hxx> #include <editeng/editstat.hxx> +#include <svl/ctloptions.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> @@ -81,6 +86,26 @@ #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> diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx index 66f0b0b402..42fbf71c4f 100644 --- a/sw/source/ui/shells/frmsh.cxx +++ b/sw/source/ui/shells/frmsh.cxx @@ -54,7 +54,7 @@ #include <vcl/msgbox.hxx> // <-- - +#include <doc.hxx> #include <fmturl.hxx> #include <fmtclds.hxx> #include <fmtcnct.hxx> @@ -80,6 +80,7 @@ #include <helpid.h> #include <cmdid.h> +#include <cfgitems.hxx> #include <globals.hrc> #include <popup.hrc> #include <shells.hrc> @@ -547,14 +548,13 @@ void SwFrameShell::Execute(SfxRequest &rReq) SID_HTML_MODE, SID_HTML_MODE, FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME, FN_PARAM_CHAIN_PREVIOUS, FN_PARAM_CHAIN_NEXT, + FN_OLE_IS_MATH, FN_OLE_IS_MATH, + FN_MATH_BASELINE_ALIGNMENT, FN_MATH_BASELINE_ALIGNMENT, 0); const SwViewOption* pVOpt = rSh.GetViewOptions(); if(nSel & nsSelectionType::SEL_OLE) - { - aSet.Put(SfxBoolItem(FN_KEEP_ASPECT_RATIO, - pVOpt->IsKeepRatio())); - } + aSet.Put( SfxBoolItem(FN_KEEP_ASPECT_RATIO, pVOpt->IsKeepRatio()) ); aSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell()))); aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName())); if( nSel & nsSelectionType::SEL_OLE ) @@ -583,6 +583,12 @@ void SwFrameShell::Execute(SfxRequest &rReq) if (rSize.GetHeightPercent() && rSize.GetHeightPercent() != 0xff) rSize.SetHeight(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Height()); + // disable vertical positioning for Math Objects anchored 'as char' if baseline alignment is activated + aSet.Put( SfxBoolItem( FN_MATH_BASELINE_ALIGNMENT, + rSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ) ) ); + const uno::Reference < embed::XEmbeddedObject > xObj( rSh.GetOleRef() ); + aSet.Put( SfxBoolItem( FN_OLE_IS_MATH, xObj.is() && SotExchange::IsMath( xObj->getClassID() ) ) ); + UINT16 nDefPage = 0; if(pArgs && pArgs->GetItemState(FN_FORMAT_FRAME_DLG, FALSE, &pItem) == SFX_ITEM_SET) nDefPage = ((SfxUInt16Item *)pItem)->GetValue(); @@ -841,8 +847,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) case FN_FRAME_ALIGN_HORZ_LEFT: if ( (eFrmType & FRMTYPE_FLY_INCNT) || bProtect || - ((nWhich == FN_FRAME_ALIGN_HORZ_CENTER || nWhich == SID_OBJECT_ALIGN_CENTER) && - bHtmlMode )) + ((nWhich == FN_FRAME_ALIGN_HORZ_CENTER || nWhich == SID_OBJECT_ALIGN_CENTER)&& bHtmlMode) ) rSet.DisableItem( nWhich ); break; case FN_FRAME_ALIGN_VERT_ROW_TOP: @@ -852,7 +857,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) case FN_FRAME_ALIGN_VERT_CHAR_CENTER: case FN_FRAME_ALIGN_VERT_CHAR_BOTTOM: if ( !(eFrmType & FRMTYPE_FLY_INCNT) || bProtect - || (bHtmlMode && FN_FRAME_ALIGN_VERT_CHAR_BOTTOM == nWhich) ) + || (bHtmlMode && FN_FRAME_ALIGN_VERT_CHAR_BOTTOM == nWhich) ) rSet.DisableItem( nWhich ); break; @@ -873,7 +878,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) case FN_FRAME_ALIGN_VERT_TOP: case FN_FRAME_ALIGN_VERT_CENTER: case FN_FRAME_ALIGN_VERT_BOTTOM: - if ( bProtect || (bHtmlMode && eFrmType & FRMTYPE_FLY_ATCNT)) + if ( bProtect || (bHtmlMode && eFrmType & FRMTYPE_FLY_ATCNT) ) rSet.DisableItem( nWhich ); else { diff --git a/sw/source/ui/shells/makefile.mk b/sw/source/ui/shells/makefile.mk deleted file mode 100644 index 26990e7891..0000000000 --- a/sw/source/ui/shells/makefile.mk +++ /dev/null @@ -1,84 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=shells - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - shells.src - -SLOFILES = \ - $(EXCEPTIONSFILES) - -EXCEPTIONSFILES = \ - $(SLO)$/annotsh.obj \ - $(SLO)$/basesh.obj \ - $(SLO)$/beziersh.obj \ - $(SLO)$/drawdlg.obj \ - $(SLO)$/drawsh.obj \ - $(SLO)$/drformsh.obj \ - $(SLO)$/drwbassh.obj \ - $(SLO)$/drwtxtex.obj \ - $(SLO)$/drwtxtsh.obj \ - $(SLO)$/frmsh.obj \ - $(SLO)$/grfsh.obj \ - $(SLO)$/grfshex.obj \ - $(SLO)$/langhelper.obj \ - $(SLO)$/listsh.obj \ - $(SLO)$/navsh.obj \ - $(SLO)$/mediash.obj \ - $(SLO)$/olesh.obj \ - $(SLO)$/slotadd.obj \ - $(SLO)$/tabsh.obj \ - $(SLO)$/textdrw.obj \ - $(SLO)$/textfld.obj \ - $(SLO)$/textglos.obj \ - $(SLO)$/textidx.obj \ - $(SLO)$/textsh.obj \ - $(SLO)$/textsh1.obj \ - $(SLO)$/textsh2.obj \ - $(SLO)$/txtattr.obj \ - $(SLO)$/txtcrsr.obj \ - $(SLO)$/txtnum.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - -$(SRS)$/shells.srs: $(SOLARINCDIR)$/svx$/globlmn.hrc - diff --git a/sw/source/ui/shells/shells.src b/sw/source/ui/shells/shells.src index 42b3b0029a..76b4580800 100644 --- a/sw/source/ui/shells/shells.src +++ b/sw/source/ui/shells/shells.src @@ -156,880 +156,46 @@ String RID_TEXT_TOOLBOX Text [ en-US ] = "Text Object Bar" ; Text [ x-comment ] = " "; }; -ToolBox RID_TEXT_TOOLBOX -{ - HelpID = HID_TEXT_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - HideWhenDeactivate = TRUE ; - LineSpacing = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Hide = TRUE ; - ItemList = - { - MN_TEMPLATE - MN_FONT - MN_TEXT1(TRUE) - MN_TEXT1_BLOCK - MN_TEXT_LTR_RTL - MN_TEXT_LINESPACE - MN_TEXT2 - MN_TEXT_BACKGROUND - MN_TEXT_DIALOGS(TRUE) - }; - Scroll = TRUE ; -}; String RID_TABLE_TOOLBOX { Text [ en-US ] = "Table Object Bar" ; Text [ x-comment ] = " "; }; -ToolBox RID_TABLE_TOOLBOX -{ - HelpID = HID_TABLE_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Hide = TRUE ; - Scroll = TRUE ; - ItemList = - { - MN_TEMPLATE - MN_FONT - ToolBoxItem - { - Identifier = FN_TABLE_AUTOSUM ; - HelpID = FN_TABLE_AUTOSUM ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_MODE_FIX ; - HelpID = FN_TABLE_MODE_FIX ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_MODE_FIX_PROP ; - HelpID = FN_TABLE_MODE_FIX_PROP ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_MODE_VARIABLE ; - HelpID = FN_TABLE_MODE_VARIABLE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_MERGE_CELLS ; - HelpID = FN_TABLE_MERGE_CELLS ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_SPLIT_CELLS ; - HelpID = FN_TABLE_SPLIT_CELLS ; - }; - ToolBoxItem - { - DropDown = TRUE ; - Identifier = FN_OPTIMIZE_TABLE ; - HelpID = FN_OPTIMIZE_TABLE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_INSERT_ROW ; - HelpID = FN_TABLE_INSERT_ROW ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_INSERT_COL ; - HelpID = FN_TABLE_INSERT_COL ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_DELETE_ROW ; - HelpID = FN_TABLE_DELETE_ROW ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_DELETE_COL ; - HelpID = FN_TABLE_DELETE_COL ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_SELECT_ALL; - HelpID = FN_TABLE_SELECT_ALL; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_TABLE_SELECT_COL; - HelpID = FN_TABLE_SELECT_COL; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_TABLE_SELECT_ROW; - HelpID = FN_TABLE_SELECT_ROW; - Hide = TRUE; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_TABLE_VERT_NONE; - HelpID = FN_TABLE_VERT_NONE; - RadioCheck = TRUE; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_TABLE_VERT_CENTER; - HelpID = FN_TABLE_VERT_CENTER; - RadioCheck = TRUE; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_TABLE_VERT_BOTTOM; - HelpID = FN_TABLE_VERT_BOTTOM; - RadioCheck = TRUE; - Hide = TRUE; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_BORDER - }; - ToolBoxItem - { - ITEM_TOOLBAR_FRAME_LINESTYLE - }; - ToolBoxItem - { - ITEM_TOOLBAR_FRAME_LINECOLOR - Hide = TRUE; - }; - ToolBoxItem - { - ITEM_TOOLBAR_BACKGROUND_COLOR - }; - }; -}; String RID_FRAME_TOOLBOX { Text [ en-US ] = "Frame Object Bar" ; Text [ x-comment ] = " "; }; -ToolBox RID_FRAME_TOOLBOX -{ - HelpID = HID_FRAME_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - MenuStrings = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - Hide = TRUE ; - ItemList = - { - MN_TEMPLATE - MN_FRAME_WRAP - MN_FRAME1 - MN_FRAME2 - MN_FRAME3 - MN_LINESTYLE - MN_BACKGROUND_COLOR - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_ATTRIBUTES_FRAME - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_LAYER - ToolBoxItem - { - Identifier = FN_TOOL_ANKER ; - HelpID = FN_TOOL_ANKER ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_FRAME_CHAIN ; - HelpID = FN_FRAME_CHAIN ; - }; - ToolBoxItem - { - Identifier = FN_FRAME_UNCHAIN ; - HelpID = FN_FRAME_UNCHAIN ; - }; - }; - Scroll = TRUE ; -}; String RID_GRAFIK_TOOLBOX { Text [ en-US ] = "Graphics Object Bar" ; Text [ x-comment ] = " "; }; -ToolBox RID_GRAFIK_TOOLBOX -{ - HelpID = HID_GRAFIK_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - MenuStrings = TRUE ; - Customize = TRUE ; - Hide = TRUE ; - ItemList = - { - ToolBoxItem - { - Identifier = SID_GRFFILTER; - HelpID = SID_GRFFILTER; - DropDown = TRUE ; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - ToolBoxItem - { - Identifier = SID_ATTR_GRAF_MODE; - HelpID = SID_ATTR_GRAF_MODE; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - - ToolBoxItem - { - Identifier = SID_ATTR_GRAF_RED; - HelpID = SID_ATTR_GRAF_RED; - }; - ToolBoxItem - { - Identifier = SID_ATTR_GRAF_GREEN; - HelpID = SID_ATTR_GRAF_GREEN; - }; - ToolBoxItem - { - Identifier = SID_ATTR_GRAF_BLUE; - HelpID = SID_ATTR_GRAF_BLUE; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - - ToolBoxItem - { - Identifier = SID_ATTR_GRAF_LUMINANCE; - HelpID = SID_ATTR_GRAF_LUMINANCE; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - - ToolBoxItem - { - Identifier = SID_ATTR_GRAF_CONTRAST; - HelpID = SID_ATTR_GRAF_CONTRAST; - }; - ToolBoxItem - { - Identifier = SID_ATTR_GRAF_GAMMA; - HelpID = SID_ATTR_GRAF_GAMMA; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - ToolBoxItem - { - Identifier = SID_ATTR_GRAF_TRANSPARENCE; - HelpID = SID_ATTR_GRAF_TRANSPARENCE; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - ToolBoxItem - { - Identifier = FN_FLIP_VERT_GRAFIC ; - HelpID = FN_FLIP_VERT_GRAFIC ; - }; - ToolBoxItem - { - Identifier = FN_FLIP_HORZ_GRAFIC ; - HelpID = FN_FLIP_HORZ_GRAFIC ; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_ATTRIBUTES_GRAFIK - }; - Scroll = TRUE ; -}; String RID_OLE_TOOLBOX { Text [ en-US ] = "Object" ; Text [ x-comment ] = " "; }; -ToolBox RID_OLE_TOOLBOX -{ - HelpID = HID_OLE_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Hide = TRUE ; - Scroll = TRUE ; - ItemList = - { - MN_TEMPLATE - MN_FRAME_WRAP - MN_CONTOUR - MN_FRAME1 - MN_FRAME2 - MN_FRAME3 - MN_LINESTYLE - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_ATTRIBUTES_OLE - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_LAYER - ToolBoxItem - { - Identifier = FN_TOOL_ANKER ; - HelpID = FN_TOOL_ANKER ; - DropDown = TRUE ; - }; - }; -}; String RID_DRAW_TOOLBOX { Text [ en-US ] = "Draw Object Bar" ; Text [ x-comment ] = " "; }; -ToolBox RID_DRAW_TOOLBOX -{ - HelpID = HID_DRAW_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Hide = TRUE ; - ItemList = - { - ToolBoxItem - { - Identifier = SID_BEZIER_EDIT ; - HelpID = SID_BEZIER_EDIT ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_ATTRIBUTES_LINE ; - HelpID = SID_ATTRIBUTES_LINE ; - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_LINEEND_STYLE - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_LINE_STYLE - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_LINE_WIDTH - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_LINE_COLOR - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_ATTRIBUTES_AREA ; - HelpID = SID_ATTRIBUTES_AREA ; - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_FILL_STYLE - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - ITEM_TOOLBAR_OBJECT_ROTATE - }; - ToolBoxItem - { - Identifier = FN_TOOL_ANKER ; - HelpID = FN_TOOL_ANKER ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_FRAME_NOWRAP ; - HelpID = FN_FRAME_NOWRAP ; - RadioCheck = TRUE ; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_FRAME_WRAP ; - HelpID = FN_FRAME_WRAP ; - RadioCheck = TRUE ; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_FRAME_WRAP_IDEAL ; - HelpID = FN_FRAME_WRAP_IDEAL ; - RadioCheck = TRUE ; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_FRAME_WRAP_LEFT ; - HelpID = FN_FRAME_WRAP_LEFT ; - RadioCheck = TRUE ; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_FRAME_WRAP_RIGHT ; - HelpID = FN_FRAME_WRAP_RIGHT ; - RadioCheck = TRUE ; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_FRAME_WRAPTHRU ; - HelpID = FN_FRAME_WRAPTHRU ; - RadioCheck = TRUE ; - Hide = TRUE; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_FRAME_WRAP_CONTOUR ; - HelpID = FN_FRAME_WRAP_CONTOUR ; - Hide = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_OBJECT_HEAVEN ; - HelpID = SID_OBJECT_HEAVEN ; - }; - ToolBoxItem - { - Identifier = SID_OBJECT_HELL ; - HelpID = SID_OBJECT_HELL ; - }; - MN_LAYER - MN_GRID( HIDE=TRUE ) - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_OBJECT_ALIGN ; - HelpID = SID_OBJECT_ALIGN ; - DropDown = TRUE ; - }; - }; - Scroll = TRUE ; -}; String RID_BEZIER_TOOLBOX { Text [ en-US ] = "Bézier Object Bar" ; Text [ x-comment ] = " "; }; -ToolBox RID_BEZIER_TOOLBOX -{ - HelpID = HID_BEZIER_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Hide = TRUE ; - ItemList = - { - ToolBoxItem - { - Identifier = SID_BEZIER_EDIT ; - HelpID = SID_BEZIER_EDIT ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_MOVE ; - HelpID = SID_BEZIER_MOVE ; - RadioCheck = TRUE ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_INSERT ; - HelpID = SID_BEZIER_INSERT ; - RadioCheck = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_DELETE ; - HelpID = SID_BEZIER_DELETE ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_CUTLINE ; - HelpID = SID_BEZIER_CUTLINE ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_CONVERT ; - HelpID = SID_BEZIER_CONVERT ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_EDGE ; - HelpID = SID_BEZIER_EDGE ; - RadioCheck = TRUE ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_SMOOTH ; - HelpID = SID_BEZIER_SMOOTH ; - RadioCheck = TRUE ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_SYMMTR ; - HelpID = SID_BEZIER_SYMMTR ; - RadioCheck = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_CLOSE ; - HelpID = SID_BEZIER_CLOSE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_BEZIER_ELIMINATE_POINTS ; - HelpID = SID_BEZIER_ELIMINATE_POINTS ; - }; - }; - Scroll = TRUE ; -}; String RID_DRAW_TEXT_TOOLBOX { Text [ en-US ] = "Text Object Bar/Graphics" ; Text [ x-comment ] = " "; }; -ToolBox RID_DRAW_TEXT_TOOLBOX -{ - HelpID = HID_DRAW_TEXT_TOOLBOX ; - Border = TRUE ; - Customize = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - MenuStrings = TRUE ; - Hide = TRUE ; - ItemList = - { - MN_FONT - MN_TEXT1(FALSE) - MN_TEXT1_BLOCK - MN_TEXT_LINESPACE - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_CHAR_COLOR - Hide = TRUE; - }; - MN_TEXT_LTR_RTL - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_TEXTDIRECTION_LEFT_TO_RIGHT ; - HelpID = SID_TEXTDIRECTION_LEFT_TO_RIGHT ; - }; - ToolBoxItem - { - Identifier = SID_TEXTDIRECTION_TOP_TO_BOTTOM ; - HelpID = SID_TEXTDIRECTION_TOP_TO_BOTTOM ; - }; - - MN_TEXT_DIALOGS(FALSE) - }; - ItemList[ ar ] = - { - MN_FONT - MN_TEXT1_RTL(FALSE) - MN_TEXT1_BLOCK - MN_TEXT_LINESPACE - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_CHAR_COLOR - Hide = TRUE; - }; - MN_TEXT_RTL_LTR - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_TEXTDIRECTION_LEFT_TO_RIGHT ; - HelpID = SID_TEXTDIRECTION_LEFT_TO_RIGHT ; - }; - ToolBoxItem - { - Identifier = SID_TEXTDIRECTION_TOP_TO_BOTTOM ; - HelpID = SID_TEXTDIRECTION_TOP_TO_BOTTOM ; - }; - - MN_TEXT_DIALOGS(FALSE) - }; - ItemList[ he ] = - { - MN_FONT - MN_TEXT1_RTL(FALSE) - MN_TEXT1_BLOCK - MN_TEXT_LINESPACE - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - ITEM_TOOLBAR_ATTR_CHAR_COLOR - Hide = TRUE; - }; - MN_TEXT_RTL_LTR - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_TEXTDIRECTION_LEFT_TO_RIGHT ; - HelpID = SID_TEXTDIRECTION_LEFT_TO_RIGHT ; - }; - ToolBoxItem - { - Identifier = SID_TEXTDIRECTION_TOP_TO_BOTTOM ; - HelpID = SID_TEXTDIRECTION_TOP_TO_BOTTOM ; - }; - - MN_TEXT_DIALOGS(FALSE) - }; - Scroll = TRUE ; -}; String RID_NUM_TOOLBOX { Text [ en-US ] = "Numbering Object Bar" ; Text [ x-comment ] = " "; }; -ToolBox RID_NUM_TOOLBOX -{ - HelpID = HID_NUM_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Hide = TRUE ; - ItemList = - { - MN_TEMPLATE - MN_FONT - ToolBoxItem - { - Identifier = FN_NUM_BULLET_OFF ; - HelpID = FN_NUM_BULLET_OFF ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_UP ; - HelpID = FN_NUM_BULLET_UP ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_DOWN ; - HelpID = FN_NUM_BULLET_DOWN ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_OUTLINE_UP ; - HelpID = FN_NUM_BULLET_OUTLINE_UP ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_OUTLINE_DOWN ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_NONUM ; - HelpID = FN_NUM_BULLET_NONUM ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_MOVEUP ; - HelpID = FN_NUM_BULLET_MOVEUP ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_MOVEDOWN ; - HelpID = FN_NUM_BULLET_MOVEDOWN ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_OUTLINE_MOVEUP ; - HelpID = FN_NUM_BULLET_OUTLINE_MOVEUP ; - }; - ToolBoxItem - { - Identifier = FN_NUM_BULLET_OUTLINE_MOVEDOWN ; - HelpID = FN_NUM_BULLET_OUTLINE_MOVEDOWN ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_NUMBER_NEWSTART ; - HelpID = FN_NUMBER_NEWSTART ; - }; - ToolBoxItem - { - Identifier = FN_NUMBER_BULLETS ; - HelpID = FN_NUMBER_BULLETS ; - }; - }; - Scroll = TRUE ; -}; String STR_SHELLNAME_TEXT { Text [ en-US ] = "Text" ; diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx index c9e4af60a7..a5629b0907 100644 --- a/sw/source/ui/shells/tabsh.cxx +++ b/sw/source/ui/shells/tabsh.cxx @@ -908,10 +908,11 @@ void SwTableShell::Execute(SfxRequest &rReq) case FN_TABLE_INSERT_COL_DLG: case FN_TABLE_INSERT_ROW_DLG: { + const SfxSlot* pSlot = GetStaticInterface()->GetSlot(nSlot); if ( FN_TABLE_INSERT_ROW_DLG != nSlot || !rSh.IsInRepeatedHeadline()) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - ::std::auto_ptr<SvxAbstractInsRowColDlg> pDlg( pFact ? pFact->CreateSvxInsRowColDlg( GetView().GetWindow(), nSlot == FN_TABLE_INSERT_COL_DLG, nSlot) : 0); + ::std::auto_ptr<SvxAbstractInsRowColDlg> pDlg( pFact ? pFact->CreateSvxInsRowColDlg( GetView().GetWindow(), nSlot == FN_TABLE_INSERT_COL_DLG, pSlot->GetCommand() ) : 0); if( pDlg.get() && (pDlg->Execute() == 1) ) { @@ -1285,8 +1286,8 @@ void SwTableShell::GetState(SfxItemSet &rSet) { TblChgMode nMode = rSh.GetTblChgMode(); BOOL bSet = (nSlot == FN_TABLE_MODE_FIX && nMode == TBLFIX_CHGABS) || - (nSlot == FN_TABLE_MODE_FIX_PROP && nMode == TBLFIX_CHGPROP) || - (nSlot == FN_TABLE_MODE_VARIABLE && nMode == TBLVAR_CHGABS); + (nSlot == FN_TABLE_MODE_FIX_PROP && nMode == TBLFIX_CHGPROP) || + (nSlot == FN_TABLE_MODE_VARIABLE && nMode == TBLVAR_CHGABS); rSet.Put(SfxBoolItem(nSlot, bSet)); } break; diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx index 37b4529244..dffe90a3f3 100644 --- a/sw/source/ui/shells/textfld.cxx +++ b/sw/source/ui/shells/textfld.cxx @@ -310,7 +310,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) rReq.Ignore(); } break; - case FN_DELETE_NOTE: + case FN_DELETE_COMMENT: if ( GetView().GetPostItMgr() && GetView().GetPostItMgr()->HasActiveSidebarWin() ) { @@ -619,7 +619,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) { switch (nWhich) { - case FN_DELETE_NOTE: + case FN_DELETE_COMMENT: case FN_DELETE_NOTE_AUTHOR: case FN_DELETE_ALL_NOTES: case FN_HIDE_NOTE: @@ -631,7 +631,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) rSet.InvalidateItem( nWhich ); else if ( !pPostItMgr->HasActiveSidebarWin() ) { - rSet.InvalidateItem( FN_DELETE_NOTE ); + rSet.InvalidateItem( FN_DELETE_COMMENT ); rSet.InvalidateItem( FN_HIDE_NOTE ); } } diff --git a/sw/source/ui/shells/textidx.cxx b/sw/source/ui/shells/textidx.cxx index 7f307e9f82..17c95d8869 100644 --- a/sw/source/ui/shells/textidx.cxx +++ b/sw/source/ui/shells/textidx.cxx @@ -52,6 +52,8 @@ #include <index.hrc> #include <globals.hrc> + + // STATIC DATA ----------------------------------------------------------- void SwTextShell::ExecIdx(SfxRequest &rReq) { diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index d768df8166..2504be2d93 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -265,7 +265,6 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) break; case SID_INSERT_OBJECT: case SID_INSERT_PLUGIN: - case SID_INSERT_APPLET: { SFX_REQUEST_ARG( rReq, pNameItem, SfxGlobalNameItem, SID_INSERT_OBJECT, sal_False ); SvGlobalName *pName = NULL; @@ -276,18 +275,13 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) pName = &aName; } - SFX_REQUEST_ARG( rReq, pClassItem, SfxStringItem, FN_PARAM_1, sal_False ); SFX_REQUEST_ARG( rReq, pClassLocationItem, SfxStringItem, FN_PARAM_2, sal_False ); SFX_REQUEST_ARG( rReq, pCommandsItem, SfxStringItem, FN_PARAM_3, sal_False ); //TODO/LATER: recording currently not working, need code for Commandlist svt::EmbeddedObjectRef xObj; - if((SID_INSERT_APPLET == nSlot || SID_INSERT_PLUGIN) - && (pClassItem || pClassLocationItem || pCommandsItem)) + if( nSlot == SID_INSERT_PLUGIN && ( pClassLocationItem || pCommandsItem ) ) { - String sClass; String sClassLocation; - if(pClassItem) - sClass = pClassItem->GetValue(); if(pClassLocationItem) sClassLocation = pClassLocationItem->GetValue(); @@ -298,36 +292,6 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) aCommandList.AppendCommands( pCommandsItem->GetValue(), &nTemp ); } - if(SID_INSERT_APPLET == nSlot) - { - SwApplet_Impl aApplImpl( rSh.GetAttrPool(), - RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); - String sBaseURL; - SfxMedium* pMedium = GetView().GetDocShell()->GetMedium(); - if(pMedium) - sBaseURL = pMedium->GetURLObject().GetMainURL(INetURLObject::NO_DECODE); - - aApplImpl.CreateApplet(sClass, aEmptyStr, FALSE, sClassLocation, sBaseURL ); - aApplImpl.FinishApplet(); - xObj.Assign( aApplImpl.GetApplet(), embed::Aspects::MSOLE_CONTENT ); - if( aCommandList.Count() ) - { - uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY ); - if ( xSet.is() ) - { - uno::Sequence < beans::PropertyValue > aSeq; - aCommandList.FillSequence( aSeq ); - try - { - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCommands")), uno::makeAny( aSeq ) ); - } - catch ( uno::Exception& ) - { - } - } - } - } - else { comphelper::EmbeddedObjectContainer aCnt; ::rtl::OUString sName; @@ -639,16 +603,18 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) OSL_ENSURE(pDlg, "Dialogdiet fail!"); if(pDlg->Execute() && pDlg->GetOutputItemSet()) { - GetShell().LockPaint(); - GetShell().StartAllAction(); - GetShell().StartUndo(UNDO_INSERT); + //local variable necessary at least after call of .AutoCaption() because this could be deleted at this point + SwWrtShell& rShell = GetShell(); + rShell.LockPaint(); + rShell.StartAllAction(); + rShell.StartUndo(UNDO_INSERT); const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); aMgr.SetAttrSet(*pOutSet); // beim ClickToEditFeld erst die Selektion loeschen - if( GetShell().IsInClickToEdit() ) - GetShell().DelRight(); + if( rShell.IsInClickToEdit() ) + rShell.DelRight(); aMgr.InsertFlyFrm(); @@ -659,8 +625,8 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) //FN_INSERT_FRAME USHORT nAnchor = (USHORT)aMgr.GetAnchor(); rReq.AppendItem(SfxUInt16Item(nSlot, nAnchor)); - rReq.AppendItem(SfxPointItem(FN_PARAM_1, GetShell().GetObjAbsPos())); - rReq.AppendItem(SvxSizeItem(FN_PARAM_2, GetShell().GetObjSize())); + rReq.AppendItem(SfxPointItem(FN_PARAM_1, rShell.GetObjAbsPos())); + rReq.AppendItem(SvxSizeItem(FN_PARAM_2, rShell.GetObjSize())); rReq.Done(); } @@ -671,10 +637,10 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) aRewriter.AddRule(UNDO_ARG1, SW_RES(STR_FRAME)); - GetShell().EndUndo(UNDO_INSERT, &aRewriter); + rShell.EndUndo(UNDO_INSERT, &aRewriter); } - GetShell().EndAllAction(); - GetShell().UnlockPaint(); + rShell.EndAllAction(); + rShell.UnlockPaint(); } DELETEZ(pDlg); @@ -826,13 +792,8 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) case SID_INSERT_FLOATINGFRAME: case SID_INSERT_OBJECT: case SID_INSERT_PLUGIN: - case SID_INSERT_APPLET: { - if( -#ifndef SOLAR_JAVA - nWhich == SID_INSERT_APPLET || -#endif - eCreateMode == SFX_CREATE_MODE_EMBEDDED || bCrsrInHidden ) + if( eCreateMode == SFX_CREATE_MODE_EMBEDDED || bCrsrInHidden ) { rSet.DisableItem( nWhich ); } @@ -916,7 +877,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) } break; case FN_INSERT_HRULER : - if ( (rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel()) || bCrsrInHidden ) + if((rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel()) || bCrsrInHidden ) rSet.DisableItem(nWhich); break; case FN_FORMAT_COLUMN : diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx index a968114c12..1d87c6dd36 100644 --- a/sw/source/ui/shells/textsh1.cxx +++ b/sw/source/ui/shells/textsh1.cxx @@ -126,7 +126,7 @@ #include <view.hxx> #include <ndtxt.hxx> #include <pam.hxx> - +#include <sfx2/objface.hxx> #include <langhelper.hxx> using namespace ::com::sun::star; @@ -453,7 +453,7 @@ void SwTextShell::Execute(SfxRequest &rReq) AbstractInsFootNoteDlg* pDlg = pFact->CreateInsFootNoteDlg( DLG_INS_FOOTNOTE, GetView().GetWindow(), rWrtSh, FALSE ); OSL_ENSURE(pDlg, "Dialogdiet fail!"); - pDlg->SetHelpId(nSlot); + pDlg->SetHelpId(GetStaticInterface()->GetSlot(nSlot)->GetCommand()); if ( pDlg->Execute() == RET_OK ) { USHORT nId = pDlg->IsEndNote() ? FN_INSERT_ENDNOTE : FN_INSERT_FOOTNOTE; @@ -1702,8 +1702,8 @@ void SwTextShell::ChangeHeaderOrFooter( if( !rStyleName.Len() || rStyleName == sTmp ) { if( (bShowWarning && !bOn && GetActiveView() && GetActiveView() == &GetView() && - (bHeader && aDesc.GetMaster().GetHeader().IsActive())) || - (!bHeader && aDesc.GetMaster().GetFooter().IsActive())) + ((bHeader && aDesc.GetMaster().GetHeader().IsActive()) || + (!bHeader && aDesc.GetMaster().GetFooter().IsActive()))) { bShowWarning = FALSE; //Actions have to be closed while the dialog is showing diff --git a/sw/source/ui/shells/txtcrsr.cxx b/sw/source/ui/shells/txtcrsr.cxx index 6f9c962f46..daddb006dd 100644 --- a/sw/source/ui/shells/txtcrsr.cxx +++ b/sw/source/ui/shells/txtcrsr.cxx @@ -53,6 +53,10 @@ #include <svx/fmshell.hxx> #include <svx/sdrobjectfilter.hxx> +#include <svx/svdouno.hxx> +#include <svx/fmshell.hxx> +#include <svx/sdrobjectfilter.hxx> + using namespace ::com::sun::star; void SwTextShell::ExecBasicMove(SfxRequest &rReq) diff --git a/sw/source/ui/smartmenu/makefile.mk b/sw/source/ui/smartmenu/makefile.mk deleted file mode 100644 index 1950430cf3..0000000000 --- a/sw/source/ui/smartmenu/makefile.mk +++ /dev/null @@ -1,53 +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. -# -#************************************************************************* -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=smartmenu - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES = \ - $(SLO)$/stmenu.obj - -SLOFILES = \ - $(SLO)$/stmenu.obj - -SRS1NAME=$(TARGET) -SRC1FILES = \ - stmenu.src - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/table/chartins.src b/sw/source/ui/table/chartins.src index 6c30097791..92e20c682b 100644 --- a/sw/source/ui/table/chartins.src +++ b/sw/source/ui/table/chartins.src @@ -50,12 +50,14 @@ ModelessDialog DLG_INSERT_CHART }; Edit ED_RANGE { + HelpID = "sw:Edit:DLG_INSERT_CHART:ED_RANGE"; Border = TRUE ; Pos = MAP_APPFONT ( 56 , 14 ) ; Size = MAP_APPFONT ( 229 , 12 ) ; }; CheckBox CB_FIRST_ROW { + HelpID = "sw:CheckBox:DLG_INSERT_CHART:CB_FIRST_ROW"; Pos = MAP_APPFONT ( 12 , 32 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; TabStop = TRUE ; @@ -64,6 +66,7 @@ ModelessDialog DLG_INSERT_CHART }; CheckBox CB_FIRST_COL { + HelpID = "sw:CheckBox:DLG_INSERT_CHART:CB_FIRST_COL"; Pos = MAP_APPFONT ( 12 , 46 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; TabStop = TRUE ; @@ -96,6 +99,7 @@ ModelessDialog DLG_INSERT_CHART }; PushButton BT_PREV { + HelpID = "sw:PushButton:DLG_INSERT_CHART:BT_PREV"; Pos = MAP_APPFONT ( 130 , 151 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; // ### ACHTUNG: Neuer Text in Resource? << ~Zurück : << Zurück @@ -106,6 +110,7 @@ ModelessDialog DLG_INSERT_CHART }; PushButton BT_NEXT { + HelpID = "sw:PushButton:DLG_INSERT_CHART:BT_NEXT"; Pos = MAP_APPFONT ( 185 , 151 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Disable = TRUE ; @@ -114,6 +119,7 @@ ModelessDialog DLG_INSERT_CHART }; PushButton BT_FINISH { + HelpID = "sw:PushButton:DLG_INSERT_CHART:BT_FINISH"; Pos = MAP_APPFONT ( 240 , 151 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/table/colwd.src b/sw/source/ui/table/colwd.src index cd34b41bd5..1df5fe2cfc 100644 --- a/sw/source/ui/table/colwd.src +++ b/sw/source/ui/table/colwd.src @@ -32,7 +32,7 @@ // #define DLG_COL_WIDTH 256 ModalDialog DLG_COL_WIDTH { - HelpID = FN_TABLE_SET_COL_WIDTH ; + HelpID = CMD_FN_TABLE_SET_COL_WIDTH ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 159 , 60 ) ; @@ -66,6 +66,7 @@ ModalDialog DLG_COL_WIDTH }; MetricField ED_WIDTH { + HelpID = "sw:MetricField:DLG_COL_WIDTH:ED_WIDTH"; Border = TRUE ; Pos = MAP_APPFONT ( 51 , 30 ) ; Size = MAP_APPFONT ( 38 , 12 ) ; @@ -97,6 +98,7 @@ ModalDialog DLG_COL_WIDTH }; NumericField ED_COL { + HelpID = "sw:NumericField:DLG_COL_WIDTH:ED_COL"; Border = TRUE ; Pos = MAP_APPFONT ( 51 , 14 ) ; Size = MAP_APPFONT ( 38 , 12 ) ; diff --git a/sw/source/ui/table/convert.src b/sw/source/ui/table/convert.src index 50baa2bb9a..13e9b9e860 100644 --- a/sw/source/ui/table/convert.src +++ b/sw/source/ui/table/convert.src @@ -31,7 +31,7 @@ #include "helpid.h" ModalDialog DLG_CONV_TEXT_TABLE { - HelpID = FN_CONVERT_TEXT_TABLE ; + HelpID = CMD_FN_CONVERT_TEXT_TABLE ; OUTPUTSIZE = TRUE ; Size = MAP_APPFONT ( 203 , 169 ) ; Text [ en-US ] = "Convert Table to Text" ; @@ -39,6 +39,7 @@ ModalDialog DLG_CONV_TEXT_TABLE SVLOOK = TRUE ; RadioButton CB_TAB { + HelpID = "sw:RadioButton:DLG_CONV_TEXT_TABLE:CB_TAB"; Pos = MAP_APPFONT ( 12 , 17 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; Text [ en-US ] = "~Tabs" ; @@ -48,6 +49,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; RadioButton CB_SEMI { + HelpID = "sw:RadioButton:DLG_CONV_TEXT_TABLE:CB_SEMI"; Pos = MAP_APPFONT ( 75 , 17 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; Text [ en-US ] = "~Semicolons" ; @@ -55,6 +57,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; RadioButton CB_PARA { + HelpID = "sw:RadioButton:DLG_CONV_TEXT_TABLE:CB_PARA"; Pos = MAP_APPFONT ( 12 , 33 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; Text [ en-US ] = "~Paragraph" ; @@ -62,12 +65,14 @@ ModalDialog DLG_CONV_TEXT_TABLE }; RadioButton RB_OTHER { + HelpID = "sw:RadioButton:DLG_CONV_TEXT_TABLE:RB_OTHER"; Pos = MAP_APPFONT ( 75 , 33 ) ; Size = MAP_APPFONT ( 45 , 10 ) ; Text [ en-US ] = "~Other: " ; }; Edit ED_OTHER { + HelpID = "sw:Edit:DLG_CONV_TEXT_TABLE:ED_OTHER"; Border = TRUE ; Left = TRUE ; Pos = MAP_APPFONT ( 123 , 32 ) ; @@ -77,6 +82,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; CheckBox CB_KEEPCOLUMN { + HelpID = "sw:CheckBox:DLG_CONV_TEXT_TABLE:CB_KEEPCOLUMN"; Pos = MAP_APPFONT ( 12 , 49 ) ; Size = MAP_APPFONT ( 128 , 10 ) ; Check = TRUE; @@ -92,6 +98,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; CheckBox CB_HEADER { + HelpID = "sw:CheckBox:DLG_CONV_TEXT_TABLE:CB_HEADER"; Pos = MAP_APPFONT ( 12 , 84 ) ; Size = MAP_APPFONT ( 123 , 10 ) ; TabStop = TRUE ; @@ -99,6 +106,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; CheckBox CB_REPEAT_HEADER { + HelpID = "sw:CheckBox:DLG_CONV_TEXT_TABLE:CB_REPEAT_HEADER"; Pos = MAP_APPFONT ( 22 , 97 ) ; Size = MAP_APPFONT ( 113 , 10 ) ; Text [ en-US ] = "Repeat heading"; @@ -112,6 +120,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; NumericField NF_REPEAT_HEADER { + HelpID = "sw:NumericField:DLG_CONV_TEXT_TABLE:NF_REPEAT_HEADER"; Border = TRUE ; Pos = MAP_APPFONT ( 191 , 112 ) ; Size = MAP_APPFONT ( 28 , 12 ) ; @@ -130,6 +139,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; CheckBox CB_DONT_SPLIT { + HelpID = "sw:CheckBox:DLG_CONV_TEXT_TABLE:CB_DONT_SPLIT"; Pos = MAP_APPFONT ( 12 , 126 ) ; Size = MAP_APPFONT ( 123 , 10 ) ; TabStop = TRUE ; @@ -137,6 +147,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; CheckBox CB_BORDER { + HelpID = "sw:CheckBox:DLG_CONV_TEXT_TABLE:CB_BORDER"; Pos = MAP_APPFONT ( 12 , 139 ) ; Size = MAP_APPFONT ( 123 , 10 ) ; TabStop = TRUE ; @@ -173,6 +184,7 @@ ModalDialog DLG_CONV_TEXT_TABLE }; PushButton BT_AUTOFORMAT { + HelpID = "sw:PushButton:DLG_CONV_TEXT_TABLE:BT_AUTOFORMAT"; Pos = MAP_APPFONT ( 12 , 152 ) ; Size = MAP_APPFONT ( 86 , 14 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/table/instable.src b/sw/source/ui/table/instable.src index 3930bb36ab..e5a636d3b8 100644 --- a/sw/source/ui/table/instable.src +++ b/sw/source/ui/table/instable.src @@ -32,7 +32,7 @@ // #define DLG_INSERT_TABLE 256 ModalDialog DLG_INSERT_TABLE { - HelpID = FN_INSERT_TABLE ; + HelpID = CMD_FN_INSERT_TABLE ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 280 , 166 ) ; @@ -40,6 +40,7 @@ ModalDialog DLG_INSERT_TABLE Moveable = TRUE ; Edit ED_NAME { + HelpID = "sw:Edit:DLG_INSERT_TABLE:ED_NAME"; Border = TRUE ; Pos = MAP_APPFONT ( 53 , 6 ) ; Size = MAP_APPFONT ( 158, 12 ) ; @@ -60,6 +61,7 @@ ModalDialog DLG_INSERT_TABLE }; NumericField ED_COL { + HelpID = "sw:NumericField:DLG_INSERT_TABLE:ED_COL"; Border = TRUE ; Pos = MAP_APPFONT ( 53 , 32 ) ; Size = MAP_APPFONT ( 28 , 12 ) ; @@ -82,6 +84,7 @@ ModalDialog DLG_INSERT_TABLE }; NumericField ED_ROW { + HelpID = "sw:NumericField:DLG_INSERT_TABLE:ED_ROW"; Border = TRUE ; Pos = MAP_APPFONT ( 53 , 48 ) ; Size = MAP_APPFONT ( 28 , 12 ) ; @@ -103,6 +106,7 @@ ModalDialog DLG_INSERT_TABLE }; CheckBox CB_HEADER { + HelpID = "sw:CheckBox:DLG_INSERT_TABLE:CB_HEADER"; Pos = MAP_APPFONT ( 12 , 74 ) ; Size = MAP_APPFONT (113 , 10 ) ; TabStop = TRUE ; @@ -110,6 +114,7 @@ ModalDialog DLG_INSERT_TABLE }; CheckBox CB_REPEAT_HEADER { + HelpID = "sw:CheckBox:DLG_INSERT_TABLE:CB_REPEAT_HEADER"; Pos = MAP_APPFONT ( 21 , 88 ) ; Size = MAP_APPFONT ( 104 , 10 ) ; TabStop = TRUE ; @@ -123,6 +128,7 @@ ModalDialog DLG_INSERT_TABLE }; NumericField NF_REPEAT_HEADER { + HelpID = "sw:NumericField:DLG_INSERT_TABLE:NF_REPEAT_HEADER"; Border = TRUE ; Pos = MAP_APPFONT ( 130 , 104 ) ; Size = MAP_APPFONT ( 28 , 12 ) ; @@ -141,6 +147,7 @@ ModalDialog DLG_INSERT_TABLE }; CheckBox CB_DONT_SPLIT { + HelpID = "sw:CheckBox:DLG_INSERT_TABLE:CB_DONT_SPLIT"; Pos = MAP_APPFONT ( 12 , 118 ) ; Size = MAP_APPFONT ( 113 , 10 ) ; Text [ en-US ] = "Don't split table"; @@ -148,6 +155,7 @@ ModalDialog DLG_INSERT_TABLE }; CheckBox CB_BORDER { + HelpID = "sw:CheckBox:DLG_INSERT_TABLE:CB_BORDER"; Pos = MAP_APPFONT ( 12 , 132 ) ; Size = MAP_APPFONT ( 113 , 10 ) ; TabStop = TRUE ; @@ -155,6 +163,7 @@ ModalDialog DLG_INSERT_TABLE }; PushButton BT_AUTOFORMAT { + HelpID = "sw:PushButton:DLG_INSERT_TABLE:BT_AUTOFORMAT"; Pos = MAP_APPFONT ( 12 , 146 ) ; Size = MAP_APPFONT ( 86 , 14 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/table/makefile.mk b/sw/source/ui/table/makefile.mk deleted file mode 100644 index 7897bf9ad9..0000000000 --- a/sw/source/ui/table/makefile.mk +++ /dev/null @@ -1,81 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=table -LIBTARGET=no -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - colwd.src \ - convert.src \ - chartins.src \ - instable.src \ - mergetbl.src \ - rowht.src \ - splittbl.src \ - table.src \ - tabledlg.src \ - tautofmt.src - -EXCEPTIONSFILES= \ - $(SLO)$/chartins.obj \ - $(SLO)$/colwd.obj \ - $(SLO)$/convert.obj \ - $(SLO)$/instable.obj \ - $(SLO)$/mergetbl.obj \ - $(SLO)$/rowht.obj \ - $(SLO)$/splittbl.obj \ - $(SLO)$/swtablerep.obj \ - $(SLO)$/tabledlg.obj \ - $(SLO)$/tablemgr.obj \ - $(SLO)$/tautofmt.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) - -LIB1TARGET = $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/chartins.obj \ - $(SLO)$/swtablerep.obj \ - $(SLO)$/tablemgr.obj - - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/table/mergetbl.src b/sw/source/ui/table/mergetbl.src index 97ef9cb2cd..de6fa33159 100644 --- a/sw/source/ui/table/mergetbl.src +++ b/sw/source/ui/table/mergetbl.src @@ -31,7 +31,7 @@ #include "helpid.h" ModalDialog DLG_MERGE_TABLE { - HelpID = FN_TABLE_MERGE_TABLE ; + HelpID = CMD_FN_TABLE_MERGE_TABLE ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 207 , 57 ) ; @@ -63,6 +63,7 @@ ModalDialog DLG_MERGE_TABLE }; RadioButton RB_MERGE_PREV { + HelpID = "sw:RadioButton:DLG_MERGE_TABLE:RB_MERGE_PREV"; Pos = MAP_APPFONT ( 12 , 15 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; Check = TRUE ; @@ -71,6 +72,7 @@ ModalDialog DLG_MERGE_TABLE }; RadioButton RB_MERGE_NEXT { + HelpID = "sw:RadioButton:DLG_MERGE_TABLE:RB_MERGE_NEXT"; Pos = MAP_APPFONT ( 12 , 30 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; Text [ en-US ] = "Join with ~next table"; diff --git a/sw/source/ui/table/rowht.src b/sw/source/ui/table/rowht.src index ea3ac27474..6d537f415a 100644 --- a/sw/source/ui/table/rowht.src +++ b/sw/source/ui/table/rowht.src @@ -31,7 +31,7 @@ #include "helpid.h" ModalDialog DLG_ROW_HEIGHT { - HelpID = FN_TABLE_SET_ROW_HEIGHT ; + HelpID = CMD_FN_TABLE_SET_ROW_HEIGHT ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 157 , 60 ) ; @@ -59,6 +59,7 @@ ModalDialog DLG_ROW_HEIGHT }; MetricField ED_HEIGHT { + HelpID = "sw:MetricField:DLG_ROW_HEIGHT:ED_HEIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 16 ) ; Size = MAP_APPFONT ( 38 , 12 ) ; @@ -76,6 +77,7 @@ ModalDialog DLG_ROW_HEIGHT }; CheckBox CB_AUTOHEIGHT { + HelpID = "sw:CheckBox:DLG_ROW_HEIGHT:CB_AUTOHEIGHT"; Pos = MAP_APPFONT ( 12 , 34 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; /* ### ACHTUNG: Neuer Text in Resource? ~dynamisch anpassen : auto. H~öhe */ diff --git a/sw/source/ui/table/splittbl.src b/sw/source/ui/table/splittbl.src index e58d64ab96..d785f9ea06 100644 --- a/sw/source/ui/table/splittbl.src +++ b/sw/source/ui/table/splittbl.src @@ -31,7 +31,7 @@ #include "helpid.h" ModalDialog DLG_SPLIT_TABLE { - HelpID = FN_TABLE_SPLIT_TABLE ; + HelpID = CMD_FN_TABLE_SPLIT_TABLE ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 207 , 76 ) ; @@ -63,6 +63,7 @@ ModalDialog DLG_SPLIT_TABLE }; RadioButton RB_CNTNT { + HelpID = "sw:RadioButton:DLG_SPLIT_TABLE:RB_CNTNT"; Pos = MAP_APPFONT ( 12 , 15 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; Check = TRUE ; @@ -71,18 +72,21 @@ ModalDialog DLG_SPLIT_TABLE }; RadioButton RB_BOX_PARA { + HelpID = "sw:RadioButton:DLG_SPLIT_TABLE:RB_BOX_PARA"; Pos = MAP_APPFONT ( 12 , 30 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; Text [ en-US ] = "C~ustom heading (apply Style)" ; }; RadioButton RB_BOX_NOPARA { + HelpID = "sw:RadioButton:DLG_SPLIT_TABLE:RB_BOX_NOPARA"; Pos = MAP_APPFONT ( 12 , 45 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; Text [ en-US ] = "Cu~stom heading" ; }; RadioButton RB_BORDER { + HelpID = "sw:RadioButton:DLG_SPLIT_TABLE:RB_BORDER"; Pos = MAP_APPFONT ( 12 , 60 ) ; Size = MAP_APPFONT ( 130 , 10 ) ; Text [ en-US ] = "~No heading" ; diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 84f52b4c67..2c370496c4 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -1588,7 +1588,7 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet ) } String aFmtName; - for(i = RES_POOLPAGE_BEGIN; i <= RES_POOLPAGE_REGISTER; ++i) + for(i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i) if( LISTBOX_ENTRY_NOTFOUND == aPageCollLB.GetEntryPos( aFmtName = SwStyleNameMapper::GetUIName( i, aFmtName ) )) aPageCollLB.InsertEntry( aFmtName ); diff --git a/sw/source/ui/table/tabledlg.src b/sw/source/ui/table/tabledlg.src index 0dd3607c2d..b3d52ec516 100644 --- a/sw/source/ui/table/tabledlg.src +++ b/sw/source/ui/table/tabledlg.src @@ -98,6 +98,7 @@ TabPage TP_FORMAT_TABLE }; Edit ED_NAME { + HelpID = "sw:Edit:TP_FORMAT_TABLE:ED_NAME"; Border = TRUE ; Pos = MAP_APPFONT ( 75 , 14 ) ; Size = MAP_APPFONT ( 112 , 12 ) ; @@ -111,6 +112,7 @@ TabPage TP_FORMAT_TABLE }; MetricField ED_WIDTH { + HelpID = "sw:MetricField:TP_FORMAT_TABLE:ED_WIDTH"; Border = TRUE ; Pos = MAP_APPFONT ( 75 , 30 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -129,6 +131,7 @@ TabPage TP_FORMAT_TABLE }; CheckBox CB_REL_WIDTH { + HelpID = "sw:CheckBox:TP_FORMAT_TABLE:CB_REL_WIDTH"; Pos = MAP_APPFONT ( 118 , 32 ) ; Size = MAP_APPFONT ( 69 , 10 ) ; TabStop = TRUE ; @@ -142,6 +145,7 @@ TabPage TP_FORMAT_TABLE }; RadioButton RB_FULL { + HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_FULL"; Pos = MAP_APPFONT ( 202 , 14 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; TabStop = TRUE ; @@ -149,6 +153,7 @@ TabPage TP_FORMAT_TABLE }; RadioButton RB_LEFT { + HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_LEFT"; Pos = MAP_APPFONT ( 202 , 28 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "~Left" ; @@ -156,6 +161,7 @@ TabPage TP_FORMAT_TABLE }; RadioButton RB_FROM_LEFT { + HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_FROM_LEFT"; Pos = MAP_APPFONT ( 202 , 42 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; TabStop = TRUE ; @@ -163,6 +169,7 @@ TabPage TP_FORMAT_TABLE }; RadioButton RB_RIGHT { + HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_RIGHT"; Pos = MAP_APPFONT ( 202 , 56 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "R~ight" ; @@ -170,6 +177,7 @@ TabPage TP_FORMAT_TABLE }; RadioButton RB_CENTER { + HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_CENTER"; Pos = MAP_APPFONT ( 202 , 70 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = "~Center" ; @@ -177,6 +185,7 @@ TabPage TP_FORMAT_TABLE }; RadioButton RB_FREE { + HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_FREE"; Pos = MAP_APPFONT ( 202 , 84 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; TabStop = TRUE ; @@ -202,6 +211,7 @@ TabPage TP_FORMAT_TABLE }; MetricField ED_LEFT_DIST { + HelpID = "sw:MetricField:TP_FORMAT_TABLE:ED_LEFT_DIST"; Pos = MAP_APPFONT ( 147 , 59 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -226,6 +236,7 @@ TabPage TP_FORMAT_TABLE MetricField ED_RIGHT_DIST { + HelpID = "sw:MetricField:TP_FORMAT_TABLE:ED_RIGHT_DIST"; Pos = MAP_APPFONT ( 147 , 75 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -249,6 +260,7 @@ TabPage TP_FORMAT_TABLE }; MetricField ED_TOP_DIST { + HelpID = "sw:MetricField:TP_FORMAT_TABLE:ED_TOP_DIST"; Pos = MAP_APPFONT ( 147 , 91 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -272,6 +284,7 @@ TabPage TP_FORMAT_TABLE }; MetricField ED_BOTTOM_DIST { + HelpID = "sw:MetricField:TP_FORMAT_TABLE:ED_BOTTOM_DIST"; Border = TRUE ; Pos = MAP_APPFONT ( 147 , 107 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -303,6 +316,7 @@ TabPage TP_FORMAT_TABLE }; ListBox LB_TEXTDIRECTION { + HelpID = "sw:ListBox:TP_FORMAT_TABLE:LB_TEXTDIRECTION"; Border = TRUE ; Pos = MAP_APPFONT ( 75 , 136 ) ; Size = MAP_APPFONT ( 176 , 50 ) ; @@ -329,6 +343,7 @@ TabPage TP_TABLE_COLUMN Hide = TRUE; CheckBox CB_MOD_TBL { + HelpID = "sw:CheckBox:TP_TABLE_COLUMN:CB_MOD_TBL"; Pos = MAP_APPFONT ( 6 , 6 ) ; Size = MAP_APPFONT ( 180 , 10 ) ; TabStop = TRUE ; @@ -336,6 +351,7 @@ TabPage TP_TABLE_COLUMN }; CheckBox CB_PROP { + HelpID = "sw:CheckBox:TP_TABLE_COLUMN:CB_PROP"; Pos = MAP_APPFONT ( 6 , 20 ) ; Size = MAP_APPFONT ( 180 , 10 ) ; TabStop = TRUE ; @@ -349,6 +365,7 @@ TabPage TP_TABLE_COLUMN }; MetricField ED_SPACE { + HelpID = "sw:MetricField:TP_TABLE_COLUMN:ED_SPACE"; ReadOnly = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 95 , 34 ) ; @@ -365,6 +382,7 @@ TabPage TP_TABLE_COLUMN }; ImageButton COL_BTN_DOWN { + HelpID = "sw:ImageButton:TP_TABLE_COLUMN:COL_BTN_DOWN"; Disable = TRUE ; Pos = MAP_APPFONT ( 12 , 65 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; @@ -373,6 +391,7 @@ TabPage TP_TABLE_COLUMN }; ImageButton COL_BTN_UP { + HelpID = "sw:ImageButton:TP_TABLE_COLUMN:COL_BTN_UP"; Disable = TRUE ; Pos = MAP_APPFONT ( 234 , 65 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; @@ -391,6 +410,7 @@ TabPage TP_TABLE_COLUMN }; MetricField COL_MF_1 { + HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_1"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 13 , 81 ) ; @@ -418,6 +438,7 @@ TabPage TP_TABLE_COLUMN }; MetricField COL_MF_2 { + HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_2"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 52 , 81 ) ; @@ -445,6 +466,7 @@ TabPage TP_TABLE_COLUMN }; MetricField COL_MF_3 { + HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_3"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 91 , 81 ) ; @@ -472,6 +494,7 @@ TabPage TP_TABLE_COLUMN }; MetricField COL_MF_4 { + HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_4"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 130 , 81 ) ; @@ -499,6 +522,7 @@ TabPage TP_TABLE_COLUMN }; MetricField COL_MF_5 { + HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_5"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 169 , 81 ) ; @@ -526,6 +550,7 @@ TabPage TP_TABLE_COLUMN }; MetricField COL_MF_6 { + HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_6"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 208 , 81 ) ; @@ -568,6 +593,7 @@ TabPage TP_TABLE_TEXTFLOW }; CheckBox CB_PAGEBREAK { + HelpID = "sw:CheckBox:TP_TABLE_TEXTFLOW:CB_PAGEBREAK"; // Disable = TRUE; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 90 , 8 ) ; @@ -577,6 +603,7 @@ TabPage TP_TABLE_TEXTFLOW }; RadioButton RB_BREAKPAGE { + HelpID = "sw:RadioButton:TP_TABLE_TEXTFLOW:RB_BREAKPAGE"; Pos = MAP_APPFONT ( 105 , 14 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Page" ; @@ -585,6 +612,7 @@ TabPage TP_TABLE_TEXTFLOW }; RadioButton RB_BREAKCOLUMN { + HelpID = "sw:RadioButton:TP_TABLE_TEXTFLOW:RB_BREAKCOLUMN"; // Disable = TRUE; Pos = MAP_APPFONT ( 178 , 14 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; @@ -593,6 +621,7 @@ TabPage TP_TABLE_TEXTFLOW }; RadioButton RB_PAGEBREAKBEFORE { + HelpID = "sw:RadioButton:TP_TABLE_TEXTFLOW:RB_PAGEBREAKBEFORE"; // Disable = TRUE; Pos = MAP_APPFONT ( 105 , 28 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; @@ -602,6 +631,7 @@ TabPage TP_TABLE_TEXTFLOW }; RadioButton RB_PAGEBREAKAFTER { + HelpID = "sw:RadioButton:TP_TABLE_TEXTFLOW:RB_PAGEBREAKAFTER"; // Disable = TRUE; Pos = MAP_APPFONT ( 178 , 28 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; @@ -609,6 +639,7 @@ TabPage TP_TABLE_TEXTFLOW }; CheckBox CB_PAGECOLL { + HelpID = "sw:CheckBox:TP_TABLE_TEXTFLOW:CB_PAGECOLL"; // Disable = TRUE; Pos = MAP_APPFONT ( 12 , 44 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; @@ -618,6 +649,7 @@ TabPage TP_TABLE_TEXTFLOW }; ListBox LB_PAGECOLL { + HelpID = "sw:ListBox:TP_TABLE_TEXTFLOW:LB_PAGECOLL"; Pos = MAP_APPFONT ( 105 , 42 ) ; Size = MAP_APPFONT ( 61 , 50 ) ; TabStop = TRUE ; @@ -631,6 +663,7 @@ TabPage TP_TABLE_TEXTFLOW }; NumericField NF_PAGENUM { + HelpID = "sw:NumericField:TP_TABLE_TEXTFLOW:NF_PAGENUM"; Border = TRUE ; Pos = MAP_APPFONT ( 222 , 42 ) ; Size = MAP_APPFONT ( 26 , 12 ) ; @@ -646,6 +679,7 @@ TabPage TP_TABLE_TEXTFLOW }; CheckBox CB_SPLIT { + HelpID = "sw:CheckBox:TP_TABLE_TEXTFLOW:CB_SPLIT"; Pos = MAP_APPFONT ( 12 , 58 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; TabStop = TRUE ; @@ -653,6 +687,7 @@ TabPage TP_TABLE_TEXTFLOW }; TriStateBox CB_SPLIT_ROW { + HelpID = "sw:TriStateBox:TP_TABLE_TEXTFLOW:CB_SPLIT_ROW"; Pos = MAP_APPFONT ( 21 , 71 ) ; Size = MAP_APPFONT ( 227 , 10 ) ; TabStop = TRUE ; @@ -660,6 +695,7 @@ TabPage TP_TABLE_TEXTFLOW }; CheckBox CB_KEEP { + HelpID = "sw:CheckBox:TP_TABLE_TEXTFLOW:CB_KEEP"; Pos = MAP_APPFONT ( 12 , 85 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; Text [ en-US ] = "~Keep with next paragraph" ; @@ -667,6 +703,7 @@ TabPage TP_TABLE_TEXTFLOW }; CheckBox CB_HEADLINE { + HelpID = "sw:CheckBox:TP_TABLE_TEXTFLOW:CB_HEADLINE"; Pos = MAP_APPFONT ( 12 , 99 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; TabStop = TRUE ; @@ -680,6 +717,7 @@ TabPage TP_TABLE_TEXTFLOW }; NumericField NF_REPEAT_HEADER { + HelpID = "sw:NumericField:TP_TABLE_TEXTFLOW:NF_REPEAT_HEADER"; Border = TRUE ; Pos = MAP_APPFONT ( 131 , 113 ) ; Size = MAP_APPFONT ( 28 , 12 ) ; @@ -704,6 +742,7 @@ TabPage TP_TABLE_TEXTFLOW }; ListBox LB_TEXTDIRECTION { + HelpID = "sw:ListBox:TP_TABLE_TEXTFLOW:LB_TEXTDIRECTION"; Pos = MAP_APPFONT ( 85 , 130 ) ; Size = MAP_APPFONT ( 163 , 50 ) ; DropDown = TRUE; @@ -730,6 +769,7 @@ TabPage TP_TABLE_TEXTFLOW }; ListBox LB_VERTORIENT { + HelpID = "sw:ListBox:TP_TABLE_TEXTFLOW:LB_VERTORIENT"; Pos = MAP_APPFONT ( 85 , 162 ) ; Size = MAP_APPFONT ( 61 , 50 ) ; DropDown = TRUE; diff --git a/sw/source/ui/table/tablepg.hxx b/sw/source/ui/table/tablepg.hxx index 7a9c39bd67..a36bcf0334 100644 --- a/sw/source/ui/table/tablepg.hxx +++ b/sw/source/ui/table/tablepg.hxx @@ -29,7 +29,7 @@ #define _SWTABLEPG_HXX #include <sfx2/tabdlg.hxx> #include <vcl/fixed.hxx> -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #include <vcl/lstbox.hxx> #include <actctrl.hxx> #include "prcntfld.hxx" diff --git a/sw/source/ui/table/tautofmt.src b/sw/source/ui/table/tautofmt.src index ab314e0932..ec6eaad812 100644 --- a/sw/source/ui/table/tautofmt.src +++ b/sw/source/ui/table/tautofmt.src @@ -43,6 +43,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; ListBox LB_FORMAT { + HelpID = "sw:ListBox:DLG_AUTOFMT_TABLE:LB_FORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 65 , 100 ) ; @@ -56,6 +57,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; CheckBox BTN_NUMFORMAT { + HelpID = "sw:CheckBox:DLG_AUTOFMT_TABLE:BTN_NUMFORMAT"; Hide = TRUE ; Pos = MAP_APPFONT ( 12 , 131 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; @@ -64,6 +66,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; CheckBox BTN_BORDER { + HelpID = "sw:CheckBox:DLG_AUTOFMT_TABLE:BTN_BORDER"; Hide = TRUE ; Pos = MAP_APPFONT ( 12 , 147 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; @@ -72,6 +75,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; CheckBox BTN_FONT { + HelpID = "sw:CheckBox:DLG_AUTOFMT_TABLE:BTN_FONT"; Hide = TRUE ; Pos = MAP_APPFONT ( 85 , 131 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; @@ -80,6 +84,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; CheckBox BTN_PATTERN { + HelpID = "sw:CheckBox:DLG_AUTOFMT_TABLE:BTN_PATTERN"; Hide = TRUE ; Pos = MAP_APPFONT ( 85 , 147 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; @@ -88,6 +93,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; CheckBox BTN_ALIGNMENT { + HelpID = "sw:CheckBox:DLG_AUTOFMT_TABLE:BTN_ALIGNMENT"; Hide = TRUE ; Pos = MAP_APPFONT ( 150 , 131 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; @@ -116,6 +122,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; MoreButton BTN_MORE { + HelpID = "sw:MoreButton:DLG_AUTOFMT_TABLE:BTN_MORE"; Pos = MAP_APPFONT ( 255 , 101 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~More" ; @@ -125,6 +132,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; PushButton BTN_ADD { + HelpID = "sw:PushButton:DLG_AUTOFMT_TABLE:BTN_ADD"; Pos = MAP_APPFONT ( 255 , 64 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Add" ; @@ -132,6 +140,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; PushButton BTN_REMOVE { + HelpID = "sw:PushButton:DLG_AUTOFMT_TABLE:BTN_REMOVE"; Pos = MAP_APPFONT ( 255 , 81 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Delete" ; @@ -139,6 +148,7 @@ ModalDialog DLG_AUTOFMT_TABLE }; PushButton BTN_RENAME { + HelpID = "sw:PushButton:DLG_AUTOFMT_TABLE:BTN_RENAME"; Pos = MAP_APPFONT ( 255 , 123 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -219,6 +229,7 @@ ModalDialog DLG_SWDLG_STRINPUT HelpID = HID_SWDLG_STRINPUT ; Edit ED_INPUT { + HelpID = "sw:Edit:DLG_SWDLG_STRINPUT:ED_INPUT"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 24 ) ; Size = MAP_APPFONT ( 104 , 12 ) ; diff --git a/sw/source/ui/uiview/makefile.mk b/sw/source/ui/uiview/makefile.mk deleted file mode 100644 index 70a4efa525..0000000000 --- a/sw/source/ui/uiview/makefile.mk +++ /dev/null @@ -1,77 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=uiview - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - view.src \ - pview.src - -EXCEPTIONSFILES= \ - $(SLO)$/formatclipboard.obj \ - $(SLO)$/pview.obj \ - $(SLO)$/scroll.obj \ - $(SLO)$/srcview.obj \ - $(SLO)$/swcli.obj \ - $(SLO)$/uivwimp.obj \ - $(SLO)$/view.obj \ - $(SLO)$/view0.obj \ - $(SLO)$/view1.obj \ - $(SLO)$/view2.obj \ - $(SLO)$/viewcoll.obj \ - $(SLO)$/viewdlg.obj \ - $(SLO)$/viewdlg2.obj \ - $(SLO)$/viewdraw.obj \ - $(SLO)$/viewling.obj \ - $(SLO)$/viewmdi.obj \ - $(SLO)$/viewport.obj \ - $(SLO)$/viewprt.obj \ - $(SLO)$/viewsrch.obj \ - $(SLO)$/viewstat.obj \ - $(SLO)$/viewtab.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -$(SRS)$/uiview.srs: $(SOLARINCDIR)$/svx$/globlmn.hrc - diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index a3a02a8e14..073a340f3a 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -29,8 +29,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - - #include <sfx2/objface.hxx> #include <vcl/timer.hxx> #include <vcl/field.hxx> @@ -38,7 +36,6 @@ #include <vcl/help.hxx> #include <vcl/cmdevt.hxx> #include <vcl/button.hxx> -#include <svtools/printdlg.hxx> #include <svl/whiter.hxx> #include <svl/stritem.hxx> #include <svl/eitem.hxx> @@ -57,7 +54,6 @@ #include <svx/zoomslideritem.hxx> #include <svx/svxids.hrc> - #include <swwait.hxx> #include <globdoc.hxx> #include <wdocsh.hxx> @@ -72,12 +68,11 @@ #include <view.hxx> #include <textsh.hxx> #include <scroll.hxx> -#include <swprtopt.hxx> +#include <prtopt.hxx> #include <docstat.hxx> #include <usrpref.hxx> #include <viewfunc.hxx> - #include <helpid.h> #include <cmdid.h> #include <globals.hrc> @@ -94,8 +89,8 @@ #include <svx/dialogs.hrc> #include <osl/mutex.hxx> -using namespace ::com::sun::star; +using namespace ::com::sun::star; SFX_IMPL_NAMED_VIEWFACTORY(SwPagePreView, "PrintPreview") { SFX_VIEW_REGISTRATION(SwDocShell); @@ -150,7 +145,7 @@ void lcl_InvalidateZoomSlots(SfxBindings& rBindings) }; rBindings.Invalidate( aInval ); } - + // erstmal der Zoom-Dialog class SwPreViewZoomDlg : public SvxStandardDialog { @@ -190,6 +185,7 @@ SwPreViewZoomDlg::~SwPreViewZoomDlg() { } +SwPreViewZoomDlg::~SwPreViewZoomDlg() {} void SwPreViewZoomDlg::Apply() { ((SwPagePreViewWin*)GetParent())->CalcWish( @@ -1202,8 +1198,7 @@ void SwPagePreView::Init(const SwViewOption * pPrefs) GetViewShell()->ApplyAccessiblityOptions(SW_MOD()->GetAccessibilityOptions()); // OD 09.01.2003 #i6467# - adjust view shell option to the same as for print - SwPrtOptions aPrintOptions( GetViewFrame()->GetObjectShell()->GetTitle(0) ); - aPrintOptions.MakeOptions( false ); + SwPrintData const aPrintOptions = *SW_MOD()->GetPrtOptions(false); GetViewShell()->AdjustOptionsForPagePreview( aPrintOptions ); IDocumentSettingAccess* pIDSA = pESh->getIDocumentSettingAccess(); @@ -1313,6 +1308,11 @@ SwPagePreView::~SwPagePreView() } +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + SwDocShell* SwPagePreView::GetDocShell() { return PTR_CAST(SwDocShell, GetViewFrame()->GetObjectShell()); @@ -1329,9 +1329,9 @@ int SwPagePreView::_CreateScrollbar( BOOL bHori ) { pPageUpBtn = new ImageButton(pMDI, SW_RES( BTN_PAGEUP ) ); - pPageUpBtn->SetHelpId(FN_PAGEUP); + pPageUpBtn->SetHelpId(GetStaticInterface()->GetSlot(FN_PAGEUP)->GetCommand()); pPageDownBtn = new ImageButton(pMDI, SW_RES( BTN_PAGEDOWN ) ); - pPageDownBtn->SetHelpId(FN_PAGEDOWN); + pPageDownBtn->SetHelpId(GetStaticInterface()->GetSlot(FN_PAGEDOWN)->GetCommand()); Link aLk( LINK( this, SwPagePreView, BtnPage ) ); pPageUpBtn->SetClickHdl( aLk ); pPageDownBtn->SetClickHdl( aLk ); @@ -1788,13 +1788,6 @@ SfxTabPage* SwPagePreView::CreatePrintOptionsPage( Window *pParent, return ::CreatePrintOptionsPage( pParent, rOptions, !bNormalPrint ); } -PrintDialog* SwPagePreView::CreatePrintDialog( Window *pParent ) -{ - PrintDialog *pDlg = ::CreatePrintDialog( pParent, 1, 0 ); - pDlg->DisableRange( PRINTDIALOG_SELECTION ); - return pDlg; -} - // OD 18.12.2002 #103492# - no longer needed ?? Size SwPagePreView::GetOptimalSizePixel() const { diff --git a/sw/source/ui/uiview/pview.src b/sw/source/ui/uiview/pview.src index 4b97c83c43..0cfd2b1ec0 100644 --- a/sw/source/ui/uiview/pview.src +++ b/sw/source/ui/uiview/pview.src @@ -29,7 +29,6 @@ #include "pview.hrc" #include "helpid.h" #include "cmdid.h" - ModalDialog DLG_PAGEPREVIEW_ZOOM { HelpID = HID_PPREV_ZOOM ; @@ -54,6 +53,7 @@ ModalDialog DLG_PAGEPREVIEW_ZOOM }; NumericField ED_COL { + HelpID = "sw:NumericField:DLG_PAGEPREVIEW_ZOOM:ED_COL"; Border = TRUE ; Size = MAP_APPFONT ( 28 , 12 ) ; Pos = MAP_APPFONT ( 48 , 34 ) ; @@ -69,6 +69,7 @@ ModalDialog DLG_PAGEPREVIEW_ZOOM }; NumericField ED_ROW { + HelpID = "sw:NumericField:DLG_PAGEPREVIEW_ZOOM:ED_ROW"; Border = TRUE ; Pos = MAP_APPFONT ( 48 , 13 ) ; Size = MAP_APPFONT ( 28 , 12 ) ; @@ -106,92 +107,4 @@ String RID_PVIEW_TOOLBOX { Text [ en-US ] = "Page Preview" ; }; -ToolBox RID_PVIEW_TOOLBOX -{ - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - HelpID = HID_PVIEW_TOOLBOX ; - ItemList = - { - ToolBoxItem - { - Identifier = FN_PAGEUP ; - HelpID = FN_PAGEUP ; - }; - ToolBoxItem - { - Identifier = FN_PAGEDOWN ; - HelpID = FN_PAGEDOWN ; - }; - ToolBoxItem - { - Identifier = FN_START_OF_DOCUMENT ; - HelpID = FN_START_OF_DOCUMENT ; - }; - ToolBoxItem - { - Identifier = FN_END_OF_DOCUMENT ; - HelpID = FN_END_OF_DOCUMENT ; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - ToolBoxItem - { - Identifier = FN_SHOW_TWO_PAGES ; - HelpID = FN_SHOW_TWO_PAGES ; - }; - ToolBoxItem - { - Identifier = FN_SHOW_MULTIPLE_PAGES ; - HelpID = FN_SHOW_MULTIPLE_PAGES ; - DropDown = TRUE; - }; - ToolBoxItem - { - Identifier = FN_SHOW_BOOKVIEW ; - HelpID = FN_SHOW_BOOKVIEW ; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - ToolBoxItem - { - Identifier = SID_ZOOM_OUT; - HelpID = SID_ZOOM_OUT ; - }; - ToolBoxItem - { - Identifier = SID_ZOOM_IN; - HelpID = SID_ZOOM_IN ; - }; - ToolBoxItem - { - Identifier = FN_PREVIEW_ZOOM; - HelpID = HID_PREVIEW_ZOOM ; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - ToolBoxItem - { - Identifier = SID_WIN_FULLSCREEN ; - HelpID = SID_WIN_FULLSCREEN ; - }; - ToolBoxItem - { - Identifier = FN_PRINT_PAGEPREVIEW ; - HelpID = FN_PRINT_PAGEPREVIEW ; - }; - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - ToolBoxItem - { - Identifier = FN_CLOSE_PAGEPREVIEW; - HelpID = SID_PRINTPREVIEW; - }; - }; - Scroll = TRUE ; -}; diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index d6f585d3c2..ec40afff50 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -50,6 +50,8 @@ #include <svl/whiter.hxx> #include <unotools/saveopt.hxx> #include <svtools/transfer.hxx> +#include <svtools/svtools.hrc> +#include <svtools/svtdata.hxx> #include <svx/svxids.hrc> #include <svtools/htmlcfg.hxx> #include <sfx2/app.hxx> @@ -509,7 +511,7 @@ void SwSrcView::GetState(SfxItemSet& rSet) nCount = rMgr.GetUndoActionCount(); if(nCount) { - String aStr(ResId( STR_UNDO, *SFX_APP()->GetSfxResManager() ));; + String aStr(SvtResId( STR_UNDO));; aStr += rMgr.GetUndoActionComment(--nCount); rSet.Put(SfxStringItem(nWhich, aStr)); } @@ -521,7 +523,7 @@ void SwSrcView::GetState(SfxItemSet& rSet) nCount = rMgr.GetRedoActionCount(); if(nCount) { - String aStr(ResId( STR_REDO, *SFX_APP()->GetSfxResManager() ));; + String aStr(SvtResId( STR_REDO));; aStr += rMgr.GetRedoActionComment(--nCount); rSet.Put(SfxStringItem(nWhich,aStr)); } @@ -654,6 +656,7 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, StartSearchAndReplace( rSearchItem, FALSE, FALSE, TRUE ); } } + } } return nFound; } diff --git a/sw/source/ui/uiview/swcli.cxx b/sw/source/ui/uiview/swcli.cxx index 2966c0058a..a85793ff86 100644 --- a/sw/source/ui/uiview/swcli.cxx +++ b/sw/source/ui/uiview/swcli.cxx @@ -28,14 +28,17 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" -#include <com/sun/star/embed/NoVisualAreaSizeException.hpp> +#include <com/sun/star/embed/NoVisualAreaSizeException.hpp> #include <wrtsh.hxx> +#include <doc.hxx> #include <swtypes.hxx> #include <view.hxx> #include <edtwin.hxx> #include <swcli.hxx> +#include <cmdid.h> +#include <cfgitems.hxx> #include <toolkit/helper/vclunohelper.hxx> @@ -169,4 +172,16 @@ void SwOleClient::MakeVisible() rSh.MakeObjVisible( GetObject() ); } +void SwOleClient::FormatChanged() +{ + const uno::Reference < embed::XEmbeddedObject >& xObj( GetObject() ); + SwView * pView = dynamic_cast< SwView * >( GetViewShell() ); + if ( pView && xObj.is() && SotExchange::IsMath( xObj->getClassID() ) ) + { + SwWrtShell & rWrtSh = pView->GetWrtShell(); + if (rWrtSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT )) + rWrtSh.AlignFormulaToBaseline( xObj ); + } +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/uiview/uivwimp.cxx b/sw/source/ui/uiview/uivwimp.cxx index 53948180ca..d139f53e64 100644 --- a/sw/source/ui/uiview/uivwimp.cxx +++ b/sw/source/ui/uiview/uivwimp.cxx @@ -268,7 +268,7 @@ SwScannerEventListener::~SwScannerEventListener() void SAL_CALL SwScannerEventListener::disposing( const EventObject& rEventObject) throw(uno::RuntimeException) { SolarMutexGuard aGuard; -#if defined WIN || defined WNT || defined UNX +#if defined WNT || defined UNX if( pView ) pView->ScannerEventHdl( rEventObject ); #endif diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 63be548245..de817e8da6 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -2,7 +2,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,7 +39,6 @@ #include <svl/eitem.hxx> #include <unotools/undoopt.hxx> #include <unotools/lingucfg.hxx> -#include <svtools/printdlg.hxx> #include <unotools/useroptions.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/request.hxx> @@ -94,7 +93,6 @@ #include <frmui.hrc> #include <cfgitems.hxx> #include <prtopt.hxx> -#include <swprtopt.hxx> #include <linguistic/lngprops.hxx> #include <editeng/unolingu.hxx> #include <com/sun/star/frame/FrameSearchFlag.hpp> @@ -174,7 +172,7 @@ void SwView::ImpSetVerb( int nSelType ) } if ( bResetVerbs ) { - SetVerbs( 0 ); + SetVerbs( Sequence< embed::VerbDescriptor >() ); bVerbsActive = sal_False; } } @@ -1715,7 +1713,7 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SfxViewShell::Notify(rBC, rHint); } -#if defined WIN || defined WNT || defined UNX +#if defined WNT || defined UNX void SwView::ScannerEventHdl( const EventObject& /*rEventObject*/ ) { @@ -1839,19 +1837,18 @@ void SwView::NotifyDBChanged() /*-------------------------------------------------------------------- Beschreibung: Drucken --------------------------------------------------------------------*/ -SfxObjectShellRef & SwView::GetTmpSelectionDoc() +SfxObjectShellLock & SwView::GetTmpSelectionDoc() { return GetViewImpl()->GetTmpSelectionDoc(); } -SfxObjectShellRef & SwView::GetOrCreateTmpSelectionDoc() +SfxObjectShellLock & SwView::GetOrCreateTmpSelectionDoc() { - SfxObjectShellRef &rxTmpDoc = GetViewImpl()->GetTmpSelectionDoc(); + SfxObjectShellLock &rxTmpDoc = GetViewImpl()->GetTmpSelectionDoc(); if (!rxTmpDoc.Is()) { SwXTextView *pImpl = GetViewImpl()->GetUNOObject_Impl(); - rxTmpDoc = pImpl->BuildTmpSelectionDoc( - GetViewImpl()->GetEmbeddedObjRef() ); + rxTmpDoc = pImpl->BuildTmpSelectionDoc(); } return rxTmpDoc; } @@ -1861,18 +1858,13 @@ void SwView::AddTransferable(SwTransferable& rTransferable) GetViewImpl()->AddTransferable(rTransferable); } -void SwPrtOptions::MakeOptions( BOOL bWeb ) -{ - *this = *SW_MOD()->GetPrtOptions(bWeb); - - nCopyCount = 1; - bCollate = FALSE; - bPrintSelection = FALSE; - bJobStartet = FALSE; +namespace sw { - aMulti.SetTotalRange( Range( 0, RANGE_MAX ) ); - aMulti.SelectAll(); - aMulti.Select( 0, FALSE ); +void InitPrintOptionsFromApplication(SwPrintData & o_rData, bool const bWeb) +{ + o_rData = *SW_MOD()->GetPrtOptions(bWeb); } +} // namespace sw + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/uiview/view.src b/sw/source/ui/uiview/view.src index 233664b509..e006ee71ae 100644 --- a/sw/source/ui/uiview/view.src +++ b/sw/source/ui/uiview/view.src @@ -196,160 +196,6 @@ String MN_SRCVIEW_POPUPMENU Text [ en-US ] = "HTML source" ; }; -ToolBox RID_TOOLS_TOOLBOX -{ - HelpID = HID_TOOLS_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Scroll = TRUE ; - Align = BOXALIGN_LEFT ; - Hide = TRUE ; - ItemList = - { - ToolBoxItem - { - Identifier = FN_INSERT_CTRL ; - HelpID = HID_INSERT_CTRL ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_FIELD_CTRL ; - HelpID = HID_INSERT_FIELD_CTRL ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_OBJ_CTRL ; - HelpID = HID_INSERT_OBJ_CTRL ; - DropDown = TRUE ; - }; - ToolBoxItem - { - ITEM_TOOLBAR_INSERT_DRAW - }; - ToolBoxItem - { - ITEM_FORM_CONFIG - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_GLOSSARY_DLG ; - HelpID = FN_GLOSSARY_DLG ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_CAPTION; - HelpID = FN_INSERT_CAPTION ; - Hide = TRUE ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_IDX_ENTRY_DLG; - HelpId = FN_INSERT_IDX_ENTRY_DLG; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_INSERT_REF_FIELD; - HelpID = FN_INSERT_REF_FIELD ; - Hide = TRUE ; - }; - ToolBoxItem - { - Identifier = FN_SHADOWCURSOR ; - HelpID = FN_SHADOWCURSOR ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_SPELL_GRAMMAR_DIALOG; - HelpID = FN_SPELL_GRAMMAR_DIALOG; - }; - ToolBoxItem - { - ITEM_TOOLBAR_AUTOSPELL_CHECK - }; - ToolBoxItem - { - Identifier = FN_HYPHENATE_OPT_DLG; - HelpID = FN_HYPHENATE_OPT_DLG; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = SID_THESAURUS; - HelpID = SID_THESAURUS; - Hide = TRUE; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_SEARCH_DLG ; - HelpID = SID_SEARCH_DLG ; - }; - ToolBoxItem - { - Identifier = SID_VIEW_DATA_SOURCE_BROWSER ; - HelpID = SID_VIEW_DATA_SOURCE_BROWSER ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_ATTR_ZOOM; - HelpID = SID_ATTR_ZOOM ; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_VIEW_META_CHARS ; - HelpID = FN_VIEW_META_CHARS ; - }; - ToolBoxItem - { - Identifier = FN_VIEW_FIELDNAME ; - HelpID = FN_VIEW_FIELDNAME ; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_VIEW_GRAPHIC ; - HelpID = FN_VIEW_GRAPHIC ; - }; - ToolBoxItem - { - Identifier = SID_BROWSER_MODE ; - HelpID = SID_BROWSER_MODE ; - }; - }; -}; Menu MN_SRCVIEW_POPUPMENU { ItemList = diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index e0e38c7b23..766c10b00d 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -919,7 +919,7 @@ void SwView::Execute(SfxRequest &rReq) GetViewFrame()->GetBindings().Invalidate( nSlot ); } break; -#if defined WIN || defined WNT || defined UNX +#if defined WNT || defined UNX case SID_TWAIN_SELECT: case SID_TWAIN_TRANSFER: GetViewImpl()->ExecuteScan( rReq ); @@ -2075,14 +2075,15 @@ long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion ) else { SfxObjectShellRef xDocSh; + SfxObjectShellLock xLockRef; -extern int lcl_FindDocShell( SfxObjectShellRef& xDocSh, +extern int lcl_FindDocShell( SfxObjectShellRef& xDocSh, SfxObjectShellLock& xLockRef, const String& rFileName, const String& rPasswd, String& rFilter, INT16 nVersion, SwDocShell* pDestSh ); String sFltNm; - int nRet = lcl_FindDocShell( xDocSh, pMedium->GetName(), aEmptyStr, + int nRet = lcl_FindDocShell( xDocSh, xLockRef, pMedium->GetName(), aEmptyStr, sFltNm, nVersion, pDocSh ); if( nRet ) { diff --git a/sw/source/ui/uiview/viewdlg2.cxx b/sw/source/ui/uiview/viewdlg2.cxx index 718ad43c44..53242a431f 100644 --- a/sw/source/ui/uiview/viewdlg2.cxx +++ b/sw/source/ui/uiview/viewdlg2.cxx @@ -32,7 +32,7 @@ #include <sfx2/request.hxx> #include <sfx2/viewfrm.hxx> - +#include <sfx2/objface.hxx> #include <fldmgr.hxx> #include <expfld.hxx> @@ -89,7 +89,7 @@ void SwView::ExecDlgExt(SfxRequest &rReq) pMDI, *pWrtShell, TRUE ); OSL_ENSURE(pDlg, "Dialogdiet fail!"); - pDlg->SetHelpId(FN_EDIT_FOOTNOTE); + pDlg->SetHelpId(GetStaticInterface()->GetSlot(FN_EDIT_FOOTNOTE)->GetCommand()); pDlg->SetText( SW_RESSTR(STR_EDIT_FOOTNOTE) ); pDlg->Execute(); delete pDlg; diff --git a/sw/source/ui/uiview/viewfunc.hxx b/sw/source/ui/uiview/viewfunc.hxx index 64d597a477..8ce208f31a 100644 --- a/sw/source/ui/uiview/viewfunc.hxx +++ b/sw/source/ui/uiview/viewfunc.hxx @@ -31,7 +31,6 @@ class ImageButton; class Point; -class PrintDialog; class SfxItemSet; class SfxPrinter; class SfxTabPage; @@ -43,7 +42,6 @@ class Window; class SwWrtShell; // folgende Funktionen stehen im viewprt.cxx -PrintDialog* CreatePrintDialog( Window* , USHORT, SwWrtShell* ); void SetPrinter( IDocumentDeviceAccess*, SfxPrinter*, BOOL bWeb ); SfxTabPage* CreatePrintOptionsPage( Window*, const SfxItemSet& ); void SetAppPrintOptions( ViewShell* pSh, BOOL bWeb ); diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx index 94433f0049..686cd4a04e 100644..100755 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -844,6 +844,145 @@ sal_Bool SwView::ExecSmartTagPopup( const Point& rPt ) return bRet; } + + +class SwFieldPopup : public PopupMenu +{ +public: + SwFieldPopup() { + InsertItem(1, ::rtl::OUString::createFromAscii("Hello")); + } +}; + +class SwFieldListBox : public ListBox +{ +public: + SwFieldListBox(Window* pParent) : ListBox(pParent /*, WB_DROPDOWN*/) { + } + + void *GetImplWin() { + return NULL; //FIXME!!! +// return mpImplWin; + } + +protected: + virtual void LoseFocus() { +// printf("ListBox: lose focus!!\n"); + ListBox::LoseFocus(); + } + + virtual void Select() { +// printf("SELECT!!! IsTravelSelect=%i\n", IsTravelSelect()); + ListBox::Select(); + } +}; + +class SwFieldDialog : public Dialog +{ +private: + SwFieldListBox aListBox; + Edit aText; + int selection; + + DECL_LINK( MyListBoxHandler, ListBox * ); + +public: + SwFieldDialog(Window* parent, IFieldmark *fieldBM) : Dialog(parent, WB_BORDER | WB_SYSTEMWINDOW | WB_NOSHADOW ), aListBox(this), aText(this, WB_RIGHT | WB_READONLY), selection(-1) { + + assert(fieldBM!=NULL); + if (fieldBM!=NULL) { + const IFieldmark::parameter_map_t* const pParameters = fieldBM->GetParameters(); + IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find(::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_LISTENTRY)); + if(pListEntries != pParameters->end()) + { + Sequence< ::rtl::OUString> vListEntries; + pListEntries->second >>= vListEntries; + for( ::rtl::OUString* pCurrent = vListEntries.getArray(); + pCurrent != vListEntries.getArray() + vListEntries.getLength(); + ++pCurrent) + { + aListBox.InsertEntry(*pCurrent); + } + } + } + Size lbSize=aListBox.GetOptimalSize(WINDOWSIZE_PREFERRED); + lbSize.Width()+=50; + lbSize.Height()+=20; + aListBox.SetSizePixel(lbSize); + aListBox.SetSelectHdl( LINK( this, SwFieldDialog, MyListBoxHandler ) ); + aListBox.Show(); + aText.SetText(rtl::OUString::createFromAscii("Cancel")); + Size tSize=aText.GetOptimalSize(WINDOWSIZE_PREFERRED); + aText.SetSizePixel(Size(lbSize.Width(), tSize.Height())); + aText.SetPosPixel(Point(0, lbSize.Height())); + aText.Show(); + SetSizePixel(Size(lbSize.Width(), lbSize.Height()+tSize.Height())); +// SetSizePixel(Size(200, 200)); + } + + int getSelection() { + return selection; + } +protected: + /* + virtual void LoseFocus() { + printf("lose focus!!\n"); + Dialog::LoseFocus(); + printf("close:\n"); + EndDialog(8); + } + */ + + virtual long PreNotify( NotifyEvent& rNEvt ) { + if (rNEvt.GetType() == EVENT_LOSEFOCUS && aListBox.GetImplWin()==rNEvt.GetWindow()) { + EndDialog(8); + return 1; + } + if (rNEvt.GetType() == EVENT_KEYINPUT) { +// printf("PreNotify::KEYINPUT\n"); + } + return Dialog::PreNotify(rNEvt); + } +}; + +IMPL_LINK( SwFieldDialog, MyListBoxHandler, ListBox *, pBox ) +{ +// printf("### DROP DOWN SELECT... IsTravelSelect=%i\n", pBox->IsTravelSelect()); + if (pBox->IsTravelSelect()) { + return 0; + } else { + this->selection=pBox->GetSelectEntryPos(); + EndDialog(9); //@TODO have meaningfull returns... + return 1; + } +} + + +BOOL SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM ) +{ + sal_Bool bRet = sal_False; + const sal_Bool bOldViewLock = pWrtShell->IsViewLocked(); + pWrtShell->LockView( sal_True ); + pWrtShell->Push(); + + bRet=sal_True; + const Point aPixPos = GetEditWin().LogicToPixel( rPt ); + + SwFieldDialog aFldDlg(pEditWin, fieldBM); + aFldDlg.SetPosPixel(pEditWin->OutputToScreenPixel(aPixPos)); + + /*short ret=*/aFldDlg.Execute(); + sal_Int32 selection=aFldDlg.getSelection(); + if (selection>=0) { + (*fieldBM->GetParameters())[::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_RESULT)] = makeAny(selection); + } + + pWrtShell->Pop( sal_False ); + pWrtShell->LockView( bOldViewLock ); + + return bRet; +} + class SwFieldPopup : public PopupMenu { public: diff --git a/sw/source/ui/uiview/viewprt.cxx b/sw/source/ui/uiview/viewprt.cxx index 5e7d728bfe..17ee353a65 100644 --- a/sw/source/ui/uiview/viewprt.cxx +++ b/sw/source/ui/uiview/viewprt.cxx @@ -47,7 +47,6 @@ #include <sfx2/app.hxx> #include <vcl/msgbox.hxx> #include <vcl/oldprintadaptor.hxx> -#include <svtools/printdlg.hxx> #include <sfx2/printer.hxx> #include <sfx2/prnmon.hxx> #include <editeng/paperinf.hxx> @@ -68,7 +67,6 @@ #include <docsh.hxx> #include <viewopt.hxx> #include <prtopt.hxx> -#include <swprtopt.hxx> #include <fontcfg.hxx> #include <cfgitems.hxx> #include <dbmgr.hxx> @@ -175,34 +173,6 @@ SfxTabPage* SwView::CreatePrintOptionsPage(Window* pParent, } /*-------------------------------------------------------------------- - Beschreibung: Druckerdialog - --------------------------------------------------------------------*/ -PrintDialog* CreatePrintDialog( Window* pParent, USHORT nPg, SwWrtShell* pSh ) -{ - PrintDialog *pDlg = new PrintDialog( pParent, false ); - - if ( !nPg ) - nPg = 1; - pDlg->EnableRange( PRINTDIALOG_FROMTO ); - - if (pSh && (pSh->IsSelection() || pSh->IsFrmSelected() || pSh->IsObjSelected())) - pDlg->EnableRange( PRINTDIALOG_SELECTION ); - - pDlg->SetRangeText( String::CreateFromInt32(nPg) ); - pDlg->EnableRange( PRINTDIALOG_RANGE ); - pDlg->EnableCollate(); - return pDlg; -} - -PrintDialog* SwView::CreatePrintDialog( Window* pParent ) -{ - // AMA: Hier sollte vielleicht die virtuelle Seitennummer angezeigt werden, - // aber nur, wenn das Drucken virtuelle Seitennummern und nicht wie - // bisher (auch beim SWG 2.0) physikalische beachtet werden. - return ::CreatePrintDialog( pParent, GetWrtShell().GetPhyPageNum(), &GetWrtShell() ); -} - -/*-------------------------------------------------------------------- Beschreibung: Print-Dispatcher --------------------------------------------------------------------*/ void SwView::ExecutePrint(SfxRequest& rReq) diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx index b37741dfce..81939da811 100644 --- a/sw/source/ui/uiview/viewstat.cxx +++ b/sw/source/ui/uiview/viewstat.cxx @@ -217,7 +217,7 @@ void SwView::GetState(SfxItemSet &rSet) break; case SID_TWAIN_SELECT: case SID_TWAIN_TRANSFER: -#if defined WIN || defined WNT || defined UNX +#if defined WNT || defined UNX { if(!SW_MOD()->GetScannerManager().is()) rSet.DisableItem(nWhich); diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx index 592fb0f9c2..31a62cf16f 100644 --- a/sw/source/ui/uiview/viewtab.cxx +++ b/sw/source/ui/uiview/viewtab.cxx @@ -518,7 +518,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) aUL.SetLower( (USHORT)aLongULSpace.GetLower() ); aDesc.GetMaster().SetFmtAttr( aUL ); - if( (bHead && pHeaderFmt) || (!bHead && pFooterFmt )) + if( (bHead && pHeaderFmt) || (!bHead && pFooterFmt) ) { SwFmtFrmSize aSz( bHead ? pHeaderFmt->GetFrmSize() : pFooterFmt->GetFrmSize() ); @@ -679,7 +679,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SvxColumnItem aColItem((const SvxColumnItem&)rReq. GetArgs()->Get(nSlot)); - if( bSetTabColFromDoc || (!bSect && rSh.GetTableFmt())) + if( bSetTabColFromDoc || (!bSect && rSh.GetTableFmt()) ) { OSL_ENSURE(aColItem.Count(), "ColDesc is empty!!"); @@ -1259,9 +1259,9 @@ void SwView::StateTabWin(SfxItemSet& rSet) BOOL bTableVertical = bHasTable && rSh.IsTableVertical(); - if(((SID_RULER_BORDERS_VERTICAL == nWhich) && + if( ( (SID_RULER_BORDERS_VERTICAL == nWhich) && ((bHasTable && !bTableVertical) || - (!bVerticalWriting && !bFrmSelection && !bHasTable ) || + (!bVerticalWriting && !bFrmSelection && !bHasTable ) || (bFrmSelection && !bFrameHasVerticalColumns)) ) || ( bFrmSelection && !bFrameHasVerticalColumns))) || ((SID_RULER_BORDERS == nWhich) && ((bHasTable && bTableVertical) || @@ -1479,8 +1479,8 @@ void SwView::StateTabWin(SfxItemSet& rSet) BOOL bFrameRTL; BOOL bFrameHasVerticalColumns = rSh.IsFrmVertical(FALSE, bFrameRTL) && bFrmSelection; - if(((SID_RULER_ROWS == nWhich) && - ((!bVerticalWriting && !bFrmSelection) || (bFrmSelection && !bFrameHasVerticalColumns))) || + if( ( (SID_RULER_ROWS == nWhich) && + ((!bVerticalWriting && !bFrmSelection) || (bFrmSelection && !bFrameHasVerticalColumns)) ) || ((SID_RULER_ROWS_VERTICAL == nWhich) && ((bVerticalWriting && !bFrmSelection) || bFrameHasVerticalColumns))) rSet.DisableItem(nWhich); diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx index 71c73a71c4..3e6b1f301a 100644 --- a/sw/source/ui/uno/SwXDocumentSettings.cxx +++ b/sw/source/ui/uno/SwXDocumentSettings.cxx @@ -32,7 +32,6 @@ #include <osl/mutex.hxx> #include <sfx2/sfxbasecontroller.hxx> #include <SwXDocumentSettings.hxx> -#include <SwXPrintPreviewSettings.hxx> #include <comphelper/MasterPropertySetInfo.hxx> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/i18n/XForbiddenCharacters.hpp> @@ -122,6 +121,7 @@ enum SwDocumentSettingsPropertyHandles // <-- HANDLE_MODIFYPASSWORDINFO, HANDLE_INVERT_BORDER_SPACING, + HANDLE_MATH_BASELINE_ALIGNMENT, HANDLE_COLLAPSE_EMPTY_CELL_PARA }; @@ -178,6 +178,7 @@ MasterPropertySetInfo * lcl_createSettingsInfo() { RTL_CONSTASCII_STRINGPARAM("TabAtLeftIndentForParagraphsInList"), HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, CPPUTYPE_BOOLEAN, 0, 0}, { RTL_CONSTASCII_STRINGPARAM("ModifyPasswordInfo"), HANDLE_MODIFYPASSWORDINFO, CPPUTYPE_PROPERTYVALUE, 0, 0}, { RTL_CONSTASCII_STRINGPARAM("InvertBorderSpacing"), HANDLE_INVERT_BORDER_SPACING, CPPUTYPE_BOOLEAN, 0, 0}, + { RTL_CONSTASCII_STRINGPARAM("MathBaselineAlignment"), HANDLE_MATH_BASELINE_ALIGNMENT, CPPUTYPE_BOOLEAN, 0, 0}, { RTL_CONSTASCII_STRINGPARAM("CollapseEmptyCellPara"), HANDLE_COLLAPSE_EMPTY_CELL_PARA, CPPUTYPE_BOOLEAN, 0, 0}, /* * As OS said, we don't have a view when we need to set this, so I have to @@ -220,7 +221,6 @@ SwXDocumentSettings::SwXDocumentSettings ( SwXTextDocument * pModel ) , mpPrinter( NULL ) { registerSlave ( new SwXPrintSettings ( PRINT_SETTINGS_DOCUMENT, mpModel->GetDocShell()->GetDoc() ) ); - registerSlave ( new SwXPrintPreviewSettings ( mpModel->GetDocShell()->GetDoc() ) ); } SwXDocumentSettings::~SwXDocumentSettings() @@ -687,12 +687,18 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf uno::Reference< uno::XInterface >() ); } break; - case HANDLE_INVERT_BORDER_SPACING: - { + case HANDLE_MATH_BASELINE_ALIGNMENT: + { + sal_Bool bTmp = *(sal_Bool*)rValue.getValue(); + mpDoc->set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT, bTmp ); + } + break; + case HANDLE_INVERT_BORDER_SPACING: + { sal_Bool bTmp = *(sal_Bool*)rValue.getValue(); mpDoc->set(IDocumentSettingAccess::INVERT_BORDER_SPACING, bTmp); - } - break; + } + break; case HANDLE_COLLAPSE_EMPTY_CELL_PARA: { sal_Bool bTmp = *(sal_Bool*)rValue.getValue(); @@ -1030,12 +1036,18 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf rValue <<= mpDocSh->GetModifyPasswordInfo(); } break; - case HANDLE_INVERT_BORDER_SPACING: - { + case HANDLE_MATH_BASELINE_ALIGNMENT: + { + sal_Bool bTmp = mpDoc->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ); + rValue.setValue( &bTmp, ::getBooleanCppuType() ); + } + break; + case HANDLE_INVERT_BORDER_SPACING: + { sal_Bool bTmp = mpDoc->get(IDocumentSettingAccess::INVERT_BORDER_SPACING); rValue.setValue( &bTmp, ::getBooleanCppuType() ); - } - break; + } + break; case HANDLE_COLLAPSE_EMPTY_CELL_PARA: { sal_Bool bTmp = mpDoc->get( IDocumentSettingAccess::COLLAPSE_EMPTY_CELL_PARA ); @@ -1086,5 +1098,4 @@ Sequence< OUString > SAL_CALL SwXDocumentSettings::getSupportedServiceNames( ) return aSeq; } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/uno/SwXPrintPreviewSettings.cxx b/sw/source/ui/uno/SwXPrintPreviewSettings.cxx deleted file mode 100644 index 4c98e0692a..0000000000 --- a/sw/source/ui/uno/SwXPrintPreviewSettings.cxx +++ /dev/null @@ -1,370 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General 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 <SwXPrintPreviewSettings.hxx> -#include <comphelper/ChainablePropertySetInfo.hxx> -#include <pvprtdat.hxx> -#include <swtypes.hxx> -#include <com/sun/star/beans/PropertyAttribute.hpp> -#include <doc.hxx> -#include <vcl/svapp.hxx> -using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::lang; -using namespace ::comphelper; -using ::rtl::OUString; - -enum SwPrintSettingsPropertyHandles -{ - HANDLE_PRINTSET_PREVIEW_LEFT_MARGIN, - HANDLE_PRINTSET_PREVIEW_RIGHT_MARGIN, - HANDLE_PRINTSET_PREVIEW_TOP_MARGIN, - HANDLE_PRINTSET_PREVIEW_BOTTOM_MARGIN, - HANDLE_PRINTSET_PREVIEW_HORIZONTAL_SPACING, - HANDLE_PRINTSET_PREVIEW_VERTICAL_SPACING, - HANDLE_PRINTSET_PREVIEW_NUM_ROWS, - HANDLE_PRINTSET_PREVIEW_NUM_COLUMNS, - HANDLE_PRINTSET_PREVIEW_LANDSCAPE -}; - -static ChainablePropertySetInfo * lcl_createPrintPreviewSettingsInfo() -{ - static PropertyInfo aPrintPreviewSettingsMap_Impl[] = - { - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintLeftMargin" ), HANDLE_PRINTSET_PREVIEW_LEFT_MARGIN, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintRightMargin" ), HANDLE_PRINTSET_PREVIEW_RIGHT_MARGIN, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintTopMargin" ), HANDLE_PRINTSET_PREVIEW_TOP_MARGIN, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintBottomMargin" ),HANDLE_PRINTSET_PREVIEW_BOTTOM_MARGIN, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintHorizontalSpacing" ),HANDLE_PRINTSET_PREVIEW_HORIZONTAL_SPACING, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintVerticalSpacing" ), HANDLE_PRINTSET_PREVIEW_VERTICAL_SPACING, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintNumRows" ), HANDLE_PRINTSET_PREVIEW_NUM_ROWS, CPPUTYPE_INT8, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintNumColumns" ), HANDLE_PRINTSET_PREVIEW_NUM_COLUMNS, CPPUTYPE_INT8, PropertyAttribute::MAYBEVOID, 0 }, - { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintLandscape" ), HANDLE_PRINTSET_PREVIEW_LANDSCAPE, CPPUTYPE_BOOLEAN, PropertyAttribute::MAYBEVOID, 0 }, - { 0, 0, 0, CPPUTYPE_UNKNOWN, 0, 0 } - }; - return new ChainablePropertySetInfo ( aPrintPreviewSettingsMap_Impl ); -} - -SwXPrintPreviewSettings::SwXPrintPreviewSettings( SwDoc *pDoc) -: ChainablePropertySet ( lcl_createPrintPreviewSettingsInfo (), &Application::GetSolarMutex() ) -, mbPreviewDataChanged( sal_False ) -, mpDoc( pDoc) -{ -} - -SwXPrintPreviewSettings::~SwXPrintPreviewSettings() - throw() -{ -} - -Any SAL_CALL SwXPrintPreviewSettings::queryInterface( const Type& rType ) - throw(RuntimeException) -{ - return ::cppu::queryInterface ( rType , - // OWeakObject interfaces - dynamic_cast< XInterface* >( dynamic_cast< OWeakObject* >(this) ) , - dynamic_cast< XWeak* >( this ) , - // my own interfaces - dynamic_cast< XServiceInfo* >( this ) , - dynamic_cast< XPropertySet* >( this ) , - dynamic_cast< XMultiPropertySet* >( this ) ); -} - -void SwXPrintPreviewSettings::acquire () - throw () -{ - OWeakObject::acquire(); -} - -void SwXPrintPreviewSettings::release () - throw () -{ - OWeakObject::release(); -} - -void SwXPrintPreviewSettings::_preSetValues () - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) -{ - if ( mpDoc ) - { - const SwPagePreViewPrtData *pConstPrtData = mpDoc->GetPreViewPrtData(); - mpPreViewData = new SwPagePreViewPrtData; - if ( pConstPrtData ) - { - mpPreViewData->SetLeftSpace ( pConstPrtData->GetLeftSpace() ); - mpPreViewData->SetRightSpace ( pConstPrtData->GetRightSpace() ); - mpPreViewData->SetTopSpace ( pConstPrtData->GetTopSpace() ); - mpPreViewData->SetBottomSpace ( pConstPrtData->GetBottomSpace() ); - mpPreViewData->SetHorzSpace ( pConstPrtData->GetHorzSpace() ); - mpPreViewData->SetVertSpace ( pConstPrtData->GetVertSpace() ); - mpPreViewData->SetRow ( pConstPrtData->GetRow() ); - mpPreViewData->SetCol ( pConstPrtData->GetCol() ); - mpPreViewData->SetLandscape ( pConstPrtData->GetLandscape() ); - } - } -} - -void SwXPrintPreviewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, const uno::Any &rValue ) - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) -{ - switch( rInfo.mnHandle ) - { - case HANDLE_PRINTSET_PREVIEW_LEFT_MARGIN: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > (mpPreViewData->GetLeftSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetLeftSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_RIGHT_MARGIN: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > (mpPreViewData->GetRightSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetRightSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_TOP_MARGIN: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > ( mpPreViewData->GetTopSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetTopSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_BOTTOM_MARGIN: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > ( mpPreViewData->GetBottomSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetBottomSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_HORIZONTAL_SPACING: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > ( mpPreViewData->GetHorzSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetHorzSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_VERTICAL_SPACING: - { - sal_Int32 nVal = 0; - rValue >>= nVal; - nVal = MM100_TO_TWIP( nVal ); - if ( nVal != static_cast < sal_Int32 > ( mpPreViewData->GetVertSpace() ) ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetVertSpace( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_NUM_ROWS: - { - sal_Int8 nVal = 0; - rValue >>= nVal; - if ( nVal != mpPreViewData->GetRow() ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetRow( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_NUM_COLUMNS: - { - sal_Int8 nVal = 0; - rValue >>= nVal; - if ( nVal != mpPreViewData->GetCol() ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetCol( nVal ); - } - } - break; - case HANDLE_PRINTSET_PREVIEW_LANDSCAPE: - { - sal_Bool bVal = *(sal_Bool*)rValue.getValue(); - if ( bVal != mpPreViewData->GetLandscape() ) - { - mbPreviewDataChanged = sal_True; - mpPreViewData->SetLandscape ( bVal ); - } - } - break; - default: - throw UnknownPropertyException(); - } -} - -void SwXPrintPreviewSettings::_postSetValues () - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) -{ - if ( mbPreviewDataChanged ) - { - mpDoc->SetPreViewPrtData ( mpPreViewData ); - mbPreviewDataChanged = sal_False; - } - delete mpPreViewData; - mpPreViewData = NULL; -} - -void SwXPrintPreviewSettings::_preGetValues () - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) -{ - if (mpDoc) - mpConstPreViewData = mpDoc->GetPreViewPrtData(); -} - -void SwXPrintPreviewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, uno::Any & rValue ) - throw(UnknownPropertyException, WrappedTargetException ) -{ - sal_Bool bBool = TRUE; - sal_Bool bBoolVal; - switch( rInfo.mnHandle ) - { - case HANDLE_PRINTSET_PREVIEW_LEFT_MARGIN: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetLeftSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_RIGHT_MARGIN: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetRightSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_TOP_MARGIN: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetTopSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_BOTTOM_MARGIN: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetBottomSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_HORIZONTAL_SPACING: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetHorzSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_VERTICAL_SPACING: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetVertSpace() ) ); - } - break; - case HANDLE_PRINTSET_PREVIEW_NUM_ROWS: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int8 > ( mpConstPreViewData->GetRow() ); - } - break; - case HANDLE_PRINTSET_PREVIEW_NUM_COLUMNS: - { - bBool = FALSE; - if ( mpConstPreViewData ) - rValue <<= static_cast < sal_Int8 > ( mpConstPreViewData->GetCol() ); - } - break; - case HANDLE_PRINTSET_PREVIEW_LANDSCAPE: - { - if (mpConstPreViewData) - bBoolVal = mpConstPreViewData->GetLandscape(); - else - bBool = FALSE; - } - break; - default: - throw UnknownPropertyException(); - } - if(bBool) - rValue.setValue(&bBoolVal, ::getBooleanCppuType()); -} - -void SwXPrintPreviewSettings::_postGetValues () - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) -{ - mpConstPreViewData = NULL; -} - -OUString SwXPrintPreviewSettings::getImplementationName(void) throw( RuntimeException ) -{ - return OUString( RTL_CONSTASCII_USTRINGPARAM ( "SwXPrintPreviewSettings" ) ); -} - -sal_Bool SwXPrintPreviewSettings::supportsService(const OUString& rServiceName) throw( RuntimeException ) -{ - return rServiceName.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "com.sun.star.text.PrintPreviewSettings") ); -} - -Sequence< OUString > SwXPrintPreviewSettings::getSupportedServiceNames(void) throw( RuntimeException ) -{ - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.text.PrintPreviewSettings" ) ); - return aRet; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/uno/SwXPrintPreviewSettings.hxx b/sw/source/ui/uno/SwXPrintPreviewSettings.hxx deleted file mode 100644 index 518f250a5f..0000000000 --- a/sw/source/ui/uno/SwXPrintPreviewSettings.hxx +++ /dev/null @@ -1,90 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _SW_XPRINTPREVIEWSETTINGS_HXX_ -#define _SW_XPRINTPREVIEWSETTINGS_HXX_ - -#ifdef PRECOMPILED -#include "ui_pch.hxx" -#endif -#include <comphelper/ChainablePropertySet.hxx> -#include <com/sun/star/text/XTextDocument.hpp> -#include <cppuhelper/weak.hxx> -#include <com/sun/star/lang/XServiceInfo.hpp> - -class SwDoc; -class SwPagePreViewPrtData; - -class SwXPrintPreviewSettings :public comphelper::ChainablePropertySet, - public cppu::OWeakObject, - public com::sun::star::lang::XServiceInfo -{ - friend class SwXDocumentSettings; -protected: - sal_Bool mbPreviewDataChanged; - SwDoc* mpDoc; - SwPagePreViewPrtData *mpPreViewData; - const SwPagePreViewPrtData *mpConstPreViewData; - - virtual void _preSetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _setSingleValue( const comphelper::PropertyInfo & rInfo, const ::com::sun::star::uno::Any &rValue ) - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _postSetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - - virtual void _preGetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _getSingleValue( const comphelper::PropertyInfo & rInfo, ::com::sun::star::uno::Any & rValue ) - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _postGetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual ~SwXPrintPreviewSettings() - throw(); -public: - SwXPrintPreviewSettings(SwDoc *pDoc); - - - // XInterface - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire( ) - throw (); - virtual void SAL_CALL release( ) - throw (); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) - throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) - throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) - throw( ::com::sun::star::uno::RuntimeException ); -}; -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/uno/detreg.cxx b/sw/source/ui/uno/detreg.cxx index e6c55d11e2..d7dcf4bea9 100644 --- a/sw/source/ui/uno/detreg.cxx +++ b/sw/source/ui/uno/detreg.cxx @@ -44,30 +44,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; } -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* /*pServiceManager*/, - void* pRegistryKey ) -{ - Reference< ::registry::XRegistryKey > - xKey( reinterpret_cast< ::registry::XRegistryKey* >( pRegistryKey ) ) ; - - OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") ); - OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ); - - // Eigentliche Implementierung und ihre Services registrieren - sal_Int32 i; - Reference< ::registry::XRegistryKey > xNewKey; - - xNewKey = xKey->createKey( aDelimiter + SwFilterDetect::impl_getStaticImplementationName() + - aUnoServices ); - - Sequence< OUString > aServices = SwFilterDetect::impl_getStaticSupportedServiceNames(); - for(i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - return sal_True; -} - SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/sw/source/ui/uno/makefile.mk b/sw/source/ui/uno/makefile.mk deleted file mode 100644 index 0023fd52f5..0000000000 --- a/sw/source/ui/uno/makefile.mk +++ /dev/null @@ -1,82 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=unoidl -ENABLE_EXCEPTIONS=TRUE -LIBTARGET=no - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -.IF "$(DVO_XFORMS)" != "" -CDEFS+=-DDVO_XFORMS -.ENDIF - -# --- Files -------------------------------------------------------- - -SLO1FILES = \ - $(SLO)$/unodefaults.obj\ - $(SLO)$/unodispatch.obj\ - $(SLO)$/unotxdoc.obj\ - $(SLO)$/unoatxt.obj \ - $(SLO)$/unomailmerge.obj \ - $(SLO)$/unomod.obj \ - $(SLO)$/unotxvw.obj \ - $(SLO)$/dlelstnr.obj \ - $(SLO)$/unofreg.obj \ - $(SLO)$/SwXDocumentSettings.obj \ - $(SLO)$/SwXPrintPreviewSettings.obj \ - $(SLO)$/SwXFilterOptions.obj\ - $(SLO)$/RefreshListenerContainer.obj \ - $(SLO)$/unomodule.obj \ - $(SLO)$/unodoc.obj - -SLO2FILES = \ - $(SLO)$/swdetect.obj \ - $(SLO)$/swdet2.obj \ - $(SLO)$/detreg.obj - -SLOFILES = \ - $(SLO1FILES) \ - $(SLO2FILES) - -LIB1TARGET = \ - $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO1FILES) - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx index e96dd912a0..efc3e3f00d 100644 --- a/sw/source/ui/uno/swdetect.cxx +++ b/sw/source/ui/uno/swdetect.cxx @@ -272,18 +272,17 @@ SwFilterDetect::~SwFilterDetect() if ( !bRepairPackage ) { // ask the user whether he wants to try to repair - RequestPackageReparation* pRequest = new RequestPackageReparation( aDocumentTitle ); - uno::Reference< task::XInteractionRequest > xRequest ( pRequest ); - xInteraction->handle( xRequest ); - bRepairAllowed = pRequest->isApproved(); + RequestPackageReparation aRequest( aDocumentTitle ); + xInteraction->handle( aRequest.GetRequest() ); + bRepairAllowed = aRequest.isApproved(); } if ( !bRepairAllowed ) { // repair either not allowed or not successful - NotifyBrokenPackage* pNotifyRequest = new NotifyBrokenPackage( aDocumentTitle ); - uno::Reference< task::XInteractionRequest > xRequest ( pNotifyRequest ); - xInteraction->handle( xRequest ); + // repair either not allowed or not successful + NotifyBrokenPackage aNotifyRequest( aDocumentTitle ); + xInteraction->handle( aNotifyRequest.GetRequest() ); rtl::Reference< ::comphelper::OIHWrapNoFilterDialog > xHandler = new ::comphelper::OIHWrapNoFilterDialog( xInteraction ); if ( nIndexOfInteractionHandler != -1 ) diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx index 88ed54dff2..5fc696850f 100644 --- a/sw/source/ui/uno/unoatxt.cxx +++ b/sw/source/ui/uno/unoatxt.cxx @@ -35,6 +35,7 @@ #include <com/sun/star/beans/PropertyAttribute.hpp> #include <osl/mutex.hxx> #include <osl/diagnose.h> +#include <tools/debug.hxx> #include <vcl/svapp.hxx> #include <svl/svstdarr.hxx> #include <svtools/unoevent.hxx> diff --git a/sw/source/ui/uno/unofreg.cxx b/sw/source/ui/uno/unofreg.cxx index 320aab5c03..7899bba83e 100644 --- a/sw/source/ui/uno/unofreg.cxx +++ b/sw/source/ui/uno/unofreg.cxx @@ -155,99 +155,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -static void lcl_uno_writeInfo( - registry::XRegistryKey * pRegistryKey, - const OUString& rImplementationName, - const uno::Sequence< OUString >& rServices ) -{ - uno::Reference< registry::XRegistryKey > xNewKey( - pRegistryKey->createKey( - OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + rImplementationName + OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ) ); - - for( sal_Int32 i = 0; i < rServices.getLength(); i++ ) - xNewKey->createKey( rServices.getConstArray()[i]); -} - -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void * /*pServiceManager*/, - void * pRegistryKey ) -{ - if( pRegistryKey ) - { - try - { - registry::XRegistryKey *pKey = - reinterpret_cast< registry::XRegistryKey * >( pRegistryKey ); - - - // xml filter - lcl_uno_writeInfo( pKey, SwXMLImport_getImplementationName(), - SwXMLImport_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLImportStyles_getImplementationName(), - SwXMLImportStyles_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey,SwXMLImportContent_getImplementationName(), - SwXMLImportContent_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLImportMeta_getImplementationName(), - SwXMLImportMeta_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLImportSettings_getImplementationName(), - SwXMLImportSettings_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportOOO_getImplementationName(), - SwXMLExportOOO_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportStylesOOO_getImplementationName(), - SwXMLExportStylesOOO_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey,SwXMLExportContentOOO_getImplementationName(), - SwXMLExportContentOOO_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportMetaOOO_getImplementationName(), - SwXMLExportMetaOOO_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportSettingsOOO_getImplementationName(), - SwXMLExportSettingsOOO_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExport_getImplementationName(), - SwXMLExport_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportStyles_getImplementationName(), - SwXMLExportStyles_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey,SwXMLExportContent_getImplementationName(), - SwXMLExportContent_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportMeta_getImplementationName(), - SwXMLExportMeta_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMLExportSettings_getImplementationName(), - SwXMLExportSettings_getSupportedServiceNames() ); - //API objects - lcl_uno_writeInfo( pKey, SwXAutoTextContainer_getImplementationName(), - SwXAutoTextContainer_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXModule_getImplementationName(), - SwXModule_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwXMailMerge_getImplementationName(), - SwXMailMerge_getSupportedServiceNames() ); - //Filter options - lcl_uno_writeInfo( pKey, SwXFilterOptions::getImplementationName_Static(), - SwXFilterOptions::getSupportedServiceNames_Static() ); - - // documents - lcl_uno_writeInfo( pKey, SwTextDocument_getImplementationName(), - SwTextDocument_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey, SwWebDocument_getImplementationName(), - SwWebDocument_getSupportedServiceNames() ); - lcl_uno_writeInfo( pKey,SwGlobalDocument_getImplementationName(), - SwGlobalDocument_getSupportedServiceNames() ); - - // module - lcl_uno_writeInfo( pKey, SwUnoModule_getImplementationName(), - SwUnoModule_getSupportedServiceNames() ); - // --> OD 2007-05-24 #i73788# - lcl_uno_writeInfo( pKey, - comp_FinalThreadManager::_getImplementationName(), - comp_FinalThreadManager::_getSupportedServiceNames() ); - // <-- - - } - catch (registry::InvalidRegistryException &) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - return sal_True; -} - static ::cppu::ImplementationEntry const entries[] = { { &comp_FinalThreadManager::_create, &comp_FinalThreadManager::_getImplementationName, diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx index 6a52d76ed0..633a81df33 100644 --- a/sw/source/ui/uno/unomailmerge.cxx +++ b/sw/source/ui/uno/unomailmerge.cxx @@ -197,6 +197,7 @@ static BOOL LoadFromURL_impl( } else { + // SfxObjectShellRef is ok here, since the document will be explicitly closed SfxObjectShellRef xTmpDocSh = pTmpDocShell; CloseModelAndDocSh( xTmpModel, xTmpDocSh ); } diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx index 70f8b9978f..4bac121189 100644 --- a/sw/source/ui/uno/unomod.cxx +++ b/sw/source/ui/uno/unomod.cxx @@ -53,7 +53,7 @@ #include <comphelper/ChainablePropertySetInfo.hxx> #include <edtwin.hxx> #include <rtl/ustrbuf.hxx> - +#include <tools/urlobj.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; @@ -765,14 +765,12 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c OUString sHelpURL; if ( ! ( rValue >>= sHelpURL ) ) throw IllegalArgumentException(); - SwEditWin &rEditWin = pView->GetEditWin(); - OUString sPrefix = sHelpURL.copy ( 0, 4 ); - // Make sure we have a valid string...should be in the format HID:12345 - if ( ! sPrefix.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "HID:" ) ) ) + + INetURLObject aHID( sHelpURL ); + if ( aHID.GetProtocol() == INET_PROT_HID ) + pView->GetEditWin().SetHelpId( rtl::OUStringToOString( aHID.GetURLPath(), RTL_TEXTENCODING_UTF8 ) ); + else throw IllegalArgumentException (); - OUString sNumber = sHelpURL.copy ( 4 ); - sal_uInt32 nHelpId = sNumber.toInt32(); - rEditWin.SetHelpId ( nHelpId ); } else throw UnknownPropertyException(); @@ -952,9 +950,9 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u { bBool = sal_False; OUStringBuffer sHelpURL; - sHelpURL.appendAscii ( "HID:" ); + sHelpURL.appendAscii ( INET_HID_SCHEME ); SwEditWin &rEditWin = pView->GetEditWin(); - sHelpURL.append ( static_cast < sal_Int32 > ( rEditWin.GetHelpId() ) ); + sHelpURL.append( rtl::OStringToOUString( rEditWin.GetHelpId(), RTL_TEXTENCODING_UTF8 ) ); rValue <<= sHelpURL.makeStringAndClear(); } else diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index ad3cba0060..cf19091c3e 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -2,7 +2,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 @@ -46,7 +46,7 @@ #include <pview.hxx> #include <viewsh.hxx> #include <pvprtdat.hxx> -#include <swprtopt.hxx> +#include <printdata.hxx> #include <svl/stritem.hxx> #include <unotxdoc.hxx> #include <svl/numuno.hxx> @@ -81,7 +81,6 @@ #include <globals.hrc> #include <unomid.h> #include <unotools/printwarningoptions.hxx> - #include <com/sun/star/util/SearchOptions.hpp> #include <com/sun/star/lang/ServiceNotRegisteredException.hpp> #include <com/sun/star/lang/DisposedException.hpp> @@ -106,7 +105,6 @@ #include <swcont.hxx> #include <unodefaults.hxx> #include <SwXDocumentSettings.hxx> -#include <SwXPrintPreviewSettings.hxx> #include <doc.hxx> #include <editeng/forbiddencharacterstable.hxx> #include <svl/zforlist.hxx> @@ -115,6 +113,7 @@ #include <osl/file.hxx> #include <comphelper/storagehelper.hxx> + // --> FME 2004-06-08 #i12836# enhanced pdf export #include <EnhancedPDFExportHelper.hxx> // <-- @@ -863,7 +862,7 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > RES_CHRATR_BEGIN, RES_CHRATR_END-1, RES_PARATR_BEGIN, RES_PARATR_END-1, RES_FRMATR_BEGIN, RES_FRMATR_END-1, - RES_TXTATR_INETFMT, RES_TXTATR_INETFMT, + RES_TXTATR_INETFMT, RES_TXTATR_CHARFMT, 0); pSearch->FillSearchItemSet(aSearch); BOOL bCancel; @@ -1668,9 +1667,7 @@ Reference< XInterface > SwXTextDocument::createInstance(const OUString& rServic } else if (sCategory == C2U ("text") ) { - if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.PrintPreviewSettings") ) ) - xRet = Reference < XInterface > ( *new SwXPrintPreviewSettings ( pDocShell->GetDoc() ) ); - else if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.DocumentSettings") ) ) + if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.DocumentSettings") ) ) xRet = Reference < XInterface > ( *new SwXDocumentSettings ( this ) ); } else if (sCategory == C2U ("chart2") ) @@ -2425,7 +2422,7 @@ SwDoc * SwXTextDocument::GetRenderDoc( const TypeId aSwViewTypeId = TYPE(SwView); if (rpView && rpView->IsA(aSwViewTypeId)) { - SfxObjectShellRef xDocSh(((SwView*)rpView)->GetOrCreateTmpSelectionDoc()); + SfxObjectShellLock xDocSh(((SwView*)rpView)->GetOrCreateTmpSelectionDoc()); if (xDocSh.Is()) { pDoc = ((SwDocShell*)&xDocSh)->GetDoc(); @@ -2543,14 +2540,15 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( m_pRenderData->ViewOptionAdjustStart( *pWrtShell, *pWrtShell->GetViewOptions() ); } - m_pRenderData->SetSwPrtOptions( new SwPrtOptions( bIsPDFExport ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PDF export")) : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Printing") ) ) ); + m_pRenderData->SetSwPrtOptions( new SwPrintData ); m_pRenderData->MakeSwPrtOptions( m_pRenderData->GetSwPrtOptionsRef(), pRenderDocShell, m_pPrintUIOptions, m_pRenderData, bIsPDFExport ); if (pView->IsA(aSwViewTypeId)) { // PDF export should not make use of the SwPrtOptions - const SwPrtOptions *pPrtOptions = bIsPDFExport? NULL : m_pRenderData->GetSwPrtOptions(); + const SwPrintData *pPrtOptions = (bIsPDFExport) + ? NULL : m_pRenderData->GetSwPrtOptions(); m_pRenderData->ViewOptionAdjust( pPrtOptions ); } @@ -2562,10 +2560,10 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( bool bStateChanged = false; if ( bOrigStatus && !SvtPrintWarningOptions().IsModifyDocumentOnPrintingAllowed() ) { - pRenderDocShell->EnableSetModified( sal_False ); + pRenderDocShell->EnableSetModified( sal_False ); bStateChanged = true; } - + // --> FME 2005-05-23 #122919# Force field update before PDF export: pWrtShell->ViewShell::UpdateFlds(TRUE); @@ -2686,8 +2684,8 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( ? nRenderer + 1 : m_pRenderData->GetPagesToPrint()[ nRenderer ]; // <-- - - // get paper tray to use ... + + // get paper tray to use ... sal_Int32 nPrinterPaperTray = -1; if (! bPrintPaperFromSetup) { @@ -2759,7 +2757,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( aRenderer.realloc( nLen ); aRenderer[ nLen - 1 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PrinterPaperTray" ) ); aRenderer[ nLen - 1 ].Value <<= nPrinterPaperTray; - } + } } m_pPrintUIOptions->appendPrintUIOptions( aRenderer ); @@ -2906,7 +2904,8 @@ void SAL_CALL SwXTextDocument::render( } // <-- - const SwPrtOptions &rSwPrtOptions = *m_pRenderData->GetSwPrtOptions(); + SwPrintData const& rSwPrtOptions = + *m_pRenderData->GetSwPrtOptions(); if (bPrintProspect) pVwSh->PrintProspect( pOut, rSwPrtOptions, nRenderer ); else // normal printing and PDF export @@ -2981,8 +2980,12 @@ uno::Reference< util::XCloneable > SwXTextDocument::createClone( ) throw (uno:: SolarMutexGuard aGuard; if(!IsValid()) throw RuntimeException(); - //create a new document - hidden - copy the storage and return it - SfxObjectShell* pShell = pDocShell->GetDoc()->CreateCopy(false); + + // create a new document - hidden - copy the storage and return it + // SfxObjectShellRef is used here, since the model should control object lifetime after creation + // and thus SfxObjectShellLock is not allowed here + // the model holds reference to the shell, so the shell will not destructed at the end of method + SfxObjectShellRef pShell = pDocShell->GetDoc()->CreateCopy(false); uno::Reference< frame::XModel > xNewModel = pShell->GetModel(); uno::Reference< embed::XStorage > xNewStorage = ::comphelper::OStorageHelper::GetTemporaryStorage( ); uno::Sequence< beans::PropertyValue > aTempMediaDescriptor; @@ -3805,8 +3808,8 @@ SwViewOptionAdjust_Impl::~SwViewOptionAdjust_Impl() m_rShell.ApplyViewOptions( m_aOldViewOptions ); } -void SwViewOptionAdjust_Impl::AdjustViewOptions( - const SwPrtOptions *pPrtOptions ) +void +SwViewOptionAdjust_Impl::AdjustViewOptions(SwPrintData const*const pPrtOptions) { // to avoid unnecessary reformatting the view options related to the content // below should only change if necessary, that is if respective content is present diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index e6dfaf8517..b9db9649b9 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -848,14 +848,17 @@ void SAL_CALL SwXTextView::setRubyList( pDoc->SetRubyList( *rSh.GetCrsr(), aList, 0 ); } -SfxObjectShellRef SwXTextView::BuildTmpSelectionDoc( SfxObjectShellRef& /*rRef*/ ) +SfxObjectShellLock SwXTextView::BuildTmpSelectionDoc() { SwWrtShell& rOldSh = m_pView->GetWrtShell(); SfxPrinter *pPrt = rOldSh.getIDocumentDeviceAccess()->getPrinter( false ); SwDocShell* pDocSh; - SfxObjectShellRef xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SFX_CREATE_MODE_STANDARD ) ); + SfxObjectShellLock xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SFX_CREATE_MODE_STANDARD ) ); xDocSh->DoInitNew( 0 ); - rOldSh.FillPrtDoc(pDocSh->GetDoc(), pPrt); + SwDoc *const pTempDoc( pDocSh->GetDoc() ); + // #i103634#, #i112425#: do not expand numbering and fields on PDF export + pTempDoc->SetClipBoard(true); + rOldSh.FillPrtDoc(pTempDoc, pPrt); SfxViewFrame* pDocFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 ); SwView* pDocView = (SwView*) pDocFrame->GetViewShell(); pDocView->AttrChangedNotify( &pDocView->GetWrtShell() );//Damit SelectShell gerufen wird. diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx index f09927a942..1af0fdeff3 100644 --- a/sw/source/ui/utlui/content.cxx +++ b/sw/source/ui/utlui/content.cxx @@ -884,6 +884,7 @@ SwContentTree::SwContentTree(Window* pParent, const ResId& rResId) : aUpdTimer.SetTimeout(1000); Clear(); EnableContextMenuHandling(); + SetStyle( GetStyle() | WB_QUICK_SEARCH ); } SwContentTree::~SwContentTree() @@ -2094,7 +2095,7 @@ void SwContentTree::ExecCommand(sal_uInt16 nCmd, sal_Bool bModifier) SvLBoxEntry* pFirstEntry = FirstSelected(); if (pFirstEntry && lcl_IsContent(pFirstEntry)) { - if ( (bIsRoot && nRootType == CONTENT_TYPE_OUTLINE) || + if((bIsRoot && nRootType == CONTENT_TYPE_OUTLINE) || ((SwContent*)pFirstEntry->GetUserData())->GetParent()->GetType() == CONTENT_TYPE_OUTLINE) { @@ -2112,8 +2113,8 @@ void SwContentTree::ExecCommand(sal_uInt16 nCmd, sal_Bool bModifier) if( nMove ) { short nDir = nCmd == FN_ITEM_UP ? -1 : 1; - if( !bModifier && ( (nDir == -1 && nActPos > 0) || - (nDir == 1 && nActPos < GetEntryCount() - 2) ) ) + if( !bModifier && ((nDir == -1 && nActPos > 0) || + (nDir == 1 && nActPos < GetEntryCount() - 2 )) ) { pShell->MoveOutlinePara( nDir ); //Cursor wieder an die aktuelle Position setzen @@ -2742,8 +2743,8 @@ sal_Bool SwContentTree::Select( SvLBoxEntry* pEntry, sal_Bool bSelect ) pParentEntry = GetParent(pParentEntry); } if(!bIsLastReadOnly && (!IsVisible() || - ( (bIsRoot && nRootType == CONTENT_TYPE_OUTLINE && pParentEntry) || - (lcl_IsContent(pEntry) && ((SwContentType*)pParentEntry->GetUserData())->GetType() == CONTENT_TYPE_OUTLINE)) )) + ((bIsRoot && nRootType == CONTENT_TYPE_OUTLINE && pParentEntry) || + (lcl_IsContent(pEntry) && ((SwContentType*)pParentEntry->GetUserData())->GetType() == CONTENT_TYPE_OUTLINE)))) bEnable = sal_True; SwNavigationPI* pNavi = GetParentWindow(); pNavi->aContentToolBox.EnableItem(FN_ITEM_UP , bEnable); diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx index 143b86e1c9..3962b1d859 100644 --- a/sw/source/ui/utlui/glbltree.cxx +++ b/sw/source/ui/utlui/glbltree.cxx @@ -109,7 +109,7 @@ using ::rtl::OUString; #define GLBL_TABPOS_SUB 5 const SfxObjectShell* SwGlobalTree::pShowShell = 0; -static const USHORT aHelpForMenu[] = +static const char* aHelpForMenu[] = { 0, // HID_GLBLTREE_UPDATE, //CTX_UPDATE diff --git a/sw/source/ui/utlui/gloslst.src b/sw/source/ui/utlui/gloslst.src index 1ccf855ffe..db34b8c5ae 100644 --- a/sw/source/ui/utlui/gloslst.src +++ b/sw/source/ui/utlui/gloslst.src @@ -68,6 +68,7 @@ ModalDialog DLG_GLOSSARY_DECIDE_DLG }; ListBox LB_LIST { + HelpID = "sw:ListBox:DLG_GLOSSARY_DECIDE_DLG:LB_LIST"; Pos = MAP_APPFONT ( 12 , 15 ) ; Size = MAP_APPFONT ( 81 , 40 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/utlui/makefile.mk b/sw/source/ui/utlui/makefile.mk deleted file mode 100644 index 75d8376702..0000000000 --- a/sw/source/ui/utlui/makefile.mk +++ /dev/null @@ -1,79 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=utlui - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - - -SRS1NAME=$(TARGET) -SRC1FILES = \ - initui.src \ - gloslst.src \ - navipi.src \ - poolfmt.src \ - attrdesc.src \ - unotools.src \ - utlui.src - -EXCEPTIONSFILES= \ - $(SLO)$/attrdesc.obj \ - $(SLO)$/bookctrl.obj \ - $(SLO)$/condedit.obj \ - $(SLO)$/content.obj \ - $(SLO)$/glbltree.obj \ - $(SLO)$/gloslst.obj \ - $(SLO)$/initui.obj \ - $(SLO)$/navipi.obj \ - $(SLO)$/numfmtlb.obj \ - $(SLO)$/prcntfld.obj \ - $(SLO)$/shdwcrsr.obj \ - $(SLO)$/swrenamexnameddlg.obj \ - $(SLO)$/textcontrolcombo.obj \ - $(SLO)$/tmplctrl.obj \ - $(SLO)$/uitool.obj \ - $(SLO)$/unotools.obj \ - $(SLO)$/viewlayoutctrl.obj \ - $(SLO)$/zoomctrl.obj - -SLOFILES = $(EXCEPTIONSFILES) \ - $(SLO)$/navicfg.obj \ - $(SLO)$/uiitems.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx index 1ba6702306..280b26334f 100644 --- a/sw/source/ui/utlui/navipi.cxx +++ b/sw/source/ui/utlui/navipi.cxx @@ -412,12 +412,17 @@ IMPL_LINK( SwNavigationPI, ToolBoxDropdownClickHdl, ToolBox*, pBox ) case FN_DROP_REGION: { + static const char* aHIDs[] = + { + HID_NAVI_DRAG_HYP, + HID_NAVI_DRAG_LINK, + HID_NAVI_DRAG_COPY, + }; PopupMenu *pMenu = new PopupMenu; for (USHORT i = 0; i <= REGION_MODE_EMBEDDED; i++) { pMenu->InsertItem( i + 1, aContextArr[i] ); - pMenu->SetHelpId(i + 1, HID_NAVI_DRAG_HYP + i); - + pMenu->SetHelpId(i + 1, aHIDs[i]); } pMenu->CheckItem( nRegionMode + 1 ); pMenu->SetSelectHdl(LINK(this, SwNavigationPI, MenuSelectHdl)); @@ -807,7 +812,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, ((SfxDockingWindow*)pParent)->SetOutputSizePixel(aMinSize); aContentTree.SetPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y ); - aContentTree.SetWindowBits( WB_HASBUTTONS|WB_HASBUTTONSATROOT| + aContentTree.SetStyle( aContentTree.GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT| WB_CLIPCHILDREN|WB_HSCROLL|WB_FORCE_MAKEVISIBLE ); aContentTree.SetSpaceBetweenEntries(3); aContentTree.SetSelectionMode( SINGLE_SELECTION ); @@ -821,7 +826,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, // TreeListBox fuer Globaldokument aGlobalTree.SetPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y ); aGlobalTree.SetSelectionMode( MULTIPLE_SELECTION ); - aGlobalTree.SetWindowBits( WB_HASBUTTONS|WB_HASBUTTONSATROOT| + aGlobalTree.SetStyle( aGlobalTree.GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT| WB_CLIPCHILDREN|WB_HSCROLL ); Size aGlblSize(aGlobalToolBox.CalcWindowSizePixel()); aGlobalToolBox.SetSizePixel(aGlblSize); diff --git a/sw/source/ui/utlui/unotools.cxx b/sw/source/ui/utlui/unotools.cxx index 7a8bcdbc11..b406e26086 100644 --- a/sw/source/ui/utlui/unotools.cxx +++ b/sw/source/ui/utlui/unotools.cxx @@ -63,6 +63,7 @@ #include <unomid.h> + using namespace ::com::sun::star; using ::rtl::OUString; diff --git a/sw/source/ui/utlui/unotools.src b/sw/source/ui/utlui/unotools.src index aa4be8804c..c6a4443a39 100644 --- a/sw/source/ui/utlui/unotools.src +++ b/sw/source/ui/utlui/unotools.src @@ -44,6 +44,7 @@ ModalDialog DLG_RENAME_XNAMED }; Edit ED_NEW_NAME { + HelpID = "sw:Edit:DLG_RENAME_XNAMED:ED_NEW_NAME"; Pos = MAP_APPFONT ( 65 , 13 ) ; Size = MAP_APPFONT ( 87 , 12 ) ; Border = TRUE; diff --git a/sw/source/ui/utlui/utlui.src b/sw/source/ui/utlui/utlui.src index 115bd809a9..61a473218b 100644 --- a/sw/source/ui/utlui/utlui.src +++ b/sw/source/ui/utlui/utlui.src @@ -123,6 +123,10 @@ Resource RID_SHELLRES_AUTOFMTSTRS { Text [ en-US ] = "Add non breaking space"; }; + String STR_AUTOFMTREDL_NON_BREAK_SPACE +1 + { + Text [ en-US ] = "Add non breaking space"; + }; }; diff --git a/sw/source/ui/vba/makefile.mk b/sw/source/ui/vba/makefile.mk deleted file mode 100644 index 26975035f1..0000000000 --- a/sw/source/ui/vba/makefile.mk +++ /dev/null @@ -1,140 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=vbaswobj -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -DLLPRE = - -.IF "$(ENABLE_VBA)"!="YES" -dummy: - @echo "not building vba..." -.ENDIF - -INCPRE=$(INCCOM)$/$(TARGET) -CDEFS+=-DVBA_OOBUILD_HACK -# ------------------------------------------------------------------ - -SLOFILES= \ - $(SLO)$/vbaglobals.obj \ - $(SLO)$/vbaapplication.obj \ - $(SLO)$/vbadocument.obj \ - $(SLO)$/vbawindow.obj \ - $(SLO)$/vbasystem.obj \ - $(SLO)$/vbarangehelper.obj \ - $(SLO)$/vbarange.obj \ - $(SLO)$/vbabookmark.obj \ - $(SLO)$/vbabookmarks.obj \ - $(SLO)$/vbavariable.obj \ - $(SLO)$/vbavariables.obj \ - $(SLO)$/vbaview.obj \ - $(SLO)$/wordvbahelper.obj \ - $(SLO)$/service.obj \ - $(SLO)$/vbadocumentproperties.obj \ - $(SLO)$/vbapane.obj \ - $(SLO)$/vbapanes.obj \ - $(SLO)$/vbaoptions.obj \ - $(SLO)$/vbaselection.obj \ - $(SLO)$/vbatemplate.obj \ - $(SLO)$/vbaparagraphformat.obj \ - $(SLO)$/vbaautotextentry.obj \ - $(SLO)$/vbaparagraph.obj \ - $(SLO)$/vbafind.obj \ - $(SLO)$/vbareplacement.obj \ - $(SLO)$/vbastyle.obj \ - $(SLO)$/vbastyles.obj \ - $(SLO)$/vbafont.obj \ - $(SLO)$/vbapalette.obj \ - $(SLO)$/vbainformationhelper.obj \ - $(SLO)$/vbatable.obj \ - $(SLO)$/vbatables.obj \ - $(SLO)$/vbafield.obj \ - $(SLO)$/vbaborders.obj \ - $(SLO)$/vbadocuments.obj \ - $(SLO)$/vbaheaderfooter.obj \ - $(SLO)$/vbaheadersfooters.obj \ - $(SLO)$/vbaheaderfooterhelper.obj \ - $(SLO)$/vbaaddin.obj \ - $(SLO)$/vbaaddins.obj \ - $(SLO)$/vbadialogs.obj \ - $(SLO)$/vbadialog.obj \ - $(SLO)$/vbawrapformat.obj \ - $(SLO)$/vbapagesetup.obj \ - $(SLO)$/vbasection.obj \ - $(SLO)$/vbasections.obj \ - $(SLO)$/vbarow.obj \ - $(SLO)$/vbarows.obj \ - $(SLO)$/vbacolumn.obj \ - $(SLO)$/vbacolumns.obj \ - $(SLO)$/vbatablehelper.obj \ - $(SLO)$/vbacell.obj \ - $(SLO)$/vbacells.obj \ - $(SLO)$/vbatabstop.obj \ - $(SLO)$/vbatabstops.obj \ - $(SLO)$/vbatableofcontents.obj \ - $(SLO)$/vbatablesofcontents.obj \ - $(SLO)$/vbalistgallery.obj \ - $(SLO)$/vbalistgalleries.obj \ - $(SLO)$/vbalisthelper.obj \ - $(SLO)$/vbalisttemplate.obj \ - $(SLO)$/vbalisttemplates.obj \ - $(SLO)$/vbalistlevel.obj \ - $(SLO)$/vbalistlevels.obj \ - $(SLO)$/vbalistformat.obj \ - $(SLO)$/vbarevision.obj \ - $(SLO)$/vbarevisions.obj \ - $(SLO)$/vbaframe.obj \ - $(SLO)$/vbaframes.obj \ - $(SLO)$/vbaeventshelper.obj \ - -# These files to be enabled when field related patches -# are folded into libreoffice -.IF "$(ENABLE_FIELDBITS)"=="YES" -SLOFILES+=$(SLO)$/vbaformfield.obj \ - $(SLO)$/vbaformfields.obj \ - $(SLO)$/vbacheckbox.obj -.ENDIF - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -ALLTAR : \ - $(MISC)$/$(TARGET).don \ - -$(SLOFILES) : $(MISC)$/$(TARGET).don - -$(MISC)$/$(TARGET).don : $(SOLARBINDIR)$/oovbaapi.rdb - +$(CPPUMAKER) -O$(INCCOM)$/$(TARGET) -BUCR $(SOLARBINDIR)$/oovbaapi.rdb -X$(SOLARBINDIR)$/types.rdb && echo > $@ - echo $@ - diff --git a/sw/source/ui/vba/service.cxx b/sw/source/ui/vba/service.cxx index c3794606de..291f0e8989 100644 --- a/sw/source/ui/vba/service.cxx +++ b/sw/source/ui/vba/service.cxx @@ -65,24 +65,14 @@ extern sdecl::ServiceDecl const serviceDecl; extern "C" { - void SAL_CALL component_getImplementationEnvironment( + SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { OSL_TRACE("In component_getImplementationEnv"); *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - sal_Bool SAL_CALL component_writeInfo( - lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) - { - OSL_TRACE("In component_writeInfo"); - - // Component registration - return component_writeInfoHelper( pServiceManager, pRegistryKey, - globals::serviceDecl, document::serviceDecl, wrapformat::serviceDecl, vbaeventshelper::serviceDecl ); - } - - void * SAL_CALL component_getFactory( + SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) { diff --git a/sw/source/ui/vba/vbadocuments.cxx b/sw/source/ui/vba/vbadocuments.cxx index 6540a3f1d4..9de5fe6bd4 100644 --- a/sw/source/ui/vba/vbadocuments.cxx +++ b/sw/source/ui/vba/vbadocuments.cxx @@ -121,7 +121,7 @@ SwVbaDocuments::Add( const uno::Any& Template, const uno::Any& /*NewTemplate*/, { return Open( sFileName, uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any()); } - uno::Reference <text::XTextDocument> xTextDoc( VbaDocumentsBase::Add() , uno::UNO_QUERY_THROW ); + uno::Reference <text::XTextDocument> xTextDoc( createDocument() , uno::UNO_QUERY_THROW ); if( xTextDoc.is() ) return getDocument( mxContext, xTextDoc, Application() ); @@ -132,7 +132,7 @@ SwVbaDocuments::Add( const uno::Any& Template, const uno::Any& /*NewTemplate*/, void SAL_CALL SwVbaDocuments::Close( const uno::Any& /*SaveChanges*/, const uno::Any& /*OriginalFormat*/, const uno::Any& /*RouteDocument*/ ) throw (uno::RuntimeException) { - VbaDocumentsBase::Close(); + closeDocuments(); } // #TODO# #FIXME# can any of the unused params below be used? @@ -151,7 +151,7 @@ SwVbaDocuments::Open( const ::rtl::OUString& Filename, const uno::Any& /*Confirm uno::Sequence< beans::PropertyValue > sProps(0); - uno::Reference <text::XTextDocument> xSpreadDoc( VbaDocumentsBase::Open( Filename, ReadOnly, sProps ), uno::UNO_QUERY_THROW ); + uno::Reference <text::XTextDocument> xSpreadDoc( openDocument( Filename, ReadOnly, sProps ), uno::UNO_QUERY_THROW ); uno::Any aRet = getDocument( mxContext, xSpreadDoc, Application() ); uno::Reference< word::XDocument > xDocument( aRet, uno::UNO_QUERY ); if ( xDocument.is() ) @@ -159,26 +159,7 @@ SwVbaDocuments::Open( const ::rtl::OUString& Filename, const uno::Any& /*Confirm return aRet; } - // VbaDocumentsBase / XDocumentsBase (to avoid warning C4266 for hiding function on wntmsci) -uno::Any SAL_CALL -SwVbaDocuments::Add() throw (uno::RuntimeException) -{ - return VbaDocumentsBase::Add(); -} - -void SAL_CALL -SwVbaDocuments::Close( ) throw (uno::RuntimeException) -{ - VbaDocumentsBase::Close(); -} - -uno::Any SAL_CALL -SwVbaDocuments::Open( const ::rtl::OUString& Filename, const uno::Any& ReadOnly, const uno::Sequence< beans::PropertyValue >& rProps ) throw (uno::RuntimeException) -{ - return VbaDocumentsBase::Open( Filename, ReadOnly, rProps ); -} - -rtl::OUString& +rtl::OUString& SwVbaDocuments::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaDocuments") ); diff --git a/sw/source/ui/vba/vbadocuments.hxx b/sw/source/ui/vba/vbadocuments.hxx index 665b07de75..d8ad9ff306 100644 --- a/sw/source/ui/vba/vbadocuments.hxx +++ b/sw/source/ui/vba/vbadocuments.hxx @@ -57,11 +57,6 @@ public: virtual css::uno::Any SAL_CALL Add( const css::uno::Any& Template, const css::uno::Any& NewTemplate, const css::uno::Any& DocumentType, const css::uno::Any& Visible ) throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL Open( const ::rtl::OUString& Filename, const css::uno::Any& ConfirmConversions, const css::uno::Any& ReadOnly, const css::uno::Any& AddToRecentFiles, const css::uno::Any& PasswordDocument, const css::uno::Any& PasswordTemplate, const css::uno::Any& Revert, const css::uno::Any& WritePasswordDocument, const css::uno::Any& WritePasswordTemplate, const css::uno::Any& Format, const css::uno::Any& Encoding, const css::uno::Any& Visible, const css::uno::Any& OpenAndRepair, const css::uno::Any& DocumentDirection, const css::uno::Any& NoEncodingDialog, const css::uno::Any& XMLTransform ) throw (css::uno::RuntimeException); virtual void SAL_CALL Close( const css::uno::Any& SaveChanges, const css::uno::Any& OriginalFormat, const css::uno::Any& RouteDocument ) throw (css::uno::RuntimeException); - - // VbaDocumentsBase / XDocumentsBase (to avoid warning C4266 for hiding function on wntmsci) - virtual css::uno::Any SAL_CALL Add() throw (css::uno::RuntimeException); - virtual void SAL_CALL Close( ) throw (css::uno::RuntimeException); - virtual css::uno::Any SAL_CALL Open( const ::rtl::OUString& Filename, const css::uno::Any& ReadOnly, const css::uno::Sequence< css::beans::PropertyValue >& rProps ) throw (css::uno::RuntimeException); }; #endif /* SW_VBA_DOCUMENTS_HXX */ diff --git a/sw/source/ui/vba/vbafind.hxx b/sw/source/ui/vba/vbafind.hxx index da07d2fd5a..4158f1cfda 100644 --- a/sw/source/ui/vba/vbafind.hxx +++ b/sw/source/ui/vba/vbafind.hxx @@ -59,6 +59,8 @@ 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 +#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 c1d04f6369..7c30348e88 100644 --- a/sw/source/ui/vba/vbaheaderfooterhelper.cxx +++ b/sw/source/ui/vba/vbaheaderfooterhelper.cxx @@ -187,5 +187,6 @@ sal_Bool HeaderFooterHelper::isEvenPagesFooter( const uno::Reference< frame::XMo } return sal_False; } - +#ifdef TOMORROW /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +#endif diff --git a/sw/source/ui/vba/vbarange.hxx b/sw/source/ui/vba/vbarange.hxx index fb6f8e0110..613be2a6c7 100644 --- a/sw/source/ui/vba/vbarange.hxx +++ b/sw/source/ui/vba/vbarange.hxx @@ -60,6 +60,8 @@ 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 +#endif css::uno::Reference< css::text::XText > getXText() { return mxText; } void setXTextCursor( const css::uno::Reference< css::text::XTextCursor >& xTextCursor ) { mxTextCursor = xTextCursor; } void Move( const css::uno::Any& _unit, const css::uno::Any& _count, const css::uno::Any& _extend, ooo::vba::word::E_DIRECTION eDirection ) throw (css::uno::RuntimeException); diff --git a/sw/source/ui/web/makefile.mk b/sw/source/ui/web/makefile.mk deleted file mode 100644 index 3dca3955de..0000000000 --- a/sw/source/ui/web/makefile.mk +++ /dev/null @@ -1,62 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=web - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - web.src - -EXCEPTIONSFILES = \ - $(SLO)$/wdocsh.obj \ - $(SLO)$/wformsh.obj \ - $(SLO)$/wfrmsh.obj \ - $(SLO)$/wgrfsh.obj \ - $(SLO)$/wlistsh.obj \ - $(SLO)$/wolesh.obj \ - $(SLO)$/wtabsh.obj \ - $(SLO)$/wtextsh.obj \ - $(SLO)$/wview.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/web/web.src b/sw/source/ui/web/web.src index 08b6707962..01fcf69716 100644 --- a/sw/source/ui/web/web.src +++ b/sw/source/ui/web/web.src @@ -25,15 +25,10 @@ * ************************************************************************/ -#ifndef _SVX_SVXIDS_HRC #include <svx/svxids.hrc> -#endif #include "globals.hrc" #include "cmdid.h" #include "web.hrc" -#include "swmn.hrc" -#define ACC_SW_WEB -#include "toolbox.hrc" #include "helpid.h" #include "cfgid.h" @@ -65,124 +60,6 @@ String RID_WEBTOOLS_TOOLBOX { Text [ en-US ] = "Main Toolbar/Web" ; }; -ToolBox RID_WEBTOOLS_TOOLBOX -{ - HelpID = HID_WEBTOOLS_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Scroll = TRUE ; - Hide = TRUE ; - Align = BOXALIGN_LEFT ; - ItemList = - { - ToolBoxItem - { - Identifier = FN_INSERT_CTRL ; - HelpID = HID_INSERT_CTRL ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = FN_INSERT_FIELD_CTRL ; - HelpID = HID_INSERT_FIELD_CTRL ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_DRAW_TEXT_MARQUEE ; - HelpID = SID_DRAW_TEXT_MARQUEE ; - }; - ToolBoxItem - { - Identifier = SID_FM_CONFIG ; - HelpID = SID_FM_CONFIG; - DropDown = TRUE ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = FN_GLOSSARY_DLG ; - HelpID = FN_GLOSSARY_DLG ; - DropDown = TRUE ; - }; - ToolBoxItem - { - Identifier = FN_SPELL_GRAMMAR_DIALOG; - HelpID = FN_SPELL_GRAMMAR_DIALOG; - }; - ToolBoxItem - { - ITEM_TOOLBAR_AUTOSPELL_CHECK - }; - ToolBoxItem - { - Identifier = FN_HYPHENATE_OPT_DLG; - HelpID = FN_HYPHENATE_OPT_DLG; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = SID_THESAURUS; - HelpID = SID_THESAURUS; - Hide = TRUE; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_SEARCH_DLG ; - HelpID = SID_SEARCH_DLG ; - }; - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - ToolBoxItem - { - Identifier = SID_ATTR_ZOOM; - HelpID = SID_ATTR_ZOOM ; - Hide = TRUE; - }; - ToolBoxItem - { - Identifier = FN_VIEW_META_CHARS ; - HelpID = FN_VIEW_META_CHARS ; - }; - ToolBoxItem - { - Identifier = FN_VIEW_GRAPHIC ; - HelpID = FN_VIEW_GRAPHIC ; - }; - ToolBoxItem - { - Identifier = FN_PRINT_LAYOUT ; - HelpID = FN_PRINT_LAYOUT ; - }; - ToolBoxItem - { - Identifier = SID_SOURCEVIEW ; - HelpID = HID_SOURCEVIEW ; - }; - }; -}; /************************************************************************* Textleiste *************************************************************************/ @@ -190,156 +67,17 @@ String RID_WEBTEXT_TOOLBOX { Text [ en-US ] = "Text Object Bar/Web" ; }; -ToolBox RID_WEBTEXT_TOOLBOX -{ - HelpID = HID_WEBTEXT_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - Hide = TRUE ; - HideWhenDeactivate = TRUE ; - LineSpacing = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - ItemList = - { - MN_TEMPLATE - MN_FONT - MN_TEXT1(TRUE) - MN_TEXT_LTR_RTL - MN_TEXT_LINESPACE - MN_TEXT2 - MN_TEXT_BACKGROUND - MN_TEXT_DIALOGS(TRUE) - }; - Scroll = TRUE ; -}; String RID_WEBFRAME_TOOLBOX { Text [ en-US ] = "Frame Object Bar/Web" ; }; -ToolBox RID_WEBFRAME_TOOLBOX -{ - HelpID = HID_WEBFRAME_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - Hide = TRUE ; - LineSpacing = TRUE ; - MenuStrings = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - ItemList = - { - MN_FRAME_WRAP_WEB - MN_FRAME1 - MN_FRAME3 - MN_LINESTYLE - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - MN_BACKGROUND_COLOR - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_ATTRIBUTES_FRAME - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_LAYER - ToolBoxItem - { - Identifier = FN_TOOL_ANKER ; - HelpID = FN_TOOL_ANKER ; - }; - }; - Scroll = TRUE ; -}; String RID_WEBGRAPHIC_TOOLBOX { Text [ en-US ] = "Graphics Object Bar/Web" ; }; -ToolBox RID_WEBGRAPHIC_TOOLBOX -{ - HelpID = HID_WEBGRAPHIC_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - MenuStrings = TRUE ; - Customize = TRUE ; - Hide = TRUE ; - ItemList = - { - MN_FRAME_WRAP_WEB - MN_FRAME1 - MN_FRAME3 - MN_LINESTYLE - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_ATTRIBUTES_GRAFIK - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_LAYER - ToolBoxItem - { - Identifier = FN_TOOL_ANKER ; - HelpID = FN_TOOL_ANKER ; - DropDown = TRUE ; - }; - }; - Scroll = TRUE ; -}; String RID_WEBOLE_TOOLBOX { Text [ en-US ] = "Object/Web" ; }; -ToolBox RID_WEBOLE_TOOLBOX -{ - HelpID = HID_OLE_TOOLBOX ; - Border = TRUE ; - SVLook = TRUE ; - Dockable = TRUE ; - Moveable = TRUE ; - Sizeable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - LineSpacing = TRUE ; - HideWhenDeactivate = TRUE ; - Customize = TRUE ; - MenuStrings = TRUE ; - Hide = TRUE ; - Scroll = TRUE ; - ItemList = - { - MN_FRAME_WRAP_WEB - MN_FRAME1 - MN_FRAME3 - MN_LINESTYLE - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_ATTRIBUTES_OLE - ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; - MN_LAYER - ToolBoxItem - { - Identifier = FN_TOOL_ANKER ; - HelpID = FN_TOOL_ANKER ; - DropDown = TRUE ; - }; - }; -}; -/************************************************************************* -*************************************************************************/ -Menu MN_WEB_TEXT_POPUPMENU - BASE_TEXT_POPUPMENU_BEGIN - BASE_TEXT_POPUPMENU_END diff --git a/sw/source/ui/web/wtextsh.cxx b/sw/source/ui/web/wtextsh.cxx index 8c33d7b420..650afb1b69 100644 --- a/sw/source/ui/web/wtextsh.cxx +++ b/sw/source/ui/web/wtextsh.cxx @@ -62,7 +62,7 @@ SFX_IMPL_INTERFACE(SwWebTextShell, SwBaseShell, SW_RES(STR_SHELLNAME_WEBTEXT)) { - SFX_POPUPMENU_REGISTRATION(SW_RES(MN_WEB_TEXT_POPUPMENU)); + SFX_POPUPMENU_REGISTRATION(SW_RES(MN_TEXT_POPUPMENU)); SFX_OBJECTBAR_REGISTRATION(SFX_OBJECTBAR_OBJECT, SW_RES(RID_TEXT_TOOLBOX)); SFX_CHILDWINDOW_REGISTRATION(FN_EDIT_FORMULA); SFX_CHILDWINDOW_REGISTRATION(FN_INSERT_FIELD); diff --git a/sw/source/ui/web/wview.cxx b/sw/source/ui/web/wview.cxx index ade1cf9dc4..5133830468 100644 --- a/sw/source/ui/web/wview.cxx +++ b/sw/source/ui/web/wview.cxx @@ -99,7 +99,6 @@ SFX_IMPL_NAMED_VIEWFACTORY(SwWebView, "Default") SFX_VIEW_REGISTRATION(SwWebDocShell); } - SFX_IMPL_INTERFACE( SwWebView, SwView, SW_RES(RID_WEBTOOLS_TOOLBOX) ) { SFX_CHILDWINDOW_REGISTRATION(SfxTemplateDialogWrapper::GetChildWindowId()); diff --git a/sw/source/ui/wrtsh/makefile.mk b/sw/source/ui/wrtsh/makefile.mk deleted file mode 100644 index 84ce030afb..0000000000 --- a/sw/source/ui/wrtsh/makefile.mk +++ /dev/null @@ -1,62 +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. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=wrtsh - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - wrtsh.src - -SLOFILES = \ - $(EXCEPTIONSFILES) - -EXCEPTIONSFILES = \ - $(SLO)$/delete.obj \ - $(SLO)$/move.obj \ - $(SLO)$/navmgr.obj \ - $(SLO)$/select.obj \ - $(SLO)$/wrtsh1.obj \ - $(SLO)$/wrtsh2.obj \ - $(SLO)$/wrtsh3.obj \ - $(SLO)$/wrtsh4.obj \ - $(SLO)$/wrtundo.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index f4d7981040..57d3d2f2a7 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -28,6 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include <com/sun/star/container/XChild.hpp> #include <com/sun/star/embed/XVisualObject.hpp> #include <com/sun/star/embed/EmbedMisc.hpp> @@ -35,6 +36,7 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/embed/NoVisualAreaSizeException.hpp> #include <com/sun/star/chart2/XChartDocument.hpp> +#include <com/sun/star/util/XModifiable.hpp> #if STLPORT_VERSION>=321 #include <math.h> // prevent conflict between exception and std::exception @@ -59,11 +61,11 @@ #include <vcl/graph.hxx> #include <sfx2/printer.hxx> #include <unotools/charclass.hxx> - #include <comphelper/storagehelper.hxx> #include <svx/svxdlg.hxx> #include <svx/extrusionbar.hxx> #include <svx/fontworkbar.hxx> +#include <frmfmt.hxx> #include <fmtftn.hxx> #include <fmtpdsc.hxx> #include <wdocsh.hxx> @@ -73,6 +75,7 @@ #include <view.hxx> #include <uitool.hxx> #include <cmdid.h> +#include <cfgitems.hxx> #include <pagedesc.hxx> #include <frmmgr.hxx> #include <shellio.hxx> @@ -106,7 +109,9 @@ #include <toolkit/helper/vclunohelper.hxx> #include <sfx2/viewfrm.hxx> +#include <editeng/acorrcfg.hxx> #include "PostItMgr.hxx" +#include <sfx2/msgpool.hxx> using namespace sw::mark; using namespace com::sun::star; @@ -414,16 +419,6 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName pReq->AppendItem(SfxStringItem(FN_PARAM_2, pURL->GetMainURL(INetURLObject::NO_DECODE))); pReq->AppendItem(SfxStringItem(FN_PARAM_3 , aDlg.GetCommands())); } */ - case SID_INSERT_APPLET: - /* - if(pReq) - { - SvAppletObjectRef xApplet ( xIPObj ); - if(xApplet.Is()) - pReq->AppendItem(SfxStringItem(FN_PARAM_1 , xApplet->GetCodeBase())); - pReq->AppendItem(SfxStringItem(FN_PARAM_2 , aDlg.GetClass())); - pReq->AppendItem(SfxStringItem(FN_PARAM_3 , aDlg.GetCommands())); - }*/ case SID_INSERT_FLOATINGFRAME: /* if(pReq && xFloatingFrame.Is()) @@ -438,9 +433,13 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName pReq->AppendItem(SfxBoolItem(FN_PARAM_5, pDescriptor->HasFrameBorder())); }*/ { + SfxSlotPool* pSlotPool = SW_MOD()->GetSlotPool(); + const SfxSlot* pSlot = pSlotPool->GetSlot(nSlotId); + rtl::OString aCmd(".uno:"); + aCmd += pSlot->GetUnoName(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractInsertObjectDialog* pDlg = - pFact->CreateInsertObjectDialog( GetWin(), nSlotId, xStor, &aServerList ); + pFact->CreateInsertObjectDialog( GetWin(), rtl::OUString( aCmd, aCmd.getLength(), RTL_TEXTENCODING_UTF8 ), xStor, &aServerList ); if ( pDlg ) { pDlg->Execute(); @@ -586,9 +585,39 @@ BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFm aFrmMgr.SetSize( aSz ); SwFlyFrmFmt *pFmt = SwFEShell::InsertObject( xRef, &aFrmMgr.GetAttrSet() ); + // --> #i972# + if ( bStarMath && pDoc->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ) ) + AlignFormulaToBaseline( xRef.GetObject() ); + // <-- + if (pFlyFrmFmt) *pFlyFrmFmt = pFmt; + if ( SotExchange::IsChart( aCLSID ) ) + { + uno::Reference< embed::XEmbeddedObject > xEmbeddedObj( xRef.GetObject(), uno::UNO_QUERY ); + if ( xEmbeddedObj.is() ) + { + bool bDisableDataTableDialog = false; + svt::EmbeddedObjectRef::TryRunningState( xEmbeddedObj ); + uno::Reference< beans::XPropertySet > xProps( xEmbeddedObj->getComponent(), uno::UNO_QUERY ); + if ( xProps.is() && + ( xProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableDataTableDialog" ) ) ) >>= bDisableDataTableDialog ) && + bDisableDataTableDialog ) + { + xProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableDataTableDialog" ) ), + uno::makeAny( sal_False ) ); + xProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableComplexChartTypes" ) ), + uno::makeAny( sal_False ) ); + uno::Reference< util::XModifiable > xModifiable( xProps, uno::UNO_QUERY ); + if ( xModifiable.is() ) + { + xModifiable->setModified( sal_True ); + } + } + } + } + EndAllAction(); GetView().AutoCaption(OLE_CAP, &aCLSID); @@ -746,6 +775,8 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, if ( (embed::EmbedMisc::EMBED_ACTIVATEIMMEDIATELY & nMisc) || bLinkingChart // TODO/LATER: ResizeOnPrinterChange //|| SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE & xObj->GetMiscStatus() + || nMisc & embed::EmbedMisc::EMBED_NEVERRESIZE // non-resizable objects need to be + // set the size back by this method ) { pCli = new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj ); @@ -856,6 +887,17 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, if ( bUseObjectSize ) { + // --> this moves non-resizable object so that when adding borders the baseline remains the same + const SwFlyFrmFmt *pFlyFrmFmt = dynamic_cast< const SwFlyFrmFmt * >( GetFlyFrmFmt() ); + ASSERT( pFlyFrmFmt, "Could not find fly frame." ); + if ( pFlyFrmFmt ) + { + const Point &rPoint = pFlyFrmFmt->GetLastFlyFrmPrtRectPos(); + SwRect aRect( pFlyPrtRect ? *pFlyPrtRect + : GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, 0, xObj.GetObject() )); + aArea += rPoint - aRect.Pos(); // adjust area by diff of printing area position in order to keep baseline alignment correct. + } + // <-- aArea.Width ( _aVisArea.Width() ); aArea.Height( _aVisArea.Height() ); RequestObjectResize( aArea, xObj.GetObject() ); @@ -1326,7 +1368,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum) // <-- if ( ( nTxtNodeIndent + nWidthOfTabs ) != 0 ) { - // --> OD 2010-05-05 #i111172# + // #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. @@ -1339,7 +1381,6 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum) nIndentChange -= aFmt.GetIndentAt() + aFmt.GetFirstLineIndent(); } } - // <-- aNumRule.ChangeIndent( nIndentChange ); } } diff --git a/sw/source/ui/wrtsh/wrtundo.cxx b/sw/source/ui/wrtsh/wrtundo.cxx index ef70e42d66..89f9d1c1f0 100644 --- a/sw/source/ui/wrtsh/wrtundo.cxx +++ b/sw/source/ui/wrtsh/wrtundo.cxx @@ -38,7 +38,9 @@ #include <wrtsh.hxx> #include <swundo.hxx> // fuer Undo-Ids #include <swdtflvr.hxx> - +#include <svtools/svtdata.hxx> +#include <svtools/svtools.hrc> +#include <svtools/svtdata.hxx> #include <wrtsh.hrc> #include <sfx2/sfx.hrc> @@ -127,7 +129,7 @@ String SwWrtShell::GetDoString( DoType eDoType ) const default:;//prevent warning } - aStr.Insert( String(ResId( nResStr, *SFX_APP()->GetSfxResManager())), 0 ); + aStr.Insert( String( SvtResId( nResStr)), 0 ); aStr += aUndoStr; return aStr; @@ -171,7 +173,7 @@ String SwWrtShell::GetRepeatString() const if (aUndoStr.Len() > 0) { - aStr.Insert( ResId( STR_REPEAT, *SFX_APP()->GetSfxResManager()), 0 ); + aStr.Insert( SvtResId( STR_REPEAT ), 0 ); aStr += aUndoStr; } |